DECam mosaic ingestion error

There was no problem when I ingest and processCcd cpData in github.com/lsst/testdata_decam using docker container ‘lsstsqre/centos:7-stack-lsst_distrib-v19_0_0’+‘setup obs_decam’,

but when I tried to ingest other data ‘c4d_140820_035704_ooi_r_v1.fits.fz’ ‘c4d_140820_035704_ood_r_v1.fits.fz’, and ‘c4d_140820_035704_oow_r_v1.fits.fz’, which are instcal, dqm, and weightmap of Abell2670 in r-band, it gives me following error:

(lsst-scipipe-4d7b902) [root@1c035189da03 mnt]# ingestImagesDecam.py DATA --filetype instcal --mode=link cpData/original_files/instcal/*.fits.fz
root INFO: Loading config overrride file '/opt/lsst/software/stack/stack/miniconda3-4.7.10-4d7b902/Linux64/obs_decam/19.0.0+2/config/ingest.py'
CameraMapper INFO: Loading Posix exposure registry from /home/lsst/mnt/DATA
Traceback (most recent call last):
  File "/opt/lsst/software/stack/stack/miniconda3-4.7.10-4d7b902/Linux64/obs_decam/19.0.0+2/bin/ingestImagesDecam.py", line 3, in <module>
    DecamIngestTask.parseAndRun()
  File "/opt/lsst/software/stack/stack/miniconda3-4.7.10-4d7b902/Linux64/pipe_tasks/19.0.0+2/python/lsst/pipe/tasks/ingest.py", line 425, in parseAndRun
    task.run(args)
  File "/opt/lsst/software/stack/stack/miniconda3-4.7.10-4d7b902/Linux64/obs_decam/19.0.0+2/python/lsst/obs/decam/ingest.py", line 54, in run
    fileInfo, hduInfoList = self.parse.getInfo(infile, args.filetype)
  File "/opt/lsst/software/stack/stack/miniconda3-4.7.10-4d7b902/Linux64/obs_decam/19.0.0+2/python/lsst/obs/decam/ingest.py", line 18
    self.buildExpnumMapper(os.path.dirname(os.path.abspath(filename)))
  File "/opt/lsst/software/stack/stack/miniconda3-4.7.10-4d7b902/Linux64/obs_decam/19.0.0+2/python/lsst/obs/decam/ingest.py", line 1Mapper
    self._listdir(path, prefix)
  File "/opt/lsst/software/stack/stack/miniconda3-4.7.10-4d7b902/Linux64/obs_decam/19.0.0+2/python/lsst/obs/decam/ingest.py", line 1
    md = readMetadata(fileName)
lsst.pex.exceptions.wrappers.FitsError: 
  File "src/fits.cc", line 1561, in lsst::afw::fits::Fits::Fits(const string&, const string&, int)
    cfitsio error: tried to move past end of file (107) : Opening file '/home/lsst/mnt/cpData/original_files/instcal/.DS_Store' with
cfitsio error stack:
  ffopen could not interpret primary array header of file: 
  /home/lsst/mnt/cpData/original_files/instcal/.DS_Store
 {0}
lsst::afw::fits::FitsError: 'cfitsio error: tried to move past end of file (107) : Opening file '/home/lsst/mnt/cpData/original_filee' with mode 'r'
cfitsio error stack:
  ffopen could not interpret primary array header of file: 
  /home/lsst/mnt/cpData/original_files/instcal/.DS_Store
'

Does anyone have any thoughts? Thank you for reading. - Duho

Unfortunately, the DECam raw file ingest is not coded to ignore non-FITS files in the instcal, dqmask, or wtmap directories. You will have to work around this by removing .DS_Store (which is a macOS Finder file) prior to ingest. Note that this file may reappear if you view the folder in the Finder.

I have created issue DM-25734 to report this problem and possible solutions.

1 Like