Skip to content

Commit

Permalink
scaleVariance: fix undefined variable
Browse files Browse the repository at this point in the history
maskVal wasn't defined.
  • Loading branch information
PaulPrice committed Apr 10, 2018
1 parent 1e3c7fe commit 0f5851b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/lsst/pipe/tasks/scaleVariance.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def imageBased(self, maskedImage):
factor : `float`
Variance rescaling factor.
"""
maskVal = maskedImage.mask.getPlaneBitMask(self.config.maskPlanes)
isGood = ((maskedImage.mask.array & maskVal) == 0) & (maskedImage.variance.array > 0)
# Robust measurement of stdev
q1, q3 = np.percentile(maskedImage.image.array[isGood], (25, 75))
Expand Down

0 comments on commit 0f5851b

Please sign in to comment.