syncopy.specest.wavelet.get_optimal_wavelet_scales¶
- syncopy.specest.wavelet.get_optimal_wavelet_scales(scale_from_period, nSamples, dt, dj=0.25, s0=None)[source]¶
Local helper to compute an “optimally spaced” set of scales for wavelet analysis
- Parameters
scale_from_period (func) – Function to convert periods to Wavelet specific scales.
nSamples (int) – Sample-count (i.e., length) of time-series that is analyzed
dt (float) – Time-series step-size; temporal spacing between consecutive samples (1 / sampling rate)
dj (float) – Spectral resolution of scales. The choice of dj depends on the spectral width of the employed wavelet function. For instance,
dj = 0.5
is the largest value that still yields adequate sampling in scale for the Morlet wavelet. Other wavelets allow larger values of dj while still providing sufficient spectral resolution. Small values of dj yield finer scale resolution.s0 (float or None) – Smallest resolvable scale; should be chosen such that the equivalent Fourier period is approximately
2 * dt
. If None, s0 is computed to satisfy this criterion.
- Returns
scales – Set of scales to use in the wavelet transform, ordered from high(low) scale(frequency) to low(high) scale(frequency)
- Return type
Notes
The calculation of an “optimal” set of scales follows [ToCo98]. This routine is a local auxiliary method that is purely intended for internal use. Thus, no error checking is performed.
- ToCo98
C. Torrence and G. P. Compo. A Practical Guide to Wavelet Analysis. Bulletin of the American Meteorological Society. Vol. 79, No. 1, January 1998.
See also
syncopy.specest.wavelet.wavelet
computeFunction()
performing time-frequency analysis using non-orthogonal continuous wavelet transform