cwt {CWT} | R Documentation |
Continuous Wavelet Transform
Description
Compute a 1D continuous wavelet transformation using 2st order derivative Gaussian wavelet.
Usage
cwt(t, scales, variance = 1, summed_wavelet = FALSE, threads = 1L)
Arguments
t |
A |
scales |
A positive |
variance |
A positive |
summed_wavelet |
If |
threads |
An |
Value
If summed_wavelet = TRUE
, it returns a data.table
where
columns are the sum of wavelet scales. If summed_wavelet = FALSE
, it
returns an array
(i.e., time, samples, and scales).
Author(s)
J. Antonio Guzmán Q.
Examples
time_series <- sin(seq(0, 20 * pi, length.out = 100))
# Using a numeric vector
cwt(t = time_series,
scales = c(1, 2, 3, 4, 5),
summed_wavelet = FALSE)
cwt(t = time_series,
scales = c(1, 2, 3, 4, 5),
summed_wavelet = TRUE)
# Using a matrix
times <- 100
frame <- matrix(rep(time_series, times),
nrow = times,
byrow = TRUE)
cwt(t = frame,
scales = c(1, 2, 3, 4, 5),
summed_wavelet = FALSE)
cwt(t = frame,
scales = c(1, 2, 3, 4, 5),
summed_wavelet = TRUE)