myimagelib.corrLib.energy_spectrum
- myimagelib.corrLib.energy_spectrum(pivData, d=8.25)
Compute energy spectrum (E vs k) from pivData.
- Parameters:
pivData – piv data
d – sample spacing. This is the distance between adjacent samples, for example, velocities in PIV. The resulting frequency space has the unit which is inverse of the unit of d. The default unit of d is um.
- Returns:
energy spectrum, DataFrame (k, E)
- Return type:
pandas.DataFrame
>>> from myimagelib import energy_spectrum >>> es = energy_spectrum(pivData, d=25*0.33)
Edit
Oct 19, 2020 – add argument d as sample spacing
Nov 11, 2020 – add area constant, see details here
Nov 30, 2020 – The energy spectrum calculated by this function shows a factor of ~3 difference when comparing int E(k) dk with v**2.sum()/2