quatrope / ProperImage

Proper Image utils for astronomy.
BSD 3-Clause "New" or "Revised" License
26 stars 6 forks source link

Mask to nomask #74

Open BrunoSanchez opened 2 years ago

BrunoSanchez commented 2 years ago

https://github.com/quatrope/ProperImage/blob/a5ee3b74afc27de1a954ae2f9f96c278a4723226/properimage/operations.py#L146

This uses the default parameter shrink=True of np.ma.mask_or and it reduces the mask to a nomask (a single bool, with False) instead of an image sized array with bool or int 1 or 0 values.

BrunoSanchez commented 2 years ago

This would be the solution? np.ma.mask_or(new_img.data.mask, ref_img.data.mask, shrink=False)