Skip to content

Commit

Permalink
Remove NaN weights. I do not know how this happens, and it seems to b…
Browse files Browse the repository at this point in the history
…e very rare, but it did happen.
  • Loading branch information
keflavich committed Oct 1, 2024
1 parent 51379b1 commit 2f67e7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reproject/mosaicking/coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def reproject_and_coadd(

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

Expand Down

0 comments on commit 2f67e7d

Please sign in to comment.