Skip to content

Commit

Permalink
CharacterizeImageTask no longer copies the mask
Browse files Browse the repository at this point in the history
CharacterizeImageTask was making a copy of the mask and restoring
restoring it for each iteration of the "characterize" method.
This was unnecessary because the code that sets the mask planes
in question clears the planes before setting them again.
  • Loading branch information
r-owen committed Apr 29, 2016
1 parent 16042ec commit 52244a0
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions python/lsst/pipe/tasks/characterizeImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,6 @@ def characterize(self, exposure, exposureIdInfo, background=None):
if background is None:
background = BackgroundList()

# make a deep copy of the mask
originalMask = exposure.getMaskedImage().getMask().clone()

# subtract an initial estimate of background level
estBg = estimateBackground(
exposure = exposure,
Expand All @@ -358,11 +355,6 @@ def characterize(self, exposure, exposureIdInfo, background=None):

psfIterations = self.config.psfIterations if self.config.doMeasurePsf else 1
for i in range(psfIterations):
if i > 1:
# restore original mask so that detections and cosmic rays
# are only marked by the final iteration
exposure.getMaskedImage().getMask()[:] = originalMask

dmeRes = self.detectMeasureAndEstimatePsf(
exposure = exposure,
exposureIdInfo = exposureIdInfo,
Expand Down

0 comments on commit 52244a0

Please sign in to comment.