Skip to content

Commit

Permalink
Act on copy of this mask array
Browse files Browse the repository at this point in the history
  • Loading branch information
rosteen committed Dec 3, 2024
1 parent 572e716 commit 1b8e647
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def _extract_from_aperture(self, cube, uncert_cube, mask_cube, aperture,

# Also apply the cube's original mask array
if mask_cube:
mask_from_cube = mask_cube.get_component('flux').data
mask_from_cube = mask_cube.get_component('flux').data.copy()
# Some mask cubes have NaNs where they are not masked instead of 0
mask_from_cube[np.where(np.isnan(mask_from_cube))] = 0
mask = np.logical_or(mask, mask_from_cube.astype('bool'))
Expand Down

0 comments on commit 1b8e647

Please sign in to comment.