Class WaveletTransformContinuous
An implementation of Continuous Wavelet Transform (CWT) using the Haar wavelet.
For details on the Haar wavelet, and the source for the details in this code,
read "WAVELETS FOR KIDS, A Tutorial Introduction", by Brani Vidakovic and Peter Mueller, Duke University.
WARNING: This article on the Haar wavelet is NOT for kids!.
Inheritance
WaveletTransformContinuous
Assembly: TowseyLibrary.dll
public class WaveletTransformContinuous
Constructors
|
Improve this Doc
View Source
Initializes a new instance of the WaveletTransformContinuous class.
The signal can be any length. Need not be power of 2 in length.
Declaration
public WaveletTransformContinuous(double[] signal, int maxScale)
Parameters
Fields
|
Improve this Doc
View Source
Declaration
public static double[] Daubechies_D10
Field Value
|
Improve this Doc
View Source
Declaration
public static double[] Daubechies_D12
Field Value
|
Improve this Doc
View Source
Declaration
public static double[] Daubechies_D14
Field Value
|
Improve this Doc
View Source
Declaration
public static double[] Daubechies_D16
Field Value
|
Improve this Doc
View Source
Declaration
public static double[] Daubechies_D18
Field Value
|
Improve this Doc
View Source
Declaration
public static double[] Daubechies_D2
Field Value
|
Improve this Doc
View Source
Declaration
public static double[] Daubechies_D20
Field Value
|
Improve this Doc
View Source
Declaration
public static double[] Daubechies_D4
Field Value
|
Improve this Doc
View Source
Declaration
public static double[] Daubechies_D6
Field Value
|
Improve this Doc
View Source
Declaration
public static double[] Daubechies_D8
Field Value
|
Improve this Doc
View Source
Declaration
public const double SQRT2 = 1.4142135623730951
Field Value
Properties
|
Improve this Doc
View Source
Declaration
public int MaxScale { get; }
Property Value
Methods
|
Improve this Doc
View Source
These examples are used to do Wavelet Packet Decomposition on test signals to which noise can be added.
Declaration
public static void ExampleOfWavelets_1()
|
Improve this Doc
View Source
Declaration
public static double[, ] GetFrequencyByOscillationsMatrix(double[] signal, int fftWindowWidth, int wpdLevelNumber)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public double[, ] GetScaleTimeMatrix()
Returns
|
Improve this Doc
View Source
The wavelet coefficients are derived by reversing the order of the scaling function coefficients and then reversing the sign of every second one,
(i.e., D4 wavelet = {-0.1830127, -0.3169873, 1.1830127, -0.6830127}).
Mathematically, this looks like b_k = (-1)^{k} a_{N - 1 - k}
where
k is the coefficient index,
b is a coefficient of the wavelet sequence and a a coefficient of the scaling sequence.
N is the wavelet index, i.e., 2 for D2.
Declaration
public static double[] GetWaveletCoefficients(double[] Daubechies_DN)
Parameters
Type |
Name |
Description |
Double[] |
Daubechies_DN |
|
Returns
|
Improve this Doc
View Source
Declaration
public static double GetWaveletCoefficients(double[] sampleArray, double[] wavelet)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public static double HaarDifference(double[] sampleArray)
Parameters
Type |
Name |
Description |
Double[] |
sampleArray |
|
Returns
|
Improve this Doc
View Source
implements the Haar high pass filter.
Declaration
public static double[] HiPassAndDecimate(double[] signal)
Parameters
Type |
Name |
Description |
Double[] |
signal |
|
Returns
|
Improve this Doc
View Source
implements the Haar low pass filter.
Declaration
public static double[] LowPassAndDecimate(double[] signal)
Parameters
Type |
Name |
Description |
Double[] |
signal |
|
Returns
|
Improve this Doc
View Source
Declaration
public static double[, ] ProcessScaleTimeMatrix(double[, ] inputM, int minOscilCount)
Parameters
Type |
Name |
Description |
Double[,] |
inputM |
|
Int32 |
minOscilCount |
|
Returns
|
Improve this Doc
View Source
Declaration
public static List<double[]> ReadDaubechiesCoefficients()
Returns
Extension Methods