xoa.filter.erode_mask¶
-
xoa.filter.erode_mask(data, until=1, kernel=None, xdim=None, ydim=None)[source]¶ Erode the horizontal mask using smoothing
Missing values are filled with the smoothed field in a iterative way. Two cases:
Erode a fixed number of times.
Erode the data mask until there is no missing value where a given horirizontal mask is False.
- Parameters
data (xarray.DataArray) – Array of at least 2 dimensions, that are supposed to be horizontal.
until (array_like, int) – Either a minimal mask, or a max number of iteration.
kernel – Defaults to a
shapirokernel. In this case,xdimandydimcan be set to the horizontal dimensions, otherwise they are inferred. Ifkernelis provided, it must a compatible withgenerate_kernel().Return –
xarray.DataArray – Data array similar to input array, with its eroded along x and y dimensions.