pyorc.Velocimetry.replace_outliers#

Velocimetry.replace_outliers(v_x='v_x', v_y='v_y', wdw=1, max_iter=1, inplace=False)[source]#

Replace missing values using neighbourhood operators. Use this with caution as it creates data. If many samples in time are available to derive a mean or median velocity from, consider using a reducer on those samples instead of a spatial infilling method such as suggested here.

Parameters:
  • v_x (str, optional) – name of x-directional velocity (default: “v_x”)

  • v_y (str, optional) – name of y-directional velocity (default: “v_y”)

  • wdw (int, optional) – window size used to determine relevant neighbours (default: 1), 1 means a 3x3 window (1 neighbour)

  • max_iter (int, optional) – number of iterations for replacement (default: 1)

  • inplace (boolean, optional) – replace values instead of returning new xr.Dataset (default: False)

Returns:

ds_replaced – velocities with replacements [time, x, y]

Return type:

xr.Dataset