myimagelib.corrLib.corrS¶
- myimagelib.corrLib.corrS(X, Y, U, V)¶
Compute the spatial autocorrelations of a velocity field.
- Parameters
X,Y,U,V (2d arrays) – the result of PIV analysis. Each is a 2D array. Use
pivLib.read_piv()
to construct thses arrays from PIV data files.- Returns
x, y, CA, CV – The angle autocorrelation (CA) and velocity autocorrelation (CV). x, y are the associated distances.
Note
We only consider half of the length in each dimension, so x, y are different from the input X, Y.
Edit
Dec 13, 2021 – i) Replace all the mean() function to nanmean, to handle masked PIV data. ii) Add doc string.
Dec 15, 2021 – if norm vsqrt is 0, set it to np.nan to avoid divided by zero warning!
Dec 16, 2021 – Shift the output X, Y origin to 0, 0, so that 0 distance will have the correlation function = 1. More intuitive.
Jan 05, 2023 – Adapt myimagelib import style.