wradlib.util.despeckle

Contents

wradlib.util.despeckle#

wradlib.util.despeckle(data, *, n=3, copy=False)[source]#
wradlib.util.despeckle(obj: DataArray, **kwargs)

Remove floating pixels in between NaNs in a multidimensional array.

Warning

This function changes the original input array if argument copy is set to False (default).

Parameters:
  • data (numpy.ndarray) – Note that the range dimension must be the last dimension of the input array.

  • n (int) – (must be either 3 or 5, 3 by default), Width of the window in which we check for speckle

  • copy (bool) – If True, the input array will remain unchanged.