Hello,
I’m trying to develop an obs_package for our CTMO observatory (repo here) trying to emulate, necam example, VISTA and others. It seems the installation works ok and now I am trying to see if I can make butler ingest some files to process.
There are a few things I don’t understand and I haven’t found any info anywhere. How does butler now what .fits is a dark, a bias, a flat, a light? Surely from header HDU cards, yet, I haven’t found what translation I have to provide for those. Also, does directory structure matter when ingesting? or does ingest.py scans the whole directory tree looking for calibration images?
Anyway, I get this long error, apparently related to my CamMapper subclass.
ingestImages.py DATA $CTMO_TEST_DIR/*.fit --mode=link
Downloading https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat
|==================================================| 1.3k/1.3k (100.00%) 0s
root INFO: Loading config overrride file '/opt/lsst/software/stack/stack/miniconda3-py37_4.8.2-1a1d771/Linux64/obs_ctmo/v1/config/ingest.py'
CameraMapper INFO: Loading exposure registry from /home/lsst/pipe/DATA/registry.sqlite3
ingest WARN: /home/lsst/pipe/CTMO_1_filter/*.fit doesn't match any file
ingest.register INFO: Table "raw" exists. Skipping creation
(lsst-scipipe-1a1d771) [lsst@65fd9f18c3b8 pipe]$ ingestImages.py DATA $CTMO_TEST_DIR/lights/*.fit --mode=link
root INFO: Loading config overrride file '/opt/lsst/software/stack/stack/miniconda3-py37_4.8.2-1a1d771/Linux64/obs_ctmo/v1/config/ingest.py'
CameraMapper INFO: Loading exposure registry from /home/lsst/pipe/DATA/registry.sqlite3
ingest.register INFO: Table "raw" exists. Skipping creation
ingest WARN: Failed to ingest file /home/lsst/pipe/CTMO_1_filter/lights/V_BX_Tri_lights-001_i.fit: 'CtmoCamMapper' object has no attribute 'map_raw_filename'
Traceback (most recent call last):
File "/opt/lsst/software/stack/stack/miniconda3-py37_4.8.2-1a1d771/Linux64/pipe_tasks/20.0.0/python/lsst/pipe/tasks/ingest.py", line 599, in run
self.runFile(infile, registry, args, pos)
File "/opt/lsst/software/stack/stack/miniconda3-py37_4.8.2-1a1d771/Linux64/pipe_tasks/20.0.0/python/lsst/pipe/tasks/ingest.py", line 576, in runFile
outfile = self.parse.getDestination(args.butler, fileInfo, infile)
File "/opt/lsst/software/stack/stack/miniconda3-py37_4.8.2-1a1d771/Linux64/pipe_tasks/20.0.0/python/lsst/pipe/tasks/ingest.py", line 189, in getDestination
raw = butler.get("raw_filename", info)[0]
File "/opt/lsst/software/stack/stack/miniconda3-py37_4.8.2-1a1d771/Linux64/daf_persistence/20.0.0/python/lsst/daf/persistence/butler.py", line 1397, in get
location = self._locate(datasetType, dataId, write=False)
File "/opt/lsst/software/stack/stack/miniconda3-py37_4.8.2-1a1d771/Linux64/daf_persistence/20.0.0/python/lsst/daf/persistence/butler.py", line 1316, in _locate
location = repoData.repo.map(datasetType, dataId, write=write)
File "/opt/lsst/software/stack/stack/miniconda3-py37_4.8.2-1a1d771/Linux64/daf_persistence/20.0.0/python/lsst/daf/persistence/repository.py", line 239, in map
loc = self._mapper.map(*args, **kwargs)
File "/opt/lsst/software/stack/stack/miniconda3-py37_4.8.2-1a1d771/Linux64/daf_persistence/20.0.0/python/lsst/daf/persistence/mapper.py", line 162, in map
func = getattr(self, 'map_' + datasetType)
AttributeError: 'CtmoCamMapper' object has no attribute 'map_raw_filename'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/lsst/software/stack/stack/miniconda3-py37_4.8.2-1a1d771/Linux64/pipe_tasks/20.0.0/bin/ingestImages.py", line 3, in <module>
IngestTask.parseAndRun()
File "/opt/lsst/software/stack/stack/miniconda3-py37_4.8.2-1a1d771/Linux64/pipe_tasks/20.0.0/python/lsst/pipe/tasks/ingest.py", line 405, in parseAndRun
task.run(args)
File "/opt/lsst/software/stack/stack/miniconda3-py37_4.8.2-1a1d771/Linux64/pipe_tasks/20.0.0/python/lsst/pipe/tasks/ingest.py", line 603, in run
raise IngestError(f"Failed to ingest file {infile}", infile, pos) from exc
lsst.pipe.tasks.ingest.IngestError: Failed to ingest file /home/lsst/pipe/CTMO_1_filter/lights/V_BX_Tri_lights-001_i.fit
I appreciate if anyone could give me a hand pointing out what I’m missing from my understanding.
Thanks.