openpiv_cxx.validate.local_difference

openpiv_cxx.validate.local_difference(u, v, threshold_u=3.0, threshold_v=3.0, threshold=None)

Eliminate spurious vectors with a local threshold.

This validation method tests for the local consistency of the data and outliers vector are replaced with NaN (Not a Number) if there are greater than 4 vector differences that exceed the threshold limit. See reference for more details.

Parameters:
  • u (ndarray) – A two dimensional array containing the u velocity component.

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

  • threshold_u (float) – Threshold for u component.

  • threshold_v (float) – Threshold for v component.

  • threshold (float, optional) – Set thresholds for both u and v components.

Returns:

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

Return type:

ndarray