xoa.filter.erode_mask
- xoa.filter.erode_mask(data, until=1, kernel=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 (xarray.DataArray, int) – Either a minimal mask, or a max number of iteration.
kernel (None, "shapiro", xarray.DataArray) – Defaults to a
shapiro
kernel designed with all data dimensions. Ifkernel
is provided, it must a compatible withgenerate_kernel()
.
- Returns:
xarray.DataArray – Data array similar to input array, with its eroded along x and y dimensions.
See also
erode_coast
,sharpiro_kernel