Wavelet transform
The continuous wavelet transform is just the convolution of some time-series $$x(t)$$ with some dilated (by $$b$$) and scaled (by $$a$$) kernel $$g(\frac{t-b}{a})$$. The latter is the so-called mother wavelet. That is, the continuous wavelet transform is defined as
where $$z^*$$ denotes the complex conjugate of $$z$$.
The ContinuousWavelet
package implements planned wavelet transforms. That is, the scaled kernels for each voice are pre-computed to save some time when computing several wavelet transforms using the same kernel on the same scales. These pre-computed kernels are stored in the ContinuousWaveletTransform
object, representing a planned transform.
ContinuousWavelet.ContinuousWaveletTransform
— TypeThis struct represents a planned continuous wavelet transform. It contains the voices on which the transform is performed as well the pre-computed analysis wavelets.
Fields
wavelet
: Holds a reference to the wavelet to use for the transformation.blocks
: The grouping of the voices of same kernel size for faster block-convolution.scales
: The scales on which the wavelet transform will be performed.kernels
: Matrix of evaluated kernels for the convolution.
ContinuousWavelet.ContinuousWaveletTransform
— MethodContinuousWaveletTransform(wav::GenericContinuousWavelet, scales::AbstractVector)
Constructs a new wavelet transform for the given wavelet (wav
) and scales
. This constructor pre-computes the kernels for the given scales. It is therefore efficient to perform several transformations using transform()
with the same ContinuousWaveletTransform
object.
The actual wavelet transform is then performed by the transform
method.
ContinuousWavelet.transform
— Methodtransform(trans::ContinuousWaveletTransform, x::AbstractArray{Float64,1})
Performes the planned continuous wavelet transfrom given by trans
of the timeseries x
. The result is a ContinuousWavelet.ContinuousWaveletTransformed
object.
Wavelet transformed
The result of a continuous wavelet transform is stored in a ContinuousWavelet.ContinuousWaveletTransformed
object. This object extends AbstractArray{Float64, 2}
, thus the coefficients of the wavelet transformed can be accessed directly. Additionally, specialized methods are provided for plotting the wavelet transformed.
ContinuousWavelet.ContinuousWaveletTransformed
— TypeRepresents a wavelet transformed. Beside the wavelet coefficients, this object contains additional information about the wavelet transformed including the scales at which the transform was performed as well as the wavelet used. This object extends AbstractArray{Complex{Float64}, 2}
thus allowing for direct access to the wavelet coefficients. Each voice is stored as a column, thus the number of rows matches the number of samples of the original time-series.
Fields
wX
: The actual wavelet coefficients, each column represents a single voice.scales
: The scales at which the wavelet transform was performed.wavelet
: The wavelet of the transform.
Missing docstring for Plots.contourf(A::ContinuousWaveletTransformed; drawvalid=true, shadevalid=true, kw...)
. Check Documenter's build log for details.