Enum ContinuousWaveletSpec
#[non_exhaustive]pub enum ContinuousWaveletSpec {
Morlet {
omega: f64,
},
Paul {
order: usize,
},
Dog {
order: usize,
},
}Expand description
Continuous wavelet selector for productized CWT analytics. Each variant
maps to a ferro_wave::transform analytic-friendly continuous wavelet.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Morlet
Morlet wavelet with central frequency omega0 (typical 5–6).
Recommended default for daily EOD phase coherence.
Paul
Paul wavelet of integer order. Asymmetric time localisation; good for modulated oscillation detection.
Order is bounded to 1..=MAX_PAUL_ORDER at config-validate
time. The underlying ComplexPaul evaluates factorial(order)
per cell during normalisation; orders past ~20 risk f64 overflow
(170! is the largest representable factorial), and orders past
the typical practical range (1–10) burn CPU on factorial growth
without changing the wavelet’s qualitative shape.
Dog
Derivative-of-Gaussian wavelet of integer order.
Only order == 2 (the complex Mexican-hat DOG) is supported
today. Arbitrary-order DOG is reserved for a future ferro-wave
release and CwtPhaseCoherenceConfig::validate rejects other
values at config-validate time. The variant carries order in
the API to lock the future contract; serde round-trips of any
order succeed, but only Dog { order: 2 } actually computes.
Implementations§
§impl ContinuousWaveletSpec
impl ContinuousWaveletSpec
pub fn fourier_factor(self) -> f64
pub fn fourier_factor(self) -> f64
Canonical Fourier factor λ/s relating wavelet scale s to the
equivalent Fourier period λ = (λ/s)·s, from Torrence & Compo (1998),
“A Practical Guide to Wavelet Analysis”, BAMS 79(1), Table 1:
- Morlet(ω₀):
4π / (ω₀ + √(2 + ω₀²))— for ω₀=6 this is ≈1.03304. - Paul(m):
4π / (2m + 1). - DOG(m):
2π / √(m + ½)— for m=2 (Mexican hat) ≈3.97384.
A target analysis period P therefore maps to scale s = P / (λ/s).
The earlier implementation used the naive peak-frequency relation
λ/s = 2π/ω₀ (≈1.0472 for ω₀=6), biasing the scale–period map by ~1.4%.
Trait Implementations§
§impl Clone for ContinuousWaveletSpec
impl Clone for ContinuousWaveletSpec
§fn clone(&self) -> ContinuousWaveletSpec
fn clone(&self) -> ContinuousWaveletSpec
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ContinuousWaveletSpec
impl Debug for ContinuousWaveletSpec
§impl Default for ContinuousWaveletSpec
impl Default for ContinuousWaveletSpec
§impl PartialEq for ContinuousWaveletSpec
impl PartialEq for ContinuousWaveletSpec
impl Copy for ContinuousWaveletSpec
impl StructuralPartialEq for ContinuousWaveletSpec
Auto Trait Implementations§
impl Freeze for ContinuousWaveletSpec
impl RefUnwindSafe for ContinuousWaveletSpec
impl Send for ContinuousWaveletSpec
impl Sync for ContinuousWaveletSpec
impl Unpin for ContinuousWaveletSpec
impl UnwindSafe for ContinuousWaveletSpec
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.