wradlib.util.despeckle

wradlib.util.despeckle(data, n=3, copy=False)

Remove floating pixels in between NaNs in a multi-dimensional 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.