Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: daf_butler
-
Labels:
-
Story Points:1
-
Epic Link:
-
Team:Data Release Production
-
Urgent?:No
Description
Jim kindly gave a handy code snippet which lets one retrieve a dataId (containing visit and detector information) if one has a butler, a known instrument, and what I'll call a `ccdVisitId` (the thing you get when you do visitId.getExposureId(), on a good day).
The snippet is
instrumentDataId = butler.registry.expandDataId(instrument=instrumentName)
|
packer = butler.registry.dimensions.makePacker("visit_detector", instrumentDataId) |
dataId = packer.unpack(integerVisitDetectorId)
|
assert packer.pack(dataId) == integerVisitDetectorId |
It works great for all the HSC cases I've tried, but does not work for DECam. Ideally it would work for any/all instruments.
I tested it with `/project/mrawls/hits2015-3` and instrumentName = 'DECam' and some `ccdVisitId`s like 42160439 and 41125539, which are (conveniently) the visit and detector smashed together - 421604, 39 and 411255, 39 respectively. It returns things that aren't that.
Hmm, I set up your obs_decam branch and tried the packer on my DECam repo (/project/mrawls/hits2015-3), and it didn't work.