Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-8467: Wrap lsst_distrib with pybind11 #22

Merged
merged 1 commit into from
Mar 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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