Skip to content

Commit

Permalink
DarkCombineTask: fix setting of metadata
Browse files Browse the repository at this point in the history
DM-8913 changed DarkCombineTask to use VisitInfo, but this assumed
that the combined variable is an Exposure, but it's actually a
DecoratedImage, which broke the dark creation. Fixed by using a
different means to get the metadata in.
  • Loading branch information
PaulPrice committed Jan 19, 2017
1 parent bea4d68 commit b388690
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/lsst/pipe/drivers/constructCalibs.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,12 @@ class DarkCombineTask(CalibCombineTask):
"""Task to combine dark images"""
def run(*args, **kwargs):
combined = CalibCombineTask.run(*args, **kwargs)
combined.getInfo().setVisitInfo(afwImage.makeVisitInfo(exposureTime=1.0, darkTime=1.0))

# Update the metadata
visitInfo = afwImage.makeVisitInfo(exposureTime=1.0, darkTime=1.0)
md = dafBase.PropertyList.cast(combined.getMetadata())
afwImage.setVisitInfoMetadata(md, visitInfo)

return combined

class DarkConfig(CalibConfig):
Expand Down

0 comments on commit b388690

Please sign in to comment.