Skip to content

Commit b0766d3

Browse files
committed
Also catch and remove INF variance
1 parent 1a648c5 commit b0766d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python/lsst/ip/diffim/getTemplate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def _merge(maskedImages, bbox, wcs):
416416
weights = afwImage.ImageF(bbox)
417417
for maskedImage in maskedImages:
418418
# Catch both zero-value and NaN variance plane pixels
419-
good = maskedImage.variance.array > 0
419+
good = (maskedImage.variance.array > 0) & (np.isfinite(maskedImage.variance.array))
420420
weight = maskedImage.variance.array[good]**(-0.5)
421421
bad = np.isnan(maskedImage.image.array) | ~good
422422
# Note that modifying the patch MaskedImage in place is fine;

0 commit comments

Comments
 (0)