openpiv_cxx.validate.global_val

openpiv_cxx.validate.global_val(u, v, u_thresholds=[-10, 10], v_thresholds=[-10, 10])

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 (ndarray) – A two dimensional array containing the u velocity component.

  • v (ndarray) – A two dimensional array containing the v velocity component.

  • u_thresholds (tuple) – u_thresholds = (u_min, u_max). If u < u_min or u > u_max the vector is treated as an outlier.

  • v_thresholds (tuple) – v_thresholds = (v_min, v_max). If v < v_min or v > v_max the vector is treated as an outlier.

Returns:

mask – An integer array where elemtents that = 0 are valid and 1 = invalid.

Return type:

ndarray