Struct Morlet
pub struct Morlet { /* private fields */ }Expand description
Morlet Wavelet
The Morlet wavelet is a complex exponential multiplied by a Gaussian window. It provides excellent time-frequency localization.
ψ(t) = π^(-1/4) * exp(iω₀t) * exp(-t²/2)
Implementations§
§impl Morlet
impl Morlet
pub fn with_default_omega() -> Self
pub fn with_default_omega() -> Self
Create Morlet wavelet with default ω₀ = 6.0
Trait Implementations§
§impl ContinuousWavelet for Morlet
impl ContinuousWavelet for Morlet
§fn wavelet_fft(
&self,
buffer: &mut [FftComplex<f64>],
scale: f64,
fft_size: usize,
)
fn wavelet_fft( &self, buffer: &mut [FftComplex<f64>], scale: f64, fft_size: usize, )
Compute Morlet wavelet directly in frequency domain
The Fourier transform of the Morlet wavelet is: Ψ̂(ω) = π^(-1/4) * exp(-(ω - ω₀)²/2) for ω > 0
At scale s, we compute: Ψ̂(s*ω) which shifts the Gaussian peak.
§fn admissibility_constant(&self) -> f64
fn admissibility_constant(&self) -> f64
Morlet admissibility constant.
Closed form (analytic approximation for large ω₀):
C_ψ = π / ω₀ (single-sided integral ∫₀^∞ |Ψ̂(ω)|²/ω dω for
Ψ̂(ω) ∝ exp(−(ω−ω₀)²/2), evaluated by sharp-peak approximation
at ω = ω₀, where 1/ω ≈ 1/ω₀).
Empirical match within 1.7% for ω₀=6 (calibrated by
icwt(cwt(cos)) at fs=1, n=512, scales 1–200, multiple
frequencies — see tests/transforms/cwt_reference.rs). The
residual error is the admissibility-correction term
exp(−ω₀²/2) contribution, negligible for ω₀ ≥ 5.
§fn sst_inversion_constant(&self) -> f64
fn sst_inversion_constant(&self) -> f64
Morlet SST inversion constant
R_ψ = ∫₀^∞ Ψ̂*(ω) dω / ω.
Closed form (analytic approximation for large ω₀):
R_ψ ≈ π^{-1/4} · 2π / ω₀ (sharp-peak integral of
π^{-1/4}·√(2π)·exp(−(ω−ω₀)²/2) / ω at ω = ω₀, where 1/ω ≈ 1/ω₀). With the next-order 1/ω₀² correction this evaluates
to π^{-1/4} · 2π · (1 + 1/(2·ω₀²)) / ω₀ ≈ 0.797 for ω₀=6.
Empirical pure-tone ridge round-trip on Morlet ω₀=6 calibrates to
0.8106, a 1.7% refinement over the closed form that captures
the remaining variation of 1/ω across the Gaussian support.
Used by crate::transform::sswt_extract_component; with this
constant a single-tone SST ridge round-trip on Morlet ω₀=6
reconstructs the input to relative L2 < 0.001 (vs ~0.6 if the
CWT admissibility π/ω₀ is used in its place).
Calibration scope. The 0.8106 / 0.7864 ≈ 1.0308 fine-tune
factor was calibrated against pure-tone ridge round-trip on
Morlet::with_default_omega() (ω₀=6) and is applied uniformly
across ω₀. The (ω-ω₀)/ω₀ correction scales similarly across
ω₀ values large enough for the analytical approximation to be
valid (ω₀ ≥ 5), but for non-default Morlet::new(ω₀)
constructions far from ω₀=6 (e.g. ω₀=4 or ω₀=8) the
ridge-reconstructed amplitude can drift by a few percent.
Same posture as Self::admissibility_constant’s sharp-peak
approximation. Acceptable for ridge tracking and IF analysis
(which are amplitude-insensitive); document the calibration if
you publish reconstructed amplitudes derived from a non-default
ω₀.
§fn wavelet_function(&self, t: f64, scale: f64) -> Complex<f64>
fn wavelet_function(&self, t: f64, scale: f64) -> Complex<f64>
§fn center_frequency(&self) -> f64
fn center_frequency(&self) -> f64
§fn is_complex(&self) -> bool
fn is_complex(&self) -> bool
§fn supports_frequency_domain(&self) -> bool
fn supports_frequency_domain(&self) -> bool
§fn wavelet_function_includes_l2_norm(&self) -> bool
fn wavelet_function_includes_l2_norm(&self) -> bool
wavelet_function already includes the CWT L2 amplitude
factor 1/√a in its return value. Read moreAuto Trait Implementations§
impl Freeze for Morlet
impl RefUnwindSafe for Morlet
impl Send for Morlet
impl Sync for Morlet
impl Unpin for Morlet
impl UnwindSafe for Morlet
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§impl<T> IntoEither for T
impl<T> IntoEither for T
§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.