calibRoot needs to be specified for the input mapper

XMLWordPrintable

Details

• Type: Bug
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s: None
• Labels:
None
• Story Points:
0.5
• Team:
Data Facility

Description

While trying to adapt the dax-generating script to another butler repo other than the data repo of ci_hsc, I encountered a lookup error while attempting to get the path of a bias file, like this:

 workflow DEBUG: Finding bias with {'ccd': 0, 'visit': 628} Traceback (most recent call last):  File "generateDax.py", line 155, in   dax = generateProcessCcdDax("HscDax", visits, ccdList)  File "generateDax.py", line 124, in generateProcessCcdDax  create=True, replaceRootPath=calibRepo)  File "generateDax.py", line 60, in getDataFile  fileEntry = lfn = filePath = mapFunc(dataId).getLocations()[0]  File "/software/lsstsw/stack/Linux64/obs_base/12.1-21-gbdb6c2a+4/python/lsst/obs/base/cameraMapper.py", line 379, in mapClosure  return mapping.map(mapper, dataId, write)  File "/software/lsstsw/stack/Linux64/obs_base/12.1-21-gbdb6c2a+4/python/lsst/obs/base/mapping.py", line 124, in map  actualId = self.need(iter(self.keyDict.keys()), dataId)  File "/software/lsstsw/stack/Linux64/obs_base/12.1-21-gbdb6c2a+4/python/lsst/obs/base/mapping.py", line 260, in need  (newProps, newId, len(lookups))) RuntimeError: No unique lookup for ['calibDate'] from {'ccd': 0, 'visit': 628}: 0 matches 

Adding calibRoot to the input mapper solves the error and Butler/Mapper can then find the calibration data.

This bug didn't show up in the two examples currently in master, probably because there is only one set of calibration data in ci_hsc (only one 'calibDate' in the registry).

Activity

Hide
Hsin-Fang Chiang added a comment -

Do you mind taking a look? Should be quick.

You once asked the role of "calibRepo" in the dax-generating script. I should have realized this bug back then.

This patch makes no difference for the current "ciHsc" and "miniHscDrp" workflows, but I think it's still better to fix it to make it more correct. I compared the generated dax files before and after this patch, and they are the same.

Show
Hsin-Fang Chiang added a comment - Do you mind taking a look? Should be quick. You once asked the role of "calibRepo" in the dax-generating script. I should have realized this bug back then. This patch makes no difference for the current "ciHsc" and "miniHscDrp" workflows, but I think it's still better to fix it to make it more correct. I compared the generated dax files before and after this patch, and they are the same.
Hide
Mikolaj Kowalik added a comment -

Changes reviewed and approved.

Show
Mikolaj Kowalik added a comment - Changes reviewed and approved.
Hide
Hsin-Fang Chiang added a comment -

Thank you for the review.

Merged.

Show
Hsin-Fang Chiang added a comment - Thank you for the review. Merged.

People

Assignee:
Hsin-Fang Chiang
Reporter:
Hsin-Fang Chiang
Reviewers:
Mikolaj Kowalik
Watchers:
Hsin-Fang Chiang, Mikolaj Kowalik