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 wfiltfn. ‘gauss’, ‘mhat’, ‘cmhat’, ‘morlet’, ‘shannon’, ‘hshannon’, ‘hhat’, ‘hhhat’, ‘bump’

N

number of samples to calculate

a

wavelet scale parameter (default = 1)

opt

list of options for wavelet type. See wfiltfn. opt.dt: sampling period, default = 1.

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 fft)

dpsih

derivative of same wavelet, sampled in frequency domain (for fft)

xi

associated fourier domain frequencies of the samples.

See Also

wfiltfn, cwt_fw, cwt_iw.

Examples

tmp <- wfilth("morlet", 1024, 4)
plot(fftshift(tmp$xi/(2*pi)), fftshift(abs(tmp$psih)), type="l", col="blue", xlab="", ylab="")

[Package SynchWave version 1.1.2 Index]