dolfyn.adv.turbulence.TurbBinner¶
-
class
dolfyn.adv.turbulence.
TurbBinner
(n_bin, fs, n_fft=None, n_fft_coh=None)[source]¶ Computes various averages and turbulence statistics from cleaned ADV data.
- Parameters
- n_binint
The length of bin s, in number of points, for this averaging operator.
- n_fftint (optional, default: n_fft = n_bin)
The length of the FFT for computing spectra (must be < n_bin)
-
__init__
(self, n_bin, fs, n_fft=None, n_fft_coh=None)¶ Initialize an averaging object.
- Parameters
- n_binint
the number of data points to include in a ‘bin’ (average).
- n_fftint
the number of data points to use for fft (n_fft`<=`n_bin). Default: n_fft`=`n_bin
- n_fft_cohint
the number of data points to use for coherence and cross-spectra ffts (n_fft_coh`<=`n_bin). Default: n_fft_coh`=`n_bin/6
Methods
__init__
(self, n_bin, fs[, n_fft, n_fft_coh])Initialize an averaging object.
calc_Lint
(self, corr_vel, U_mag[, fs])Calculate integral length scales.
calc_acov
(self, indat[, n_bin])Calculate the auto-covariance of the raw-signal indat.
calc_epsilon_LT83
(self, spec, omega, U_mag)Calculate the dissipation rate from the spectrum.
calc_epsilon_SF
(self, veldat, umag[, fs, …])Calculate epsilon using the “structure function” (SF) method.
calc_epsilon_TE01
(self, advbin, advraw[, …])Calculate the dissipation according to TE01.
calc_lag
(self[, npt, one_sided])calc_omega
(self[, fs, coh])Calculate the radial-frequency vector for the psd’s.
calc_stress
(self, veldat)Calculate the stresses (cross-covariances of u,v,w).
calc_tke
(self, veldat[, noise])Calculate the tke (variances of u,v,w).
calc_vel_cpsd
(self, veldat[, rotate_u, fs, …])Calculate the cross-spectra of velocity components.
calc_vel_psd
(self, veldat[, rotate_u, fs, …])Calculate the psd of velocity.
calc_xcov
(self, indt1, indt2[, npt, n_bin1, …])Calculate the cross-covariance between arrays indt1 and indt2 for each bin.
cohere
(self, dat1, dat2[, window, debias, …])Calculate coherence between dat1 and dat2.
cpsd
(self, dat1, dat2[, fs, window, n_fft, …])Calculate the ‘cross power spectral density’ of dat.
demean
(self, dat[, n_pad, n_bin])Reshape the array dat and remove the mean from each ensemble.
detrend
(self, dat[, n_pad, n_bin])Reshape the array dat and remove the best-fit trend line.
do_avg
(self, rawdat[, outdat, names, n_time])- Parameters
do_cross_spec
(self, indat[, out, names])do_spec
(self, indat[, out, names])do_tke
(self, indat[, out])do_var
(self, rawdat[, outdat, names, suffix])Calculate the variance of data attributes.
mean
(self, dat[, axis, n_bin, mask_thresh])Average an array object.
mean_angle
(self, dat[, axis, units, n_bin, …])Average an angle array.
phase_angle
(self, dat1, dat2[, window, …])Calculate the phase difference between two signals as a function of frequency (complimentary to coherence).
psd
(self, dat[, fs, window, noise, n_bin, …])Calculate ‘power spectral density’ of dat.
reshape
(self, arr[, n_pad, n_bin])Reshape the array arr to shape (…,n,n_bin+n_pad).
std
(self, dat[, n_bin])up_angle
(self, Uh_complex)Calculate the angle of the turbulence fluctuations.
var
(self, dat[, n_bin])