Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-13310

Decam ingestion throws error on invalid headers

    XMLWordPrintable

    Details

      Description

      Files from the NOAO community pipeline which have failed astrometric or photometric calibration have a FITS header card "MAGZERO = 'INDEF ' / [mag] Magnitude zeropoint". Both afw and astropy consider this to be invalid. When ingesting community pipeline files with obs_decam, the presence of a file like this will cause the entire directory to fail to be imported, since afw raises an exception in DecamParseTask._listDir() of the form

       File "/data/scratch/software/lsst_stack_2018_04/stack/miniconda3-4.3.21-10a4fa6/Linux64/obs_decam/14.0-7-gb776afc+8/python/lsst/obs/decam/ingest.py", line 105, in _list
      dir
          md = afwImage.readMetadata(fileName)
      lsst.pex.exceptions.wrappers.FitsError:
        File "src/fits.cc", line 680, in virtual void lsst::afw::fits::{anonymous}::MetadataIterationFunctor::operator()(const string&, const string&, const string&)
          Could not parse header value for key 'MAGZERO': 'INDEF' {0}
      lsst::afw::fits::FitsError: 'Could not parse header value for key 'MAGZERO': 'INDEF''
      

      This call to readMetadata should be wrapped in a try block so that files with broken headers are ignored.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ctslater Colin Slater
              Watchers:
              Colin Slater, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins Builds

                  No builds found.