Open BrunoSanchez opened 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.
shrink=True
np.ma.mask_or
nomask
bool
False
int
This would be the solution? np.ma.mask_or(new_img.data.mask, ref_img.data.mask, shrink=False)
np.ma.mask_or(new_img.data.mask, ref_img.data.mask, shrink=False)
https://github.com/quatrope/ProperImage/blob/a5ee3b74afc27de1a954ae2f9f96c278a4723226/properimage/operations.py#L146
This uses the default parameter
shrink=True
ofnp.ma.mask_or
and it reduces the mask to anomask
(a singlebool
, withFalse
) instead of an image sized array withbool
orint
1 or 0 values.