ShannonWavelet<T>
Models & Types · AiDotNet.WaveletFunctions
Represents a Shannon wavelet function implementation for signal processing and frequency analysis.
Inheritance: WaveletFunctionBase<T> → ShannonWavelet<T>
For Beginners
The Shannon wavelet is like a specialized frequency analyzer.
Think of the Shannon wavelet as a musical tuning fork that:
- Can precisely identify specific frequencies in your data
- Has perfect frequency localization (it knows exactly which frequencies are present)
- Is less precise about when those frequencies occur in the signal
This wavelet is particularly useful when you need to know exactly which frequencies are in your data, but don’t need to know precisely when they occur. It’s like having a perfect pitch detector that can tell you exactly which notes are being played, but is less precise about when each note starts and stops.
How It Works
The Shannon wavelet is a band-limited wavelet that is perfectly localized in the frequency domain. It is defined as the product of a sinc function and a cosine modulation. This wavelet is particularly useful for signal analysis where precise frequency localization is required, though it has poor time localization due to the slow decay of the sinc function.
Example
using AiDotNet.WaveletFunctions;
var wavelet = new ShannonWavelet<double>();
double value = wavelet.Calculate(0.5);
Console.WriteLine($"ShannonWavelet: psi(0.5) = {value:F4}");
Constructors
| Constructor | Summary |
|---|---|
ShannonWavelet() |
Initializes a new instance of the ShannonWavelet class. |
Methods
| Method | Summary |
|---|---|
T Calculate(T x) |
Calculates the Shannon wavelet function value at the specified point. |
ValueTuple<Vector<T>, Vector<T>> Decompose(Vector<T> input) |
Decomposes an input signal using the Shannon wavelet transform. |
Vector<T> GetScalingCoefficients() |
Gets the scaling coefficients used in the Shannon wavelet transform. |
Vector<T> GetWaveletCoefficients() |
Gets the wavelet coefficients used in the Shannon wavelet transform. |
Vector<T> Reconstruct(Vector<T> approximation, Vector<T> detail, int? originalLength) |
Reconstructs the original signal from approximation and detail coefficients. |