# DECam mosaic ingestion error

**URL:** <https://www.rubin.community/t/decam-mosaic-ingestion-error/4233>\
**Category:** Support\
**Created:** [June 30, 2020, 9:26am UTC](https://www.rubin.community/t/decam-mosaic-ingestion-error/4233 "2020-06-30T09:26:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![duho](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/duho/32/1028_2.png) [@duho](https://www.rubin.community/u/duho)\
**Post date:** [June 30, 2020, 9:26am UTC](https://www.rubin.community/t/decam-mosaic-ingestion-error/4233/1 "2020-06-30T09:26:41Z")

</div>

There was no problem when I ingest and processCcd cpData in [github.com/lsst/testdata\_decam](http://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

---

<div class="post-metadata">

**Author:** ![ktl](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/ktl/32/1373_2.png) [@ktl](https://www.rubin.community/u/ktl)\
**Post date:** [June 30, 2020, 2:22pm UTC](https://www.rubin.community/t/decam-mosaic-ingestion-error/4233/2 "2020-06-30T14:22:21Z")

</div>

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](https://jira.lsstcorp.org/browse/DM-25734) to report this problem and possible solutions.
