Sorry but I have one last question about this. After ingesting images with code following that in obs_decam for the gen2 ingestion. I can get the ingested ccds from a single MEF with:
butler.queryMetadata(‘raw’, [‘visit’, ‘ccd’], dataId={‘filter’: ‘VISTA-Y’})
Which returns the 16 ccd exposures from the one fits file. I can also get the filename (with the hdu number in square brackets at the end) with:
butler.get(‘raw_filename’, dataId={‘filter’: ‘VISTA-Y’, ‘visit’: 111157, ‘hdu’:2})
But when I try to get the exposure it tries to open the filename.fit[2] file which does not exist.
butler.get(‘raw’, dataId={‘filter’: ‘VISTA-Y’, ‘visit’: 111157, ‘hdu’:2})
leads to:
RuntimeError: No such FITS file: /Users/rs548/GitHub/lsst-ir-fusion/dmu4/data_test/raw/2018-09-11/111157-VISTA-Y.fit[2]
I have the getDestination function from https://github.com/lsst/obs_decam/blob/master/python/lsst/obs/decam/ingest.py which cuts off the square brackets. However, I get the same file not found error with or without it. I am working on a VistaTranslator for astro_metadata_translator so I can use the gen3 ingestor but would like to get processCcd running with the current data just to run some tests and compare to the gen3 outputs.
Is this an issue with the ingestion or do I need to write some processCcd overrides to read extensions?
This is such a trivial issue but I’m struggling to fix it.
Thanks again,
Raphael.