Skip to content

Commit

Permalink
Improves default fallback for defect interpolation
Browse files Browse the repository at this point in the history
There is no reason to calculate the default value
from the image when there is a masked image in hand.
The statistics should take into account the mask
if possible.
  • Loading branch information
SimonKrughoff committed Oct 30, 2014
1 parent bbc42e8 commit a6041f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/lsst/ip/isr/isr.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def interpolateDefectList(maskedImage, defectList, fwhm, fallbackValue=None):
"""
psf = createPsf(fwhm)
if fallbackValue is None:
fallbackValue = afwMath.makeStatistics(maskedImage.getImage(), afwMath.MEANCLIP).getValue()
fallbackValue = afwMath.makeStatistics(maskedImage, afwMath.MEANCLIP).getValue()
if 'INTRP' not in maskedImage.getMask().getMaskPlaneDict().keys():
maskedImage.getMask.addMaskPlane('INTRP')
measAlg.interpolateOverDefects(maskedImage, psf, defectList, fallbackValue)
Expand Down

1 comment on commit a6041f1

@PaulPrice
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it actually use the mask when you haven't configured it with setAndMask?

Please sign in to comment.