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

obs_decam assigns wrong ccdnum to instcal data

    Details

    • Templates:

      Description

      When processing data from the community pipeline instcal files, the ccdnum that the butler uses, and which is used to create a detector object, is not the same as the ccd number specified in the original image headers. For example,

      >>> calexp = b.get("calexp", visit=406295, ccdnum=10)
      >>> calexp.getDetector().getId()
      10
      >>> calexp.getDetector().getName()
      'S22'
      >>> calexp.getMetadata().toDict()['DETNAME']
      'S22'
      

      But if I check the headers, I get

      >>> calexp.getMetadata().toDict()['CCDNUM']
      11
      >>> calexp.getMetadata().toDict()['DETECTOR']
      'S3-164_107419-16-2'
      

      where S3-164_107419-16-2 is the ID for the detector S23 aka ccdnum=11 (table of detector IDs).

      The original source of this confusion seems to be in the decam policy entry for instcal, which specifies:

      template:    "%(visit)07d/instcal%(visit)07d.fits.fz[%(ccdnum)d]"
      

      compared to the raw format, which is

      template:    "%(date)s/%(filter)s/decam%(visit)07d.fits.fz[%(hdu)d]"
      

      It is likely necessary for instcal ingest to duplicate the behavior of the raw file ingest of MEF files, to prevent this conflation of HDU numbers with CCD Ids.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ctslater Colin Slater
                Reporter:
                ctslater Colin Slater
                Reviewers:
                Hsin-Fang Chiang
                Watchers:
                Colin Slater, Hsin-Fang Chiang, Michael Wood-Vasey
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel