openpiv_cxx.validate.sig2noise_val

openpiv_cxx.validate.sig2noise_val(u, v, s2n, threshold=1.05, mask=None, convention='openpiv')

Eliminate spurious vectors from cross-correlation signal to noise ratio.

Replace spurious vectors with zero if signal to noise ratio is below a specified threshold.

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

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

  • s2n (ndarray) – A two dimensional array containing the value of the signal to noise ratio from cross-correlation function.

  • threshold (float) – The signal to noise ratio threshold value.

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

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

Returns:

  • u (ndarray) – 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) – 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.

References

    1. Keane and R. J. Adrian, Measurement Science & Technology, 1990, 1, 1202-1215.