Struct MexicanHat
pub struct MexicanHat { /* private fields */ }Expand description
Mexican Hat (Ricker) Wavelet
The Mexican Hat wavelet is the negative normalized second derivative of a Gaussian function. It’s real-valued and symmetric.
ψ(t) = (2/(√3σ π^(1/4))) * (1 - t²/σ²) * exp(-t²/2σ²)
Implementations§
§impl MexicanHat
impl MexicanHat
pub fn with_default_sigma() -> Self
pub fn with_default_sigma() -> Self
Create Mexican Hat wavelet with default σ = 1.0
Trait Implementations§
§impl Clone for MexicanHat
impl Clone for MexicanHat
§fn clone(&self) -> MexicanHat
fn clone(&self) -> MexicanHat
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl ContinuousWavelet for MexicanHat
impl ContinuousWavelet for MexicanHat
§fn admissibility_constant(&self) -> f64
fn admissibility_constant(&self) -> f64
Mexican Hat admissibility constant.
Closed form: C_ψ = (4√π / 3) · σ. The σ factor comes from the
L2-normalized wavelet’s FT-scaling property:
for ψ_σ(t) = (1/√σ)·ψ(t/σ), the FT is Ψ̂_σ(ω) = √σ · Ψ̂(σω),
so |Ψ̂_σ(ω)|² = σ · |Ψ̂(σω)|² and under the substitution
u = σω the admissibility integral becomes
∫₀^∞ |Ψ̂_σ(ω)|²/ω dω = σ · ∫₀^∞ |Ψ̂(u)|²/u du = σ · (4√π/3).
For the canonical σ=1, this matches the previous value of
4√π/3 ≈ 2.363 (empirical match within 0.3%).
For σ ≠ 1, this gives σ·(4√π/3) — important for
MexicanHat::new(σ) with non-default width, where the
previous σ-invariant formula made icwt reconstruct at ~σ× gain.
§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 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 more§fn supports_frequency_domain(&self) -> bool
fn supports_frequency_domain(&self) -> bool
§fn sst_inversion_constant(&self) -> f64
fn sst_inversion_constant(&self) -> f64
R_ψ = ∫₀^∞ Ψ̂*(ω) dω / ω, used by
crate::transform::sswt_extract_component to recover an
EMD-like component from an SST ridge. Read more§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, )
§impl Debug for MexicanHat
impl Debug for MexicanHat
Auto Trait Implementations§
impl Freeze for MexicanHat
impl RefUnwindSafe for MexicanHat
impl Send for MexicanHat
impl Sync for MexicanHat
impl Unpin for MexicanHat
impl UnwindSafe for MexicanHat
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.