Uploaded image for project: 'DRP 2-D Pipeline'
  1. DRP 2-D Pipeline
  2. PIPE2D-525

PostISRCCD exposures cannot be written for a subset of LAM data

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      This ticket relates to an update needed to the LSST stack, for which a separate ticket on the LSST JIRA service will be raised, but is written here so that the PFS team are aware of the problem.

      While processing LAM data, it was found that postISRCCD exposures for visits 17190 and range 17244..17297 (5 May 2019 data) could not be written to file. There are probably more visits affected.

      A log of an example run using detrend.py is attached. The actual error is shown below:

        File "/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0/python/lsst/afw/image/image/fitsIoWithOptions.py", line 127, in exposureWriteFitsWithOptions
          self.writeFits(dest, **writeOptionDict)
      lsst.pex.exceptions.wrappers.TypeError: 
        File "src/PropertySet.cc", line 232, in std::vector<T> lsst::daf::base::PropertySet::getArray(const string&) const [with T = std::basic_string<char>; std::string = std::basic_string<char>]
          W_XHP2FR {0}
      lsst::pex::exceptions::TypeError: 'W_XHP2FR
      

      The FITS key W_XHP2FR is duplicated in the header (an issue which is addressed in a separate ticket, INSTRM-925). In the case of these LAM visits, the value of both duplicates is Undefined:

      W_XHP2FR=  / frac power to spreader heater: 0 or 1 NOT CURRENT
      [...]
      W_XHP2FR=  / frac power to shield: 0 or 1 NOT CURRENT 
      

      This problem had also appeared when writing other exposure outputs such as calexp's again using detrend.py, but in this case, if the value is set to a legitimate value ('0') through the header patching mechanism (PIPE2D-405), then the error disappears and a valid calexp is created.

      So it seems that the problem is only present if a) a card is duplicated and b) the value is undefined.

      The header patching mechanism requires one to have access to the metadata of the exposure, which is then modified in memory. This mechanism therefore cannot be applied to postISRCCD products, as these products are written to file from within the LSST stack (specifically in the IsrTask), so there is no possibility in PFS software to intercept the metadata prior to its being written to file.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                price price
                Reporter:
                hassan hassan
                Reviewers:
                hassan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: