Uploaded image for project: 'DRP 1D pipeline'
  1. DRP 1D pipeline
  2. PIPE1D-93

Prepend HIERARCH to keys to access metadata in pfsCoadd

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Won't Fix (View Workflow)
    • Priority: Normal
    • Resolution: Won't Fix
    • Component/s: drp_1dpipe
    • Labels:
      None

      Description

      When we use outputs from a recent pipe2d, drp_1dpipe fails, emitting this error:

      INFO :: Failed to init pfsCoZCandidate : 'VERSION_DATAMODEL'
      

      It seems to be a KeyError raised from pre_process.py:init_output():

      damd_version = spectra[source].metadata["VERSION_DATAMODEL"]
      stella_version = spectra[source].metadata["VERSION_DRP_STELLA"]
      bs_pfs_version = spectra[source].metadata["VERSION_OBS_PFS"]
      

      After this commit, long key names in metadata dictionary must be prefixed by "HIERARCH ":
      https://github.com/Subaru-PFS/drp_stella/commit/0eb9ed9b75cd3e02f59daf144ec3f426f7c57422

      In fact, the following changes suffice to make drp_1dpipe work again, as reported by Takahiro Morishima :

      metadata['VERSION_DATAMODEL']   =>  metadata['HIERARCH VERSION_DATAMODEL']  
      metadata['VERSION_DRP_STELLA']  =>  metadata['HIERARCH VERSION_DRP_STELLA']  
      metadata['VERSION_OBS_PFS']     =>  metadata['HIERARCH VERSION_OBS_PFS']
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sogo.mineo sogo.mineo
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: