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

            Hide
            tjenness Tim Jenness added a comment -

            This is a gen2 ingest ticket for community pipeline products.

            Given that we don't use this code in gen3 and don't ingest community pipeline data at the moment, Colin Slater can we close this as won't fix?

            Show
            tjenness Tim Jenness added a comment - This is a gen2 ingest ticket for community pipeline products. Given that we don't use this code in gen3 and don't ingest community pipeline data at the moment, Colin Slater can we close this as won't fix?

              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.