Skip to content

Commit

Permalink
constructCalibs: fix addMissingKeys usage
Browse files Browse the repository at this point in the history
addMissingKeys needs something to start with, so set it to what we already
have, and then add what's missing.
  • Loading branch information
PaulPrice committed Jul 10, 2017
1 parent da22aa7 commit 9e5b9ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/lsst/pipe/drivers/constructCalibs.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ def run(self, expRefList, butler, calibId):
outputIdItemList = list(outputId.items())
for ccdName in ccdIdLists:
dataId = dict([(k, ccdName[i]) for i, k in enumerate(self.config.ccdKeys)])
dataId.update(outputIdItemList)
self.addMissingKeys(dataId, butler)
dataId.update(outputIdItemList)

Expand Down Expand Up @@ -663,6 +664,7 @@ def combine(self, cache, struct, outputId):
"""
# Check if we need to look up any keys that aren't in the output dataId
fullOutputId = {k: struct.ccdName[i] for i, k in enumerate(self.config.ccdKeys)}
fullOutputId.update(outputId)
self.addMissingKeys(fullOutputId, cache.butler)
fullOutputId.update(outputId) # must be after the call to queryMetadata
outputId = fullOutputId
Expand Down

0 comments on commit 9e5b9ab

Please sign in to comment.