diff --git a/python/lsst/ip/diffim/subtractImages.py b/python/lsst/ip/diffim/subtractImages.py index 976b3fbf..5df4501a 100644 --- a/python/lsst/ip/diffim/subtractImages.py +++ b/python/lsst/ip/diffim/subtractImages.py @@ -582,11 +582,11 @@ def finalize(self, template, science, difference, kernel, deltaMaskPlaneTemplate = 2**(diffInjectedTemplateMaskPlane - templateFakeMaskPlane) # get the arrays from the template and science that are flagged as FAKE - injectedScienceMaskArray = (science.mask.array & scienceFakeBitMask) * deltaMaskPlaneScience - injectedTemplateMaskArray = (template[bbox].mask.array & templateFakeBitMask) * deltaMaskPlaneTemplate + injScienceMaskArray = (science.mask.array & scienceFakeBitMask) * deltaMaskPlaneScience + injTemplateMaskArray = (template[bbox].mask.array & templateFakeBitMask) * deltaMaskPlaneTemplate - mask.array |= injectedScienceMaskArray - mask.array |= injectedTemplateMaskArray + mask.array |= injScienceMaskArray + mask.array |= injTemplateMaskArray # We have cleared the template mask plane, so copy the mask plane of # the image difference so that we can calculate correct statistics @@ -745,7 +745,6 @@ def _checkMask(mask, sources, badMaskPlanes): maskPlane for maskPlane in badMaskPlanes if maskPlane in mask.getMaskPlaneDict().keys() ] - #badPixelMask = lsst.afw.image.Mask.getPlaneBitMask(badMaskPlanes) badPixelMask = mask.getPlaneBitMask(setBadMaskPlanes) xv = np.rint(sources.getX() - mask.getX0())