Skip to content

Commit

Permalink
Merge branch 'tickets/DM-8462' into tickets/DM-8467
Browse files Browse the repository at this point in the history
  • Loading branch information
r-owen committed Feb 14, 2017
2 parents 07ace30 + fc46a81 commit c3f7d43
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions python/lsst/pipe/drivers/constructCalibs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
class CalibStatsConfig(Config):
"""Parameters controlling the measurement of background statistics"""
stat = Field(doc="Statistic to use to estimate background (from lsst.afw.math)", dtype=int,
default=afwMath.MEANCLIP)
default=int(afwMath.MEANCLIP))
clip = Field(doc="Clipping threshold for background",
dtype=float, default=3.0)
nIter = Field(doc="Clipping iterations for background",
Expand Down Expand Up @@ -72,7 +72,7 @@ class CalibCombineConfig(Config):
mask = ListField(doc="Mask planes to respect", dtype=str,
default=["SAT", "DETECTED", "INTRP"])
combine = Field(doc="Statistic to use for combination (from lsst.afw.math)", dtype=int,
default=afwMath.MEANCLIP)
default=int(afwMath.MEANCLIP))
clip = Field(doc="Clipping threshold for combination",
dtype=float, default=3.0)
nIter = Field(doc="Clipping iterations for combination",
Expand Down Expand Up @@ -162,9 +162,8 @@ def combine(self, target, imageList, stats):
@param imageList List of input images
@param stats Statistics control
"""
images = afwImage.vectorMaskedImageF(
[img for img in imageList if img is not None])
afwMath.statisticsStack(target, images, self.config.combine, stats)
images = [img for img in imageList if img is not None]
afwMath.statisticsStack(target, images, afwMath.Property(self.config.combine), stats)


def getSize(dimList):
Expand Down Expand Up @@ -705,7 +704,7 @@ def run(*args, **kwargs):

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

return combined
Expand Down

0 comments on commit c3f7d43

Please sign in to comment.