Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: obs_decam
-
Labels:
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
- blocks
-
DM-8259 v13.0 [Fall 2016] release
- Done
Hsin-Fang Chiang, would you have time to review this? I basically moved the code that saves the HDU number from the decam raw file ingest up into the base ingest script, so obs packages can either use or ignore the hdu number as they require.
The only change to testdata_decam is rebuilding the registry with the new ingest code. The existing test succeeded because it used ccd 1, where the hdu and ccdnum happened to match. I added a test for ccd 62.
I checked the community pipeline calib products, and they do seem to always have the HDU equal to the ccdnum, so I have not changed anything there.