analyze_Awavelet: Conduct the adaptive continuous wavelet transform on a time...

View source: R/analyze_Awavelet.R

analyze_AwaveletR Documentation

Conduct the adaptive continuous wavelet transform on a time series or signal

Description

Compute the continuous wavelet transform (CWT) using a complex Morlet wavelet with scale dependent wavelet width. The number of oscillatory cycles in the Morlet wavelet is allowed to vary smoothly with scale, enabling adaptive time frequency resolution similar in spirit to superlet based approaches.

Usage

analyze_Awavelet(
  data = NULL,
  dj = 1/100,
  lowerPeriod = 2,
  upperPeriod = 1024,
  verbose = FALSE,
  omega_min = 6,
  omega_max = 12,
  scaling = c("none", "log2", "linear", "sqrt", "quadratic", "power"),
  alpha = 1,
  n_simulations = 10,
  run_multicore = FALSE
)

Arguments

data

Input data, should be a matrix or data frame in which the first column is depth or time and the second column is the proxy record.

dj

Spacing between successive scales. Scales increase by powers of two as 2^(j * dj). Smaller values of dj increase frequency resolution at the expense of computational time. Default is 1/100.

lowerPeriod

Lowest period to be analysed. Defines the smallest scale of the transform.

upperPeriod

Highest period to be analysed. Defines the largest scale of the transform.

verbose

Logical. If TRUE, print interpolation diagnostics.

omega_min

Minimum number of oscillatory cycles of the Morlet wavelet.

omega_max

Maximum number of oscillatory cycles of the Morlet wavelet.

scaling

Character string defining how the number of wavelet cycles varies with scale. One of "log2", "linear", "sqrt", "quadratic", or "power".

alpha

Numeric. Exponent used when scaling = "power". Values greater than one emphasize high frequency sharpening, whereas values smaller than one emphasize low frequency sharpening.

n_simulations

Number of Monte Carlo simulations. Currently included for interface compatibility.

run_multicore

Logical. Currently included for interface compatibility.

Value

A list with class "analyze.Awavelet" containing:

  • Wave: complex wavelet coefficients

  • Phase: instantaneous phase

  • Ampl: wavelet amplitude

  • Power: wavelet power spectrum

  • dt: sampling interval

  • dj: scale spacing

  • Power.avg: average power per period

  • Period: physical periods

  • Scale: wavelet scales

  • coi.1: cone of influence x coordinates

  • coi.2: cone of influence y coordinates

  • nc: number of samples

  • nr: number of scales

  • axis.1: x axis values

  • axis.2: log2 scaled periods

  • omega_min: minimum wavelet cycles

  • omega_max: maximum wavelet cycles

  • omega: scale dependent wavelet cycles

  • scaling: scaling method used

  • alpha: power law exponent

  • x: interpolated x values

  • y: interpolated signal values

Author(s)

Adapted from the WaveletComp and biwavelet R packages, which are based on the MATLAB wavelet code by Torrence and Compo, with extensions for scale dependent wavelet width.

References

Torrence, C., and G. P. Compo (1998). A practical guide to wavelet analysis. Bulletin of the American Meteorological Society, 79, 61–78.

Morlet, J., G. Arens, E. Fourgeau, and D. Giard (1982). Wave propagation and sampling theory. Geophysics, 47, 203–236.

Examples


#Example 1. Using the Total Solar Irradiance data set of Steinhilber et al., (2012)
TSI_wt <-
 analyze_Awavelet(
   data = TSI,
   dj = 1/200,
   lowerPeriod = 16,
   upperPeriod = 8192,
   verbose = FALSE,
omega_min = 6,
omega_max = 12,
scaling = "log2",
alpha = 1
 )


#Example 2. Using the magnetic susceptibility data set of Pas et al., (2018)
mag_wt <-
analyze_Awavelet(
data = mag,
dj = 1/100,
lowerPeriod = 0.1,
upperPeriod = 254,
verbose = FALSE,
omega_min = 6,
omega_max = 12,
scaling = "log2",
alpha = 1
)

#Example 3. Using the greyscale data set of Zeeden et al., (2013)
grey_wt <-
 analyze_Awavelet(
   data = grey,
   dj = 1/200,
   lowerPeriod = 0.02,
   upperPeriod = 256,
   verbose = FALSE,
omega_min = 6,
omega_max = 12,
scaling = "log2",
alpha = 1,
 )



WaverideR documentation built on April 6, 2026, 5:06 p.m.