Skip to content

Commit 2f67e7d

Browse files
committed
Remove NaN weights. I do not know how this happens, and it seems to be very rare, but it did happen.
1 parent 51379b1 commit 2f67e7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: reproject/mosaicking/coadd.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def reproject_and_coadd(
358358

359359
# For the purposes of mosaicking, we mask out NaN values from the array
360360
# and set the footprint to 0 at these locations.
361-
reset = np.isnan(array)
361+
reset = np.isnan(array) | np.isnan(weights)
362362
array[reset] = 0.0
363363
footprint[reset] = 0.0
364364

0 commit comments

Comments
 (0)