Version: | 2.6-5 |
Date: | 2022-10-18 |
Title: | Time-Frequency Analysis of 1-D Signals |
Author: | Rene Carmona [aut], Bruno Torresani [aut], Brandon Whitcher [ctb], Andrea Wang [ctb], Wen-Liang Hwang [ctb], Robert Alberts [ctb], Jonathan M. Lees [ctb, cre] |
Maintainer: | Jonathan M. Lees <jonathan.lees@unc.edu> |
Depends: | R (≥ 2.14) |
Description: | A set of R functions which provide an environment for the Time-Frequency analysis of 1-D signals (and especially for the wavelet and Gabor transforms of noisy signals). It was originally written for Splus by Rene Carmona, Bruno Torresani, and Wen L. Hwang, first at the University of California at Irvine and then at Princeton University. Credit should also be given to Andrea Wang whose functions on the dyadic wavelet transform are included. Rwave is based on the book: "Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S", by Rene Carmona, Wen L. Hwang and Bruno Torresani (1998, eBook ISBN:978008053942), Academic Press. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Copyright: | University of California |
URL: | https://carmona.princeton.edu/TFbook/tfbook.html, https://r-forge.r-project.org/projects/rwave/ |
Packaged: | 2022-10-20 16:53:19 UTC; lees |
Repository: | CRAN |
Date/Publication: | 2022-10-21 23:17:49 UTC |
NeedsCompilation: | yes |
Transient Signal
Description
Transient signal.
Usage
data(A0)
Format
A vector containing 1024 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(A0)
plot.ts(A0)
Transient Signal
Description
Transient signal.
Usage
data(A4)
Format
A vector containing 1024 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(A4)
plot.ts(A4)
Transient Signal
Description
Transient signal.
Usage
data(B0)
Format
A vector containing 1024 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(B0)
plot.ts(B0)
Transient Signal
Description
Transient signal.
Usage
data(B4)
Format
A vector containing 1024 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(B4)
plot.ts(B4)
Transient Signal
Description
Transient signal.
Usage
data(C0)
Format
A vector containing 1024 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(C0)
plot.ts(C0)
Transient Signal
Description
Transient signal.
Usage
data(C4)
Format
A vector containing 1024 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(C4)
plot.ts(C4)
Transient Signal
Description
Transient signal.
Usage
data(D0)
Format
A vector containing 1024 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(D0)
plot.ts(D0)
Transient Signal
Description
Transient signal.
Usage
data(D4)
Format
A vector containing 1024 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(D4)
plot.ts(D4)
Continuous Wavelet Transform with derivative of Gaussian
Description
Computes the continuous wavelet transform with for (complex-valued) derivative of Gaussian wavelets.
Usage
DOG(input, noctave, nvoice=1, moments, twoD=TRUE, plot=TRUE)
Arguments
input |
input signal (possibly complex-valued). |
noctave |
number of powers of 2 for the scale variable. |
moments |
number of vanishing moments of the wavelet (order of the derivative). |
nvoice |
number of scales in each octave (i.e. between two consecutive powers of 2) |
twoD |
logical variable set to T to organize the output as a 2D array (signal_size x nb_scales), otherwise, the output is a 3D array (signal_size x noctave x nvoice) |
plot |
if set to T, display the modulus of the continuous wavelet transform on the graphic device |
Details
The output contains the (complex) values of the wavelet transform of the input signal. The format of the output can be
2D array (signal_size x nb_scales)
3D array (signal_size x noctave x nvoice)
Value
continuous (complex) wavelet transform
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Examples
x <- 1:512
chirp <- sin(2*pi * (x + 0.002 * (x-256)^2 ) / 16)
DOG(chirp, noctave=5, nvoice=12, 3, twoD=TRUE, plot=TRUE)
Heart Rate Data
Description
Successive beat-to-beat intervals for a normal patient.
Usage
data(Ekg)
Format
A vector containing 16,042 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(Ekg)
plot.ts(Ekg)
How Are You?
Description
Example of speech signal.
Usage
data(HOWAREYOU)
Format
A vector containing 5151 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(HOWAREYOU)
plot.ts(HOWAREYOU)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(HeartRate)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942), eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(HeartRate)
plot.ts(HeartRate)
Sampling Gabor Ridge
Description
Given a ridge phi (for the Gabor transform), returns a (regularly) subsampled version of length nbnodes.
Usage
RidgeSampling(phi, nbnodes)
Arguments
phi |
ridge (1D array). |
nbnodes |
number of samples. |
Details
Gabor ridges are sampled uniformly.
Value
Returns a list containing the discrete values of the ridge.
node |
time coordinates of the ridge samples. |
phinode |
frequency coordinates of the ridge samples. |
References
See discussions in the text of "Time-Frequency Analysis”.
See Also
Singular Value Decomposition
Description
Computes singular value decomposition of a matrix.
Usage
SVD(a)
Arguments
a |
input matrix. |
Details
R interface for Numerical Recipes singular value decomposition routine.
Value
a structure containing the 3 matrices of the singular value decomposition of the input.
References
See discussions in the text of “Time-Frequency Analysis”.
Examples
hilbert <- function(n) { i <- 1:n; 1 / outer(i - 1, i, "+") }
X <- hilbert(6)
z = SVD(X)
z
Undocumented Functions in Rwave
Description
Numerous functions were not documented in the original Swave help files.
References
See discussions in the text of “Practical Time-Frequency Analysis”.
Wigner-Ville function
Description
Compute the Wigner-Ville transform, without any smoothing.
Usage
WV(input, nvoice, freqstep = (1/nvoice), plot = TRUE)
Arguments
input |
input signal (possibly complex-valued) |
nvoice |
number of frequency bands |
freqstep |
sampling rate for the frequency axis |
plot |
if set to TRUE, displays the modulus of CWT on the graphic device. |
Value
(complex) Wigner-Ville transform.
References
See discussions in the text of “Practical Time-Frequency Analysis”.
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(W_tilda.1)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942), eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(W_tilda.1)
plot.ts(W_tilda.1)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(W_tilda.2)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942), eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(W_tilda.2)
plot.ts(W_tilda.2)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(W_tilda.3)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942), eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(W_tilda.3)
plot.ts(W_tilda.3)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(W_tilda.4)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942), eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(W_tilda.4)
plot.ts(W_tilda.4)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(W_tilda.5)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942), eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(W_tilda.5)
plot.ts(W_tilda.5)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(W_tilda.6)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942), eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(W_tilda.6)
plot.ts(W_tilda.6)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(W_tilda.7)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942), eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(W_tilda.7)
plot.ts(W_tilda.7)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(W_tilda.8)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942), eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(W_tilda.8)
plot.ts(W_tilda.8)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(W_tilda.9)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942), eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(W_tilda.9)
plot.ts(W_tilda.9)
Logarithms of the Prices of Japanese Yen
Description
Logarithms of the prices of a contract of Japanese yen.
Usage
data(YN)
Format
A vector containing 500 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(YN)
plot.ts(YN)
Daily differences of Japanese Yen
Description
Daily differences of YN
.
Usage
data(YNdiff)
Format
A vector containing 499 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(YNdiff)
plot.ts(YNdiff)
Zero Padding
Description
Add zeros to the end of the data if necessary so that its length is a power of 2. It returns the data with zeros added if nessary and the length of the adjusted data.
Usage
adjust.length(inputdata)
Arguments
inputdata |
either a text file or an S object containing data. |
Value
Zero-padded 1D array.
References
See discussions in the text of “Practical Time-Frequency Analysis”.
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(amber7)
Format
A vector containing 7000 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(amber7)
plot.ts(amber7)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(amber8)
Format
A vector containing 7000 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(amber8)
plot.ts(amber8)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(amber9)
Format
A vector containing 7000 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(amber9)
plot.ts(amber9)
Acoustic Returns
Description
Acoustic returns from natural underwater clutter.
Usage
data(back1.000)
Format
A vector containing 7936 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(back1.000)
plot.ts(back1.000)
Acoustic Returns
Description
Acoustic returns from ...
Usage
data(back1.180)
Format
A vector containing 7936 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(back1.180)
plot.ts(back1.180)
Acoustic Returns
Description
Acoustic returns from an underwater metallic object.
Usage
data(back1.220)
Format
A vector containing 7936 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(back1.220)
plot.ts(back1.220)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(backscatter.1.000)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(backscatter.1.000)
plot.ts(backscatter.1.000)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(backscatter.1.180)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(backscatter.1.180)
plot.ts(backscatter.1.180)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(backscatter.1.220)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(backscatter.1.220)
plot.ts(backscatter.1.220)
Ridge Chaining Procedure
Description
Chains the ridge estimates produced by the function crc
.
Usage
cfamily(ccridge, bstep=1, nbchain=100, ptile=0.05)
Arguments
ccridge |
unchained ridge set as the output of the function |
bstep |
maximal length for a gap in a ridge. |
nbchain |
maximal number of chains produced by the function. |
ptile |
relative threshold for the ridges. |
Details
crc
returns a measure in time-frequency (or time-scale)
space. cfamily
turns it into a series of one-dimensional
objects (ridges). The measure is first thresholded, with a relative
threshold value set to the input parameter ptile. During the chaining
procedure, gaps within a given ridge are allowed and filled in. The
maximal length of such gaps is the input parameter bstep.
Value
Returns the results of the chaining algorithm
ordered map |
image containing the ridges (displayed with different colors) |
chain |
2D array containing the chained ridges, according to the chain data
structure |
nbchain |
number of chains produced by the algorithm |
References
See discussion in text of “Practical Time-Frequency Analysis”.
See Also
crc
for the ridge estimation, and crcrec
,
gcrcrec
and scrcrec
for corresponding
reconstruction functions.
Examples
## Not run:
data(HOWAREYOU)
plot.ts(HOWAREYOU)
cgtHOWAREYOU <- cgt(HOWAREYOU,70,0.01,100)
clHOWAREYOU <- crc(Mod(cgtHOWAREYOU),nbclimb=1000)
cfHOWAREYOU <- cfamily(clHOWAREYOU,ptile=0.001)
image(cfHOWAREYOU$ordered > 0)
## End(Not run)
Continuous Gabor Transform
Description
Computes the continuous Gabor transform with Gaussian window.
Usage
cgt(input, nvoice, freqstep=(1/nvoice), scale=1, plot=TRUE)
Arguments
input |
input signal (possibly complex-valued). |
nvoice |
number of frequencies for which gabor transform is to be computed. |
freqstep |
Sampling rate for the frequency axis. |
scale |
Size parameter for the window. |
plot |
logical variable set to TRUE to display the modulus of the continuous gabor transform on the graphic device. |
Details
The output contains the (complex) values of the gabor transform of the input signal. The format of the output is a 2D array (signal_size x nb_scales).
Value
continuous (complex) gabor transform (2D array).
Warning
freqstep must be less than 1/nvoice to avoid aliasing. freqstep=1/nvoice corresponds to the Nyquist limit.
References
See discussion in text of “Practical Time-Frequency Analysis”.
See Also
cwt
, cwtp
, DOG
for continuous wavelet transforms.
cwtsquiz
for synchrosqueezed wavelet transform.
Examples
data(HOWAREYOU)
plot.ts(HOWAREYOU)
cgtHOWAREYOU <- cgt(HOWAREYOU,70,0.01,100)
Chen's Chirp
Description
Chen's chirp.
Usage
data(ch)
Format
A vector containing 15,000 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(ch)
plot.ts(ch)
Verify Maximum Resolution
Description
Stop when 2^{maxresoln}
is larger than the signal size.
Usage
check.maxresoln(maxresoln, np)
Arguments
maxresoln |
number of decomposition scales. |
np |
signal size. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(chirpm5db.dat)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
## Not run:
data(chirpm5db.dat)
## End(Not run)
Threshold Phase based on Modulus
Description
Sets to zero the phase of time-frequency transform when modulus is below a certain value.
Usage
cleanph(tfrep, thresh=0.01, plot=TRUE)
Arguments
tfrep |
continuous time-frequency transform (2D array) |
thresh |
(relative) threshold. |
plot |
if set to TRUE, displays the maxima of cwt on the graphic device. |
Value
thresholded phase (2D array)
References
See discussion in text of “Practical Time-Frequency Analysis”.
Dolphin Click Data
Description
Dolphin click data.
Usage
data(click)
Format
A vector containing 2499 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(click)
plot.ts(click)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(click.asc)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(click.asc)
plot.ts(click.asc)
Ridge Estimation by Corona Method
Description
Estimate a (single) ridge from a time-frequency representation, using the corona method.
Usage
corona(tfrep, guess, tfspec=numeric(dim(tfrep)[2]), subrate=1,
temprate=3, mu=1, lambda=2 * mu, iteration=1000000, seed=-7,
stagnant=20000, costsub=1, plot=TRUE)
Arguments
tfrep |
Time-Frequency representation (real valued). |
guess |
Initial guess for the algorithm. |
tfspec |
Estimate for the contribution of the noise to modulus. |
subrate |
Subsampling rate for ridge estimation. |
temprate |
Initial value of temperature parameter. |
mu |
Coefficient of the ridge's second derivative in cost function. |
lambda |
Coefficient of the ridge's derivative in cost function. |
iteration |
Maximal number of moves. |
seed |
Initialization of random number generator. |
stagnant |
Maximum number of stationary iterations before stopping. |
costsub |
Subsampling of cost function in output. |
plot |
When set(default), some results will be shown on the display. |
Details
To accelerate convergence, it is useful to preprocess modulus before
running annealing method. Such a preprocessing (smoothing and
subsampling of modulus) is implemented in corona
. The
parameter subrate specifies the subsampling rate.
Value
Returns the estimated ridge and the cost function.
ridge |
1D array (of same length as the signal) containing the ridge. |
cost |
1D array containing the cost function. |
Warning
The returned cost may be a large array, which is time consuming. The argument costsub allows subsampling the cost function.
References
See discussion in text of “Practical Time-Frequency Analysis”.
See Also
Ridge Estimation by Modified Corona Method
Description
Estimate a ridge using the modified corona method (modified cost function).
Usage
coronoid(tfrep, guess, tfspec=numeric(dim(tfrep)[2]), subrate=1,
temprate=3, mu=1, lambda=2 * mu, iteration=1000000, seed=-7,
stagnant=20000, costsub=1, plot=TRUE)
Arguments
tfrep |
Estimate for the contribution of the noise to modulus. |
guess |
Initial guess for the algorithm. |
tfspec |
Estimate for the contribution of the noise to modulus. |
subrate |
Subsampling rate for ridge estimation. |
temprate |
Initial value of temperature parameter. |
mu |
Coefficient of the ridge's derivative in cost function. |
lambda |
Coefficient of the ridge's second derivative in cost function. |
iteration |
Maximal number of moves. |
seed |
Initialization of random number generator. |
stagnant |
Maximum number of stationary iterations before stopping. |
costsub |
Subsampling of cost function in output. |
plot |
When set(default), some results will be shown on the display. |
Details
To accelerate convergence, it is useful to preprocess modulus before
running annealing method. Such a preprocessing (smoothing and
subsampling of modulus) is implemented in coronoid
. The
parameter subrate specifies the subsampling rate.
Value
Returns the estimated ridge and the cost function.
ridge |
1D array (of same length as the signal) containing the ridge. |
cost |
1D array containing the cost function. |
Warning
The returned cost may be a large array. The argument costsub allows subsampling the cost function.
References
See discussion in text of “Practical Time-Frequency Analysis”.
See Also
Ridge Extraction by Crazy Climbers
Description
Uses the "crazy climber algorithm" to detect ridges in the modulus of a continuous wavelet or a Gabor transform.
Usage
crc(tfrep, tfspec=numeric(dim(tfrep)[2]), bstep=3, iteration=10000,
rate=0.001, seed=-7, nbclimb=10, flag.int=TRUE, chain=TRUE,
flag.temp=FALSE)
Arguments
tfrep |
modulus of the (wavelet or Gabor) transform. |
tfspec |
numeric vector which gives, for each value of the scale or frequency the expected size of the noise contribution. |
bstep |
stepsize for random walk of the climbers. |
iteration |
number of iterations. |
rate |
initial value of the temperature. |
seed |
initial value of the random number generator. |
nbclimb |
number of crazy climbers. |
flag.int |
if set to TRUE, the weighted occupation measure is computed. |
chain |
if set to TRUE, chaining of the ridges is done. |
flag.temp |
if set to TRUE: constant temperature. |
Value
Returns a 2D array called beemap containing the (weighted or unweighted) occupation measure (integrated with respect to time)
References
See discussion in text of “Practical Time-Frequency Analysis”.
See Also
corona
, icm
, coronoid
,
snake
, snakoid
for ridge estimation,
cfamily
for chaining and
crcrec
,gcrcrec
,scrcrec
for
reconstruction.
Examples
data(HOWAREYOU)
plot.ts(HOWAREYOU)
cgtHOWAREYOU <- cgt(HOWAREYOU,70,0.01,100)
clHOWAREYOU <- crc(Mod(cgtHOWAREYOU),nbclimb=1000)
Crazy Climbers Reconstruction by Penalization
Description
Reconstructs a real valued signal from the output of crc
(wavelet case) by minimizing an appropriate quadratic form.
Usage
crcrec(siginput, inputwt, beemap, noct, nvoice, compr, minnbnodes=2,
w0=2 * pi, bstep=5, ptile=0.01, epsilon=0, fast=FALSE, para=5, real=FALSE,
plot=2)
Arguments
siginput |
original signal. |
inputwt |
wavelet transform. |
beemap |
occupation measure, output of |
noct |
number of octaves. |
nvoice |
number of voices per octave. |
compr |
compression rate for sampling the ridges. |
minnbnodes |
minimal number of points per ridge. |
w0 |
center frequency of the wavelet. |
bstep |
size (in the time direction) of the steps for chaining. |
ptile |
relative threshold of occupation measure. |
epsilon |
constant in front of the smoothness term in penalty function. |
fast |
if set to TRUE, uses trapezoidal rule to evaluate $Q_2$. |
para |
scale parameter for extrapolating the ridges. |
real |
if set to TRUE, uses only real constraints. |
plot |
1: displays signal,components,and reconstruction one after another. 2: displays signal, components and reconstruction. |
Details
When ptile is high, boundary effects may appeare. para controls extrapolation of the ridge.
Value
Returns a structure containing the following elements:
rec |
reconstructed signal. |
ordered |
image of the ridges (with different colors). |
comp |
2D array containing the signals reconstructed from ridges. |
See Also
Display chained ridges
Description
displays a family of chained ridges, output of cfamily
.
Usage
crfview(beemap, twod=TRUE)
Arguments
beemap |
Family of chained ridges, output of |
twod |
If set to T, displays the ridges as an image. If set to F, displays as a series of curves. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
crc
,cfamily
for crazy climbers and corresponding chaining algorithms.
Continuous Wavelet Transform
Description
Computes the continuous wavelet transform with for the (complex-valued) Morlet wavelet.
Usage
cwt(input, noctave, nvoice=1, w0=2 * pi, twoD=TRUE, plot=TRUE)
Arguments
input |
input signal (possibly complex-valued) |
noctave |
number of powers of 2 for the scale variable |
nvoice |
number of scales in each octave (i.e. between two consecutive powers of 2). |
w0 |
central frequency of the wavelet. |
twoD |
logical variable set to T to organize the output as a 2D array (signal_size x nb_scales), otherwise, the output is a 3D array (signal_size x noctave x nvoice). |
plot |
if set to T, display the modulus of the continuous wavelet transform on the graphic device. |
Details
The time series is padded with zeroes to avoid problems with circular versus linear convolution. This does not affect usage, as the matrix returned has the added columns removed. (JML Sep 29, 2021).
The output contains the (complex) values of the wavelet transform of the input signal. The format of the output can be
2D array (signal_size x nb_scales)
3D array (signal_size x noctave x nvoice)
Since Morlet's wavelet is not strictly speaking a wavelet (it is not of vanishing integral), artifacts may occur for certain signals.
Value
continuous (complex) wavelet transform
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Examples
x <- 1:512
chirp <- sin(2*pi * (x + 0.002 * (x-256)^2 ) / 16)
retChirp <- cwt(chirp, noctave=5, nvoice=12)
Cauchy's wavelet transform
Description
Compute the continuous wavelet transform with (complex-valued) Cauchy's wavelet.
Usage
cwtTh(input, noctave, nvoice=1, moments, twoD=TRUE, plot=TRUE)
Arguments
input |
input signal (possibly complex-valued). |
noctave |
number of powers of 2 for the scale variable. |
nvoice |
number of scales in each octave (i.e. between two consecutive powers of 2). |
moments |
number of vanishing moments. |
twoD |
logical variable set to |
plot |
if set to |
Details
The output contains the (complex) values of the wavelet transform of the input signal. The format of the output can be
2D array (signal size \times
nb scales)
3D array (signal size \times
noctave \times
nvoice)
Value
tmp |
continuous (complex) wavelet transform. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Examples
x <- 1:512
chirp <- sin(2*pi * (x + 0.002 * (x-256)^2 ) / 16)
retChirp <- cwtTh(chirp, noctave=5, nvoice=12, moments=20)
Continuous Wavelet Transform Display
Description
Converts the output (modulus or argument) of cwtpolar to a 2D array and displays on the graphic device.
Usage
cwtimage(input)
Arguments
input |
3D array containing a continuous wavelet transform |
Details
The output contains the (complex) values of the wavelet transform of the input signal. The format of the output can be
2D array (signal_size x nb_scales)
3D array (signal_size x noctave x nvoice)
Value
2D array continuous (complex) wavelet transform
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Examples
x <- 1:512
chirp <- sin(2*pi * (x + 0.002 * (x-256)^2 ) / 16)
retChirp <- cwt(chirp, noctave=5, nvoice=12, twoD=FALSE, plot=FALSE)
retPolar <- cwtpolar(retChirp)
retImageMod <- cwtimage(retPolar$modulus)
retImageArg <- cwtimage(retPolar$argument)
Continuous Wavelet Transform with Phase Derivative
Description
Computes the continuous wavelet transform with (complex-valued) Morlet wavelet and its phase derivative.
Usage
cwtp(input, noctave, nvoice=1, w0=2 * pi, twoD=TRUE, plot=TRUE)
Arguments
input |
input signal (possibly complex-valued) |
noctave |
number of powers of 2 for the scale variable |
nvoice |
number of scales in each octave (i.e., between two consecutive powers of 2). |
w0 |
central frequency of the wavelet. |
twoD |
logical variable set to |
plot |
if set to |
Value
list containing the continuous (complex) wavelet transform and the phase derivative
wt |
array of complex numbers for the values of the continuous wavelet transform. |
f |
array of the same dimensions containing the values of the derivative of the phase of the continuous wavelet transform. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
cgt
, cwt
, cwtTh
,
DOG
for wavelet transform, and gabor
for
continuous Gabor transform.
Examples
## discards imaginary part with error,
## c code does not account for Im(input)
x <- 1:512
chirp <- sin(2*pi * (x + 0.002 * (x-256)^2 ) / 16)
chirp <- chirp + 1i * sin(2*pi * (x + 0.004 * (x-256)^2 ) / 16)
retChirp <- cwtp(chirp, noctave=5, nvoice=12)
Conversion to Polar Coordinates
Description
Converts one of the possible outputs of the function cwt
to modulus and phase.
Usage
cwtpolar(cwt, threshold=0)
Arguments
cwt |
3D array containing the values of a continuous wavelet
transform in the format (signal size |
threshold |
value of a level for the absolute value of the modulus below which
the value of the argument of the output is set to |
Details
The output contains the (complex) values of the wavelet transform of the input signal. The format of the output can be
2D array (signal size \times
nb_scales)
3D array (signal size \times
noctave \times
nvoice)
Value
Modulus and Argument of the values of the continuous wavelet transform
output1 |
3D array giving the values (in the same format as the input) of the modulus of the input. |
output2 |
3D array giving the values of the argument of the input. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Examples
x <- 1:512
chirp <- sin(2*pi * (x + 0.002 * (x-256)^2 ) / 16)
retChirp <- cwt(chirp, noctave=5, nvoice=12, twoD=FALSE, plot=FALSE)
retPolar <- cwtpolar(retChirp)
Squeezed Continuous Wavelet Transform
Description
Computes the synchrosqueezed continuous wavelet transform with the (complex-valued) Morlet wavelet.
Usage
cwtsquiz(input, noctave, nvoice=1, w0=2 * pi, twoD=TRUE, plot=TRUE)
Arguments
input |
input signal (possibly complex-valued) |
noctave |
number of powers of 2 for the scale variable |
nvoice |
number of scales in each octave (i.e. between two consecutive powers of 2). |
w0 |
central frequency of the wavelet. |
twoD |
logical variable set to T to organize the output as a 2D array
(signal size |
plot |
logical variable set to T to T to display the modulus of the squeezed wavelet transform on the graphic device. |
Details
The output contains the (complex) values of the squeezed wavelet transform of the input signal. The format of the output can be
2D array (signal size \times
nb scales),
3D array (signal size \times
noctave \times
nvoice).
Value
synchrosqueezed continuous (complex) wavelet transform
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Inverse Dyadic Wavelet Transform
Description
Invert the dyadic wavelet transform.
Usage
dwinverse(wt, filtername="Gaussian1")
Arguments
wt |
dyadic wavelet transform |
filtername |
filters used. ("Gaussian1" stands for the filters corresponds to those of Mallat and Zhong's wavlet. And "Haar" stands for the filters of Haar basis. |
Value
Reconstructed signal
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Plot Dyadic Wavelet Transform Extrema
Description
Plot dyadic wavelet transform extrema (output of ext
).
Usage
epl(dwext)
Arguments
dwext |
dyadic wavelet transform (output of |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Extrema of Dyadic Wavelet Transform
Description
Compute the local extrema of the dyadic wavelet transform modulus.
Usage
ext(wt, scale=FALSE, plot=TRUE)
Arguments
wt |
dyadic wavelet transform. |
scale |
flag indicating if the extrema at each resolution will be plotted at the same scale. |
plot |
if set to TRUE, displays the transform on the graphics device. |
Value
Structure containing:
original |
original signal. |
extrema |
extrema representation. |
Sf |
coarse resolution of signal. |
maxresoln |
number of decomposition scales. |
np |
size of signal. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Kernel for Reconstruction from Gabor Ridges
Description
Computes the cost from the sample of points on the estimated ridge and the matrix used in the reconstruction of the original signal, using simple trapezoidal rule for integrals.
Usage
fastgkernel(node, phinode, freqstep, scale, x.inc=1, x.min=node[1],
x.max=node[length(node)], plot=FALSE)
Arguments
node |
values of the variable b for the nodes of the ridge |
phinode |
values of the frequency variable |
freqstep |
sampling rate for the frequency axis |
scale |
size of the window |
x.inc |
step unit for the computation of the kernel. |
x.min |
minimal value of x for the computation of |
x.max |
maximal value of x for the computation of |
plot |
if set to TRUE, displays the modulus of the matrix of |
Details
Uses trapezoidal rule (instead of Romberg's method) to evaluate the kernel.
Value
matrix of the G_2
kernel.
References
See discussions in the text of “Time-Frequency Analysis”.
See Also
gkernel
, fastkernel
, rkernel
,
zerokernel
.
Kernel for Reconstruction from Wavelet Ridges
Description
Computes the cost from the sample of points on the estimated ridge and the matrix used in the reconstruction of the original signal, using simple trapezoidal rule for integrals.
Usage
fastkernel(node, phinode, nvoice, x.inc=1, x.min=node[1],
x.max=node[length(node)], w0=2 * pi, plot=FALSE)
Arguments
node |
values of the variable b for the nodes of the ridge. |
phinode |
values of the scale variable a for the nodes of the ridge. |
nvoice |
number of scales within 1 octave. |
x.inc |
step unit for the computation of the kernel |
x.min |
minimal value of x for the computation of |
x.max |
maximal value of x for the computation of |
w0 |
central frequency of the wavelet |
plot |
if set to TRUE, displays the modulus of the matrix of |
Details
Uses trapezoidal rule (instead of Romberg's method) to evaluate the kernel.
Value
matrix of the Q_2
kernel.
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
kernel
, rkernel
, gkernel
,
zerokernel
.
Generate Gabor function
Description
Generates a Gabor for given location and frequency.
Usage
gabor(sigsize, location, frequency, scale)
Arguments
sigsize |
length of the Gabor function. |
location |
position of the Gabor function. |
frequency |
frequency of the Gabor function. |
scale |
size parameter for the Gabor function. See details. |
Details
The size parameter here corresponds to the standard deviation for a gaussian. In the Carmona (1998, eBook ISBN:978008053942) book, equation 3.23 has a different scale factor.
Value
complex 1D array of size sigsize.
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Examples
m1 = gabor(1024, 512, 2 * pi, 20 )
plot.ts(Re(m1) )
Crazy Climbers Reconstruction by Penalization
Description
Reconstructs a real-valued signal from ridges found by crazy climbers on a Gabor transform.
Usage
gcrcrec(siginput, inputgt, beemap, nvoice, freqstep, scale, compr,
bstep=5, ptile=0.01, epsilon=0, fast=TRUE, para=5, minnbnodes=3,
hflag=FALSE, real=FALSE, plot=2)
Arguments
siginput |
original signal. |
inputgt |
Gabor transform. |
beemap |
occupation measure, output of |
nvoice |
number of frequencies. |
freqstep |
sampling step for frequency axis. |
scale |
size of windows. |
compr |
compression rate to be applied to the ridges. |
bstep |
size (in the time direction) of the steps for chaining. |
ptile |
threshold of ridge |
epsilon |
constant in front of the smoothness term in penalty function. |
fast |
if set to TRUE, uses trapezoidal rule to evaluate |
para |
scale parameter for extrapolating the ridges. |
minnbnodes |
minimal number of points per ridge. |
hflag |
if set to FALSE, uses the identity as first term
in the kernel. If not, uses |
real |
if set to |
plot |
|
Details
When ptile
is high, boundary effects may appear. para
controls extrapolation of the ridge.
Value
Returns a structure containing the following elements:
rec |
reconstructed signal. |
ordered |
image of the ridges (with different colors). |
comp |
2D array containing the signals reconstructed from ridges. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
crc
, cfamily
, crcrec
,
scrcrec
.
Kernel for Reconstruction from Gabor Ridges
Description
Computes the cost from the sample of points on the estimated ridge and the matrix used in the reconstruction of the original signal.
Usage
gkernel(node, phinode, freqstep, scale, x.inc=1, x.min=node[1],
x.max=node[length(node)], plot=FALSE)
Arguments
node |
values of the variable b for the nodes of the ridge. |
phinode |
values of the scale variable a for the nodes of the ridge. |
freqstep |
sampling rate for the frequency axis. |
scale |
size of the window. |
x.inc |
step unit for the computation of the kernel. |
x.min |
minimal value of x for the computation of |
x.max |
maximal value of x for the computation of |
plot |
if set to TRUE, displays the modulus of the matrix of |
Value
matrix of the Q_2
kernel
References
See discussions in the text of “Time-Frequency Analysis”.
See Also
fastgkernel
, kernel
, rkernel
,
fastkernel
, zerokernel
.
Reconstruction from a Ridge
Description
Reconstructs signal from a “regularly sampled” ridge, in the Gabor case.
Usage
gregrec(siginput, gtinput, phi, nbnodes, nvoice, freqstep, scale,
epsilon=0, fast=FALSE, plot=FALSE, para=0, hflag=FALSE, real=FALSE,
check=FALSE)
Arguments
siginput |
input signal. |
gtinput |
Gabor transform, output of |
phi |
unsampled ridge. |
nbnodes |
number of nodes used for the reconstruction. |
nvoice |
number of different scales per octave |
freqstep |
sampling rate for the frequency axis |
scale |
size parameter for the Gabor function. |
epsilon |
coefficient of the |
fast |
if set to T, the kernel is computed using trapezoidal rule. |
plot |
if set to TRUE, displays original and reconstructed signals |
para |
scale parameter for extrapolating the ridges. |
hflag |
if set to TRUE, uses |
real |
if set to TRUE, uses only real constraints on the transform. |
check |
if set to TRUE, computes |
Value
Returns a list containing:
sol |
reconstruction from a ridge. |
A |
<gaborlets,dualgaborlets> matrix. |
lam |
coefficients of dual wavelets in reconstructed signal. |
dualwave |
array containing the dual wavelets. |
gaborets |
array containing the wavelets on sampled ridge. |
solskel |
Gabor transform of sol, restricted to the ridge. |
inputskel |
Gabor transform of signal, restricted to the ridge. |
Q2 |
second part of the reconstruction kernel. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Reconstruction from a Ridge
Description
Reconstructs signal from sample of a ridge, in the Gabor case.
Usage
gridrec(gtinput, node, phinode, nvoice, freqstep, scale, Qinv,
epsilon, np, real=FALSE, check=FALSE)
Arguments
gtinput |
Gabor transform, output of |
node |
time coordinates of the ridge samples. |
phinode |
frequency coordinates of the ridge samples. |
nvoice |
number of different frequencies. |
freqstep |
sampling rate for the frequency axis. |
scale |
scale of the window. |
Qinv |
inverse of the matrix |
epsilon |
coefficient of the |
np |
number of samples of the reconstructed signal. |
real |
if set to TRUE, uses only constraints on the real part of the transform. |
check |
if set to TRUE, computes |
Value
Returns a list containing the reconstructed signal and the chained ridges.
sol |
reconstruction from a ridge. |
A |
<gaborlets,dualgaborlets> matrix. |
lam |
coefficients of dual gaborlets in reconstructed signal. |
dualwave |
array containing the dual gaborlets. |
gaborets |
array of gaborlets located on the ridge samples. |
solskel |
Gabor transform of sol, restricted to the ridge. |
inputskel |
Gabor transform of signal, restricted to the ridge. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
sridrec
, gregrec
, regrec
,
regrec2
.
Sampled Identity
Description
Generate a sampled identity matrix.
Usage
gsampleOne(node, scale, np)
Arguments
node |
location of the reconstruction gabor functions. |
scale |
scale of the gabor functions. |
np |
size of the reconstructed signal. |
Value
diagonal of the “sampled” Q_1
term (1D vector)
References
See discussions in the text of “Time-Frequency Analysis”.
See Also
Gabor Functions on a Ridge
Description
Generation of Gabor functions located on the ridge.
Usage
gwave(bridge, omegaridge, nvoice, freqstep, scale, np, N)
Arguments
bridge |
time coordinates of the ridge samples |
omegaridge |
frequency coordinates of the ridge samples |
nvoice |
number of different scales per octave |
freqstep |
sampling rate for the frequency axis |
scale |
scale of the window |
np |
size of the reconstruction kernel |
N |
number of complex constraints |
Value
Array of Gabor functions located on the ridge samples
References
See discussions in the text of "Time-Frequency Analysis”.
See Also
Real Gabor Functions on a Ridge
Description
Generation of the real parts of gabor functions located on a ridge.
(modification of gwave
.)
Usage
gwave2(bridge, omegaridge, nvoice, freqstep, scale, np, N)
Arguments
bridge |
time coordinates of the ridge samples |
omegaridge |
frequency coordinates of the ridge samples |
nvoice |
number of different scales per octave |
freqstep |
sampling rate for the frequency axis |
scale |
scale of the window |
np |
size of the reconstruction kernel |
N |
number of complex constraints |
Value
Array of real Gabor functions located on the ridge samples
References
See discussions in the text of “Time-Frequency Analysis”.
See Also
Estimate Hurst Exponent
Description
Estimates Hurst exponent from a wavelet transform.
Usage
hurst.est(wspec, range, nvoice, plot=TRUE)
Arguments
wspec |
wavelet spectrum (output of |
range |
range of scales from which estimate the exponent. |
nvoice |
number of scales per octave of the wavelet transform. |
plot |
if set to |
Value
complex 1D array of size sigsize.
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Examples
# White Noise Hurst Exponent: The plots on the top row of Figure 6.8
# were produced by the folling S-commands. These make use of the two
# functions Hurst.est (estimation of Hurst exponent from CWT) and
# wspec.pl (display wavelet spectrum).
# Compare the periodogram and the wavelet spectral estimate.
wnoise <- rnorm(8192)
plot.ts(wnoise)
spwnoise <- fft(wnoise)
spwnoise <- Mod(spwnoise)
spwnoise <- spwnoise*spwnoise
plot(spwnoise[1:4096], log="xy", type="l")
lswnoise <- lsfit(log10(1:4096), log10(spwnoise[1:4096]))
abline(lswnoise$coef)
cwtwnoise <- DOG(wnoise, 10, 5, 1, plot=FALSE)
mcwtwnoise <- Mod(cwtwnoise)
mcwtwnoise <- mcwtwnoise*mcwtwnoise
wspwnoise <- tfmean(mcwtwnoise, plot=FALSE)
wspec.pl(wspwnoise, 5)
hurst.est(wspwnoise, 1:50, 5)
Ridge Estimation by ICM Method
Description
Estimate a (single) ridge from a time-frequency representation, using the ICM minimization method.
Usage
icm(modulus, guess, tfspec=numeric(dim(modulus)[2]), subrate=1,
mu=1, lambda=2 * mu, iteration=100)
Arguments
modulus |
Time-Frequency representation (real valued). |
guess |
Initial guess for the algorithm. |
tfspec |
Estimate for the contribution of the noise to modulus. |
subrate |
Subsampling rate for ridge estimation. |
mu |
Coefficient of the ridge's second derivative in cost function. |
lambda |
Coefficient of the ridge's derivative in cost function. |
iteration |
Maximal number of moves. |
Details
To accelerate convergence, it is useful to preprocess modulus before
running annealing method. Such a preprocessing (smoothing and
subsampling of modulus) is implemented in icm
. The
parameter subrate specifies the subsampling rate.
Value
Returns the estimated ridge and the cost function.
ridge |
1D array (of same length as the signal) containing the ridge. |
cost |
1D array containing the cost function. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
corona
, coronoid
, and snake
,
snakoid
.
Trim Dyadic Wavelet Transform Extrema
Description
Trimming of dyadic wavelet transform local extrema, using bootstrapping.
Usage
mbtrim(extrema, scale=FALSE, prct=0.95)
Arguments
extrema |
dyadic wavelet transform extrema (output of |
scale |
when set, the wavelet transform at each scale will be plotted with the same scale. |
prct |
percentage critical value used for thresholding |
Details
The distribution of extrema of dyadic wavelet transform at each scale is generated by bootstrap method, and the 95% critical value is used for thresholding the extrema of the signal.
Value
Structure containing
original |
original signal. |
extrema |
trimmed extrema representation. |
Sf |
coarse resolution of signal. |
maxresoln |
number of decomposition scales. |
np |
size of signal. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Trim Dyadic Wavelet Transform Extrema
Description
Trimming of dyadic wavelet transform local extrema, assuming normal distribution.
Usage
mntrim(extrema, scale=FALSE, prct=0.95)
Arguments
extrema |
dyadic wavelet transform extrema (output of |
scale |
when set, the wavelet transform at each scale will be plotted with the same scale. |
prct |
percentage critical value used for thresholding |
Details
The distribution of extrema of dyadic wavelet transform at each scale is generated by simulation, assuming a normal distribution, and the 95% critical value is used for thresholding the extrema of the signal.
Value
Structure containing
original |
original signal. |
extrema |
trimmed extrema representation. |
Sf |
coarse resolution of signal. |
maxresoln |
number of decomposition scales. |
np |
size of signal. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Morlet Wavelets
Description
Computes a Morlet wavelet at the point of the time-scale plane given in the input
Usage
morlet(sigsize, location, scale, w0=2 * pi)
Arguments
sigsize |
length of the output. |
location |
time location of the wavelet. |
scale |
scale of the wavelet. |
w0 |
central frequency of the wavelet. |
Details
The details of this construction (including the definition formulas) are given in the text.
Value
Returns the values of the complex Morlet wavelet at the point of the time-scale plane given in the input
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Examples
m1 = morlet(1024, 512, 20, w0=2 * pi)
plot.ts(Re(m1) )
Ridge Morvelets
Description
Generates the Morlet wavelets at the sample points of the ridge.
Usage
morwave(bridge, aridge, nvoice, np, N, w0=2 * pi)
Arguments
bridge |
time coordinates of the ridge samples. |
aridge |
scale coordinates of the ridge samples. |
nvoice |
number of different scales per octave. |
np |
number of samples in the input signal. |
N |
size of reconstructed signal. |
w0 |
central frequency of the wavelet. |
Value
Returns the Morlet wavelets at the samples of the time-scale plane given in the input: complex array of Morlet wavelets located on the ridge samples
References
See discussions in the text of “Time-Frequency Analysis”.
See Also
Real Ridge Morvelets
Description
Generates the real parts of the Morlet wavelets at the sample points of a ridge
Usage
morwave2(bridge, aridge, nvoice, np, N, w0=2 * pi)
Arguments
bridge |
time coordinates of the ridge samples. |
aridge |
scale coordinates of the ridge samples. |
nvoice |
number of different scales per octave. |
np |
number of samples in the input signal. |
N |
size of reconstructed signal. |
w0 |
central frequency of the wavelet. |
Value
Returns the real parts of the Morlet wavelets at the samples of the time-scale plane given in the input: array of Morlet wavelets located on the ridge samples
References
See discussions in the text of “Time-Frequency Analysis”.
See Also
Reconstruct from Dyadic Wavelet Transform Extrema
Description
Reconstruct from dyadic wavelet transform modulus extrema. The reconstructed signal preserves locations and values at extrema.
Usage
mrecons(extrema, filtername="Gaussian1", readflag=FALSE)
Arguments
extrema |
the extrema representation. |
filtername |
filter used for dyadic wavelet transform. |
readflag |
if set to T, read reconstruction kernel from precomputed file. |
Details
The reconstruction involves only the wavelet coefficients, without taking care of the coarse scale component. The latter may be added a posteriori.
Value
Structure containing
f |
the reconstructed signal. |
g |
reconstructed signal plus mean of original signal. |
h |
reconstructed signal plus coarse scale component of original signal. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Dyadic Wavelet Transform
Description
Dyadic wavelet transform, with Mallat's wavelet. The reconstructed signal preserves locations and values at extrema.
Usage
mw(inputdata, maxresoln, filtername="Gaussian1", scale=FALSE, plot=TRUE)
Arguments
inputdata |
either a text file or an R object containing data. |
maxresoln |
number of decomposition scales. |
filtername |
name of filter (either Gaussian1 for Mallat and Zhong's wavelet or Haar wavelet). |
scale |
when set, the wavelet transform at each scale is plotted with the same scale. |
plot |
indicate if the wavelet transform at each scale will be plotted. |
Details
The decomposition goes from resolution 1 to the given maximum resolution.
Value
Structure containing
original |
original signal. |
Wf |
dyadic wavelet transform of signal. |
Sf |
multiresolution of signal. |
maxresoln |
number of decomposition scales. |
np |
size of signal. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(noisy.dat)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(noisy.dat)
plot.ts(noisy.dat)
Noisy Gravitational Wave
Description
Noisy gravitational wave.
Usage
data(noisywave)
Format
A vector containing 8192 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(noisywave)
plot.ts(noisywave)
Prepare Graphics Environment
Description
Splits the graphics device into prescrivbed number of windows.
Usage
npl(nbrow)
Arguments
nbrow |
number of plots. |
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(pixel_8.7)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(pixel_8.7)
plot.ts(pixel_8.7)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(pixel_8.8)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(pixel_8.8)
plot.ts(pixel_8.8)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(pixel_8.9)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(pixel_8.9)
plot.ts(pixel_8.9)
Plot Dyadic Wavelet Transform Extrema
Description
Plot extrema of dyadic wavelet transform.
Usage
plotResult(result, original, maxresoln, scale=FALSE, yaxtype="s")
Arguments
result |
result. |
original |
input signal. |
maxresoln |
number of decomposition scales. |
scale |
when set, the extrema at each scale is plotted withe the same scale. |
yaxtype |
y axis type (see R manual). |
References
See discussions in the text of “Time-Frequency Analysis”.
See Also
Plot Dyadic Wavelet Transform
Description
Plot dyadic wavelet transform.
Usage
plotwt(original, psi, phi, maxresoln, scale=FALSE, yaxtype="s")
Arguments
original |
input signal. |
psi |
dyadic wavelet transform. |
phi |
scaling function transform at last resolution. |
maxresoln |
number of decomposition scales. |
scale |
when set, the wavelet transform at each scale is plotted with the same scale. |
yaxtype |
axis type (see R manual). |
References
See discussions in the text of “Time-Frequency Analysis”.
See Also
plotResult
, epl
, wpl
.
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(pure.dat)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(pure.dat)
plot.ts(pure.dat)
Pure Gravitational Wave
Description
Pure gravitational wave.
Usage
data(purwave)
Format
A vector containing 8192 observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(purwave)
plot.ts(purwave)
Reconstruction from a Ridge
Description
Reconstructs signal from a “regularly sampled” ridge, in the wavelet case.
Usage
regrec(siginput, cwtinput, phi, compr, noct, nvoice, epsilon=0,
w0=2 * pi, fast=FALSE, plot=FALSE, para=0, hflag=FALSE,
check=FALSE, minnbnodes=2, real=FALSE)
Arguments
siginput |
input signal. |
cwtinput |
wavelet transform, output of |
phi |
unsampled ridge. |
compr |
subsampling rate for the wavelet coefficients (at scale 1) |
noct |
number of octaves (powers of 2) |
nvoice |
number of different scales per octave |
epsilon |
coefficient of the |
w0 |
central frequency of Morlet wavelet |
fast |
if set to TRUE, the kernel is computed using trapezoidal rule. |
plot |
if set to TRUE, displays original and reconstructed signals |
para |
scale parameter for extrapolating the ridges. |
hflag |
if set to TRUE, uses |
check |
if set to TRUE, computes |
minnbnodes |
minimum number of nodes for the reconstruction. |
real |
if set to TRUE, uses only real constraints on the transform. |
Value
Returns a list containing:
sol |
reconstruction from a ridge. |
A |
<wavelets,dualwavelets> matrix. |
lam |
coefficients of dual wavelets in reconstructed signal. |
dualwave |
array containing the dual wavelets. |
morvelets |
array containing the wavelets on sampled ridge. |
solskel |
wavelet transform of sol, restricted to the ridge. |
inputskel |
wavelet transform of signal, restricted to the ridge. |
Q2 |
second part of the reconstruction kernel. |
nbnodes |
number of nodes used for the reconstruction. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
regrec2
, ridrec
, gregrec
,
gridrec
.
Reconstruction from a Ridge
Description
Reconstructs signal from a “regularly sampled” ridge, in the wavelet case, from a precomputed kernel.
Usage
regrec2(siginput, cwtinput, phi, nbnodes, noct, nvoice, Q2,
epsilon=0.5, w0=2 * pi, plot=FALSE)
Arguments
siginput |
input signal. |
cwtinput |
wavelet transform, output of |
phi |
unsampled ridge. |
nbnodes |
number of samples on the ridge |
noct |
number of octaves (powers of 2) |
nvoice |
number of different scales per octave |
Q2 |
second term of the reconstruction kernel |
epsilon |
coefficient of the |
w0 |
central frequency of Morlet wavelet |
plot |
if set to TRUE, displays original and reconstructed signals |
Details
The computation of the kernel may be time consuming. This function avoids recomputing it if it was computed already.
Value
Returns a list containing:
sol |
reconstruction from a ridge. |
A |
<wavelets,dualwavelets> matrix. |
lam |
coefficients of dual wavelets in reconstructed signal. |
dualwave |
array containing the dual wavelets. |
morvelets |
array containing the wavelets on sampled ridge. |
solskel |
wavelet transform of sol, restricted to the ridge. |
inputskel |
wavelet transform of signal, restricted to the ridge. |
nbnodes |
number of nodes used for the reconstruction. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
regrec
, gregrec
, ridrec
,
sridrec
.
Reconstruction from a Ridge
Description
Reconstructs signal from sample of a ridge, in the wavelet case.
Usage
ridrec(cwtinput, node, phinode, noct, nvoice, Qinv, epsilon, np,
w0=2 * pi, check=FALSE, real=FALSE)
Arguments
cwtinput |
wavelet transform, output of |
node |
time coordinates of the ridge samples. |
phinode |
scale coordinates of the ridge samples. |
noct |
number of octaves (powers of 2). |
nvoice |
number of different scales per octave. |
Qinv |
inverse of the matrix |
epsilon |
coefficient of the |
np |
number of samples of the reconstructed signal. |
w0 |
central frequency of Morlet wavelet. |
check |
if set to TRUE, computes |
real |
if set to TRUE, uses only constraints on the real part of the transform. |
Value
Returns a list containing the reconstructed signal and the chained ridges.
sol |
reconstruction from a ridge |
A |
<wavelets,dualwavelets> matrix |
lam |
coefficients of dual wavelets in reconstructed signal. |
dualwave |
array containing the dual wavelets. |
morvelets |
array of morlet wavelets located on the ridge samples. |
solskel |
wavelet transform of sol, restricted to the ridge |
inputskel |
wavelet transform of signal, restricted to the ridge |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Kernel for Reconstruction from Wavelet Ridges
Description
Computes the cost from the sample of points on the estimated ridge
and the matrix used in the reconstruction of the original signal,
in the case of real constraints. Modification of the function
kernel
.
Usage
rkernel(node, phinode, nvoice, x.inc=1, x.min=node[1],
x.max=node[length(node)], w0=2 * pi, plot=FALSE)
Arguments
node |
values of the variable b for the nodes of the ridge. |
phinode |
values of the scale variable a for the nodes of the ridge. |
nvoice |
number of scales within 1 octave. |
x.inc |
step unit for the computation of the kernel. |
x.min |
minimal value of x for the computation of |
x.max |
maximal value of x for the computation of |
w0 |
central frequency of the wavelet. |
plot |
if set to TRUE, displays the modulus of the matrix of |
Details
Uses Romberg's method for computing the kernel.
Value
matrix of the Q_2
kernel
References
See discussions in the text of "Time-Frequency Analysis".
See Also
kernel
, fastkernel
, gkernel
,
zerokernel
.
Kernel for Reconstruction from Wavelet Ridges
Description
Computes the cost from the sample of points on the estimated ridge and the matrix used in the reconstruction of the original signal
Usage
rwkernel(node, phinode, nvoice, x.inc=1, x.min=node[1],
x.max=node[length(node)], w0=2 * pi, plot=FALSE)
Arguments
node |
values of the variable b for the nodes of the ridge. |
phinode |
values of the scale variable a for the nodes of the ridge. |
nvoice |
number of scales within 1 octave. |
x.inc |
step unit for the computation of the kernel. |
x.min |
minimal value of x for the computation of |
x.max |
maximal value of x for the computation of |
w0 |
central frequency of the wavelet. |
plot |
if set to TRUE, displays the modulus of the matrix of |
Details
The kernel is evaluated using Romberg's method.
Value
matrix of the Q_2
kernel
References
See discussions in the text of "Time-Frequency Analysis".
See Also
Simple Reconstruction from Crazy Climbers Ridges
Description
Reconstructs signal from ridges obtained by crc
,
using the restriction of the transform to the ridge.
Usage
scrcrec(siginput, tfinput, beemap, bstep=5, ptile=0.01, plot=2)
Arguments
siginput |
input signal. |
tfinput |
|
beemap |
output of crazy climber algorithm |
bstep |
used for the chaining (see |
ptile |
threshold on the measure beemap (see |
plot |
1: displays signal,components, and reconstruction one after another. |
Value
Returns a list containing the reconstructed signal and the chained ridges.
rec |
reconstructed signal |
ordered |
image of the ridges (with different colors) |
comp |
2D array containing the signals reconstructed from ridges |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
crc
,cfamily
for crazy climbers method,
crcrec
for reconstruction methods.
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(sig_W_tilda.1)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(sig_W_tilda.1)
plot.ts(sig_W_tilda.1)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(sig_W_tilda.2)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(sig_W_tilda.2)
plot.ts(sig_W_tilda.2)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(sig_W_tilda.3)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(sig_W_tilda.3)
plot.ts(sig_W_tilda.3)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(sig_W_tilda.4)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(sig_W_tilda.4)
plot.ts(sig_W_tilda.4)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(sig_W_tilda.5)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942), eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(sig_W_tilda.5)
plot.ts(sig_W_tilda.5)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(signal_W_tilda.1)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(signal_W_tilda.1)
plot.ts(signal_W_tilda.1)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(signal_W_tilda.2)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(signal_W_tilda.2)
plot.ts(signal_W_tilda.2)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(signal_W_tilda.3)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(signal_W_tilda.3)
plot.ts(signal_W_tilda.3)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(signal_W_tilda.4)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(signal_W_tilda.4)
plot.ts(signal_W_tilda.4)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(signal_W_tilda.5)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(signal_W_tilda.5)
plot.ts(signal_W_tilda.5)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(signal_W_tilda.6)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(signal_W_tilda.6)
plot.ts(signal_W_tilda.6)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(signal_W_tilda.7)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942), eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(signal_W_tilda.7)
plot.ts(signal_W_tilda.7)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(signal_W_tilda.8)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942), eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(signal_W_tilda.8)
plot.ts(signal_W_tilda.8)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(signal_W_tilda.9)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(signal_W_tilda.9)
plot.ts(signal_W_tilda.9)
Reconstruction from Dual Wavelets
Description
Computes the reconstructed signal from the ridge, given the inverse of the matrix Q.
Usage
skeleton(cwtinput, Qinv, morvelets, bridge, aridge, N)
Arguments
cwtinput |
continuous wavelet transform (as the output of cwt) |
Qinv |
inverse of the reconstruction kernel (2D array) |
morvelets |
array of Morlet wavelets located at the ridge samples |
bridge |
time coordinates of the ridge samples |
aridge |
scale coordinates of the ridge samples |
N |
size of reconstructed signal |
Value
Returns a list of the elements of the reconstruction of a signal from sample points of a ridge
sol |
reconstruction from a ridge |
A |
matrix of the inner products |
lam |
coefficients of dual wavelets in reconstructed signal.
They are the Lagrange multipliers |
dualwave |
array containing the dual wavelets. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
skeleton2
, zeroskeleton
,
zeroskeleton2
.
Reconstruction from Dual Wavelet
Description
Computes the reconstructed signal from the ridge in the case of real constraints.
Usage
skeleton2(cwtinput, Qinv, morvelets, bridge, aridge, N)
Arguments
cwtinput |
continuous wavelet transform (as the output of cwt). |
Qinv |
inverse of the reconstruction kernel (2D array). |
morvelets |
array of Morlet wavelets located at the ridge samples. |
bridge |
time coordinates of the ridge samples. |
aridge |
scale coordinates of the ridge samples. |
N |
size of reconstructed signal. |
Value
Returns a list of the elements of the reconstruction of a signal from sample points of a ridge
sol |
reconstruction from a ridge. |
A |
matrix of the inner products. |
lam |
coefficients of dual wavelets in reconstructed signal. They
are the Lagrange multipliers |
dualwave |
array containing the dual wavelets. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Smoothing Time Series
Description
Smooth a time series by averaging window.
Usage
smoothts(ts, windowsize)
Arguments
ts |
Time series. |
windowsize |
Length of smoothing window. |
Value
Smoothed time series (1D array).
References
See discussions in the text of “Time-Frequency Analysis”.
Smoothing and Time Frequency Representation
Description
smooth the wavelet (or Gabor) transform in the time direction.
Usage
smoothwt(modulus, subrate, flag=FALSE)
Arguments
modulus |
Time-Frequency representation (real valued). |
subrate |
Length of smoothing window. |
flag |
If set to TRUE, subsample the representation. |
Value
2D array containing the smoothed transform.
References
See discussions in the text of “Time-Frequency Analysis”.
See Also
corona
, coronoid
, snake
,
snakoid
.
Ridge Estimation by Snake Method
Description
Estimate a ridge from a time-frequency representation, using the snake method.
Usage
snake(tfrep, guessA, guessB, snakesize=length(guessB),
tfspec=numeric(dim(modulus)[2]), subrate=1, temprate=3, muA=1,
muB=muA, lambdaB=2 * muB, lambdaA=2 * muA, iteration=1000000,
seed=-7, costsub=1, stagnant=20000, plot=TRUE)
Arguments
tfrep |
Time-Frequency representation (real valued). |
guessA |
Initial guess for the algorithm (frequency variable). |
guessB |
Initial guess for the algorithm (time variable). |
snakesize |
the length of the initial guess of time variable. |
tfspec |
Estimate for the contribution of the noise to modulus. |
subrate |
Subsampling rate for ridge estimation. |
temprate |
Initial value of temperature parameter. |
muA |
Coefficient of the ridge's derivative in cost function (frequency component). |
muB |
Coefficient of the ridge's derivative in cost function (time component). |
lambdaB |
Coefficient of the ridge's second derivative in cost function (time component). |
lambdaA |
Coefficient of the ridge's second derivative in cost function (frequency component). |
iteration |
Maximal number of moves. |
seed |
Initialization of random number generator. |
costsub |
Subsampling of cost function in output. |
stagnant |
maximum number of steps without move (for the stopping criterion) |
plot |
when set (by default), certain results will be displayed |
Value
Returns a structure containing:
ridge |
1D array (of same length as the signal) containing the ridge. |
cost |
1D array containing the cost function. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
corona
, coronoid
, icm
,
snakoid
.
Restriction to a Snake
Description
Restrict time-frequency transform to a snake.
Usage
snakeview(modulus, snake)
Arguments
modulus |
Time-Frequency representation (real valued). |
snake |
Time and frequency components of a snake. |
Details
Recall that a snake is a (two components) R structure.
Value
2D array containing the restriction of the transform modulus to the snake.
References
See discussions in the text of “Time-Frequency Analysis”.
Modified Snake Method
Description
Estimate a ridge from a time-frequency representation, using the modified snake method (modified cost function).
Usage
snakoid(modulus, guessA, guessB, snakesize=length(guessB),
tfspec=numeric(dim(modulus)[2]), subrate=1, temprate=3, muA=1,
muB=muA, lambdaB=2 * muB, lambdaA=2 * muA, iteration=1000000,
seed=-7, costsub=1, stagnant=20000, plot=TRUE)
Arguments
modulus |
Time-Frequency representation (real valued). |
guessA |
Initial guess for the algorithm (frequency variable). |
guessB |
Initial guess for the algorithm (time variable). |
snakesize |
The length of the first guess of time variable. |
tfspec |
Estimate for the contribution of srthe noise to modulus. |
subrate |
Subsampling rate for ridge estimation. |
temprate |
Initial value of temperature parameter. |
muA |
Coefficient of the ridge's derivative in cost function (frequency component). |
muB |
Coefficient of the ridge's derivative in cost function (time component). |
lambdaB |
Coefficient of the ridge's second derivative in cost function (time component). |
lambdaA |
Coefficient of the ridge's second derivative in cost function (frequency component). |
iteration |
Maximal number of moves. |
seed |
Initialization of random number generator. |
costsub |
Subsampling of cost function in output. |
stagnant |
Maximum number of stationary iterations before stopping. |
plot |
when set(default), some results will be displayed |
Value
Returns a structure containing:
ridge |
1D array (of same length as the signal) containing the ridge. |
cost |
1D array containing the cost function. |
plot |
when set(default), some results will be displayed. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Simple Reconstruction from Ridge
Description
Simple reconstruction of a real valued signal from a ridge, by restriction of the transform to the ridge.
Usage
sridrec(tfinput, ridge)
Arguments
tfinput |
time-frequency representation. |
ridge |
ridge (1D array). |
Value
(real) reconstructed signal (1D array)
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Time-Frequency Transform Global Maxima
Description
Computes the maxima (for each fixed value of the time variable) of the modulus of a continuous wavelet transform.
Usage
tfgmax(input, plot=TRUE)
Arguments
input |
wavelet transform (as the output of the function |
plot |
if set to TRUE, displays the values of the energy as a function of the scale. |
Value
output |
values of the maxima (1D array) |
pos |
positions of the maxima (1D array) |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Time-Frequency Transform Local Maxima
Description
Computes the local maxima (for each fixed value of the time variable) of the modulus of a time-frequency transform.
Usage
tflmax(input, plot=TRUE)
Arguments
input |
time-frequency transform (real 2D array). |
plot |
if set to T, displays the local maxima on the graphic device. |
Value
values of the maxima (2D array).
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Average frequency by frequency
Description
Compute the mean of time-frequency representation frequency by frequency.
Usage
tfmean(input, plot=TRUE)
Arguments
input |
|
plot |
if set to T, displays the values of the energy as a function of the scale (or frequency). |
Value
1D array containing the noise estimate.
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Percentile frequency by frequency
Description
Compute a percentile of time-frequency representation frequency by frequency.
Usage
tfpct(input, percent=0.8, plot=TRUE)
Arguments
input |
|
percent |
percentile to be retained. |
plot |
if set to T, displays the values of the energy as a function of the scale (or frequency). |
Value
1D array containing the noise estimate.
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Variance frequency by frequency
Description
Compute the variance of time-frequency representation frequency by frequency.
Usage
tfvar(input, plot=TRUE)
Arguments
input |
|
plot |
if set to T, displays the values of the energy as a function of the scale (or frequency). |
Value
1D array containing the noise estimate.
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
DOG Wavelet Transform on one Voice
Description
Compute DOG wavelet transform at one scale.
Usage
vDOG(input, scale, moments)
Arguments
input |
Input signal (1D array). |
scale |
Scale at which the wavelet transform is to be computed. |
moments |
number of vanishing moments. |
Value
1D (complex) array containing wavelet transform at one scale.
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Gabor Functions on a Ridge
Description
Generate Gabor functions at specified positions on a ridge.
Usage
vecgabor(sigsize, nbnodes, location, frequency, scale)
Arguments
sigsize |
Signal size. |
nbnodes |
Number of wavelets to be generated. |
location |
b coordinates of the ridge samples (1D array of length nbnodes). |
frequency |
frequency coordinates of the ridge samples (1D array of length nbnodes). |
scale |
size parameter for the Gabor functions. |
Value
size parameter for the Gabor functions.
See Also
Morlet Wavelets on a Ridge
Description
Generate Morlet wavelets at specified positions on a ridge.
Usage
vecmorlet(sigsize, nbnodes, bridge, aridge, w0=2 * pi)
Arguments
sigsize |
Signal size. |
nbnodes |
Number of wavelets to be generated. |
bridge |
b coordinates of the ridge samples (1D array of length nbnodes). |
aridge |
a coordinates of the ridge samples (1D array of length nbnodes). |
w0 |
Center frequency of the wavelet. |
Value
2D (complex) array containing wavelets located at the specific points.
See Also
Gabor Transform on one Voice
Description
Compute Gabor transform for fixed frequency.
Usage
vgt(input, frequency, scale, plot=FALSE)
Arguments
input |
Input signal (1D array). |
frequency |
frequency at which the Gabor transform is to be computed. |
scale |
frequency at which the Gabor transform is to be computed. |
plot |
if set to TRUE, plots the real part of cgt on the graphic device. |
Value
1D (complex) array containing Gabor transform at specified frequency.
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Voice Wavelet Transform
Description
Compute Morlet's wavelet transform at one scale.
Usage
vwt(input, scale, w0=2 * pi)
Arguments
input |
Input signal (1D array). |
scale |
Scale at which the wavelet transform is to be computed. |
w0 |
Center frequency of the wavelet. |
Value
1D (complex) array containing wavelet transform at one scale.
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Sampling wavelet Ridge
Description
Given a ridge \phi
(for the wavelet transform), returns a
(appropriately) subsampled version with a given subsampling rate.
Usage
wRidgeSampling(phi, compr, nvoice)
Arguments
phi |
ridge (1D array). |
compr |
subsampling rate for the ridge. |
nvoice |
number of voices per octave. |
Details
To account for the variable sizes of wavelets, the sampling rate of a wavelet ridge is not uniform, and is proportional to the scale.
Value
Returns a list containing the discrete values of the ridge.
node |
time coordinates of the ridge samples. |
phinode |
scale coordinates of the ridge samples. |
nbnode |
number of nodes of the ridge samples. |
See Also
Plot Dyadic Wavelet Transform.
Description
Plot dyadic wavelet transform(output of mw
).
Usage
wpl(dwtrans)
Arguments
dwtrans |
dyadic wavelet transform (output of |
See Also
Log of Wavelet Spectrum Plot
Description
Displays normalized log of wavelet spectrum.
Usage
wspec.pl(wspec, nvoice)
Arguments
wspec |
wavelet spectrum. |
nvoice |
number of voices. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(yen)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(yen)
plot.ts(yen)
Pixel from Amber Camara
Description
Pixel from amber camara.
Usage
data(yendiff)
Format
A vector containing observations.
Source
See discussions in the text of “Practical Time-Frequency Analysis”.
References
Carmona, R. A., W. L. Hwang and B Torresani (1998, eBook ISBN:978008053942) Practical Time-Frequency Analysis: Gabor and Wavelet Transforms with an Implementation in S, Academic Press, San Diego.
Examples
data(yendiff)
plot.ts(yendiff)
Reconstruction from Wavelet Ridges
Description
Generate a zero kernel for reconstruction from ridges.
Usage
zerokernel(x.inc=1, x.min, x.max)
Arguments
x.min |
minimal value of x for the computation of |
x.max |
maximal value of x for the computation of |
x.inc |
step unit for the computation of the kernel. |
Value
matrix of the Q_2
kernel
See Also
kernel
, fastkernel
, gkernel
,
gkernel
.
Reconstruction from Dual Wavelets
Description
Computes the the reconstructed signal from the ridge when the epsilon parameter is set to zero
Usage
zeroskeleton(cwtinput, Qinv, morvelets, bridge, aridge, N)
Arguments
cwtinput |
continuous wavelet transform (as the output of |
Qinv |
inverse of the reconstruction kernel (2D array). |
morvelets |
array of Morlet wavelets located at the ridge samples. |
bridge |
time coordinates of the ridge samples. |
aridge |
scale coordinates of the ridge samples. |
N |
size of reconstructed signal. |
Details
The details of this reconstruction are the same as for the function skeleton. They can be found in the text
Value
Returns a list of the elements of the reconstruction of a signal from sample points of a ridge
sol |
reconstruction from a ridge. |
A |
matrix of the inner products. |
lam |
coefficients of dual wavelets in reconstructed signal. They are the
Lagrange multipliers |
dualwave |
array containing the dual wavelets. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.
See Also
skeleton
, skeleton2
,
zeroskeleton2
.
Reconstruction from Dual Wavelets
Description
Computes the the reconstructed signal from the ridge when the epsilon parameter is set to zero, in the case of real constraints.
Usage
zeroskeleton2(cwtinput, Qinv, morvelets, bridge, aridge, N)
Arguments
cwtinput |
continuous wavelet transform (output of |
Qinv |
inverse of the reconstruction kernel (2D array). |
morvelets |
array of Morlet wavelets located at the ridge samples. |
bridge |
time coordinates of the ridge samples. |
aridge |
scale coordinates of the ridge samples. |
N |
size of reconstructed signal. |
Details
The details of this reconstruction are the same as for the function skeleton. They can be found in the text
Value
Returns a list of the elements of the reconstruction of a signal from sample points of a ridge
sol |
reconstruction from a ridge. |
A |
matrix of the inner products. |
lam |
coefficients of dual wavelets in reconstructed signal. They
are the Lagrange multipliers |
dualwave |
array containing the dual wavelets. |
References
See discussions in the text of “Practical Time-Frequency Analysis”.