openpiv.validation.global_val
- openpiv.validation.global_val(u: ndarray, v: ndarray, u_thresholds: Tuple[int, int], v_thresholds: Tuple[int, int]) ndarray [source]
Eliminate spurious vectors with a global threshold.
This validation method tests for the spatial consistency of the data and outliers vector are replaced with Nan (Not a Number) if at least one of the two velocity components is out of a specified global range.
- Parameters
u (2d np.ndarray) – a two dimensional array containing the u velocity component.
v (2d np.ndarray) – a two dimensional array containing the v velocity component.
u_thresholds (two elements tuple) – u_thresholds = (u_min, u_max). If
u<u_min
oru>u_max
the vector is treated as an outlier.v_thresholds (two elements tuple) –
v_thresholds = (v_min, v_max)
. Ifv<v_min
orv>v_max
the vector is treated as an outlier.
- Returns
mask – a boolean array. True elements corresponds to outliers.
- Return type
boolean 2d np.ndarray