openpiv_cxx.validate.global_std

openpiv_cxx.validate.global_std(u, v, mask=None, std_threshold=3.0, convention='openpiv')

Eliminate spurious vectors with a global threshold defined by the standard deviation

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.

  • mask (ndarray, optional) – A two dimensional array containing the flags for invalid vectors.

  • std_threshold (float) – If the length of the vector (actually the sum of squared components) is larger than std_threshold times standard deviation of the flow field, then the vector is treated as an outlier.

  • convention (str) – Which flag convention to use.

Returns:

  • u (ndarray, optional) – A two dimensional array containing the u velocity component, where spurious vectors have been replaced by NaN if convention is set to ‘openpiv’.

  • v (ndarray, optional) – A two dimensional array containing the v velocity component, where spurious vectors have been replaced by NaN if convention is set to ‘openpiv’.

  • mask (ndarray) – A boolean or integer array where elemtents that = 0 are valid and 1 = invalid.