wfilth {SynchWave} | R Documentation |
FFT of Wavelet Transform Function
Description
This function outputs the FFT of the wavelet. This code is translated from MATLAB Synchrosqueezing Toolbox, version 1.1 developed by Eugene Brevdo (http://www.math.princeton.edu/~ebrevdo/).
Usage
wfilth(type, N, a, opt)
Arguments
type |
wavelet type. See |
N |
number of samples to calculate |
a |
wavelet scale parameter (default = 1) |
opt |
list of options for wavelet type. See |
Details
This function outputs the FFT of the wavelet of family 'type' with parameters in 'opt', of length N at scale a: (psi(-t/a)).
Note that the output is made so that the inverse fft of the
result is zero-centered in time. This is important for
convolving with the derivative(dpsih). To get the correct
output, perform an ifftshift
. That is,
psi = ifftshift(fft(psih, inverse=TRUE) / length(psih))
,
xfilt = ifftshift(fft(fft(x) * psih, inverse=TRUE) / length(fft(x) * psih))
Value
psih |
wavelet sampling in frequency domain (for use in |
dpsih |
derivative of same wavelet, sampled in frequency domain (for |
xi |
associated fourier domain frequencies of the samples. |
See Also
Examples
tmp <- wfilth("morlet", 1024, 4)
plot(fftshift(tmp$xi/(2*pi)), fftshift(abs(tmp$psih)), type="l", col="blue", xlab="", ylab="")