[WIP] Shared mask implementation
I started to experiment on a shared mask implementation. Still a number of thing to do/check:
-
Add tests -
Check when the previous mask must be combined with a new one when setting data -
Check if setting values (scalar, ndarray, MaskedArray) on self.data
works as expected (+ check with slices, use hardened mask ?) -
Currently self.var
is still a ndarray, andself.masked_var
must be used to get a MaskedArray. This is on purpose because I think changing this requires a number of changes everywhere in MPDAF, so it should be done in a separate branch. -
Check if it is possible to issue a warning for the old self.mask()
method which is replaced withself.mask_region()
because.mask
is now a property. It seems difficult to do.
One of the benefit of this is that code that currently use self.data.data
could use directly self._data
(and the same for the mask).
How does it look, @laure.piqueras @mcs ?