ContinuousWaveletSpec

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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Morlet

Morlet wavelet with central frequency omega0 (typical 5–6). Recommended default for daily EOD phase coherence.

Fields

§omega: f64

Central angular frequency ω₀ of the Morlet wavelet.

§

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.

Fields

§order: usize

Paul wavelet order parameter (m).

§

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.

Fields

§order: usize

DOG order parameter (must be 2 for now).

Implementations§

§

impl ContinuousWaveletSpec

pub fn as_str(self) -> &'static str

Stable wire-friendly identifier.

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

§

fn clone(&self) -> ContinuousWaveletSpec

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for ContinuousWaveletSpec

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl Default for ContinuousWaveletSpec

§

fn default() -> Self

Returns the “default value” for a type. Read more
§

impl PartialEq for ContinuousWaveletSpec

§

fn eq(&self, other: &ContinuousWaveletSpec) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Copy for ContinuousWaveletSpec

§

impl StructuralPartialEq for ContinuousWaveletSpec

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoEither for T

§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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>
where F: FnOnce(&Self) -> bool,

Converts 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

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,