*! version 1.1.0 2026-05-11

Title

wt -- Continuous Wavelet Transform

Syntax

wt varname [if] [in],
[dt(#) mother(name) param(#) dj(#) s0(#)
siglvl(#) plot colormap(name) nodisplay]

Description

wt computes the Continuous Wavelet Transform (CWT) of a time series
using the FFT convolution theorem. The CWT provides a two-dimensional
representation of signal power as a function of time and frequency (period).

Three mother wavelets are supported:

morlet (default) — complex-valued, optimal time-frequency
localization, k0=6

paul — complex-valued, sharper time localization, m=4

dog — real-valued, Derivative of Gaussian, m=2

Options

dt(#) time step (default 1)

mother(name) mother wavelet: morlet, paul, dog (default morlet)

param(#) wavelet-specific parameter (-1 = use default)

dj(#) scale spacing in sub-octaves (default 0.25)

s0(#) smallest scale (default 2*dt)

siglvl(#) significance level for AR(1) test (default 0.95)

plot produce time-frequency power heatmap (smooth gradient,
log-scaled period axis, colorbar in log-power units)

colormap(name) heatmap colormap: parula (default,
MATLAB-style), jet, turbo

Examples

. wt gdp, dt(1) mother(morlet) plot

. wt gdp, dt(1) plot colormap(jet)

. mat list e(power)

. mat list e(period)

Stored results

e(power) wavelet power |W|² (nscale × N)

e(period) Fourier period (nscale × 1)

e(scale) wavelet scale (nscale × 1)

e(coi) cone of influence (N × 1)

e(signif) significance level per scale (nscale × 1)

References

Torrence, C. & Compo, G.P. (1998). A practical guide to wavelet
analysis. Bull. Amer. Meteor. Soc. 79: 61-78.

Also see

wavelet, xwt, wtc