tc_wavelet (pyleoclim.utils.wavelet.tc_wavelet)

pyleoclim.utils.wavelet.tc_wavelet(Y, dt, scale, mother, param, pad=False)[source]

WAVELET 1D Wavelet transform. Adapted from Torrence and Compo to fit existing Pyleoclim functionalities

Computes the wavelet transform of the vector Y (length N), with sampling rate DT.

By default, the Morlet wavelet (k0=6) is used. The wavelet basis is normalized to have total energy=1 at all scales.

Parameters
  • Y (numpy.array) – the time series of length N.

  • dt (float) – the sampling time

  • mother (string, optional) – the mother wavelet function. The default is ‘MORLET’. Options are: ‘MORLET’, ‘PAUL’, or ‘DOG’

  • param (flaot, optional) –

    the mother wavelet parameter. The default is None since it varies for each mother
    • For ‘MORLET’ this is k0 (wavenumber), default is 6.

    • For ‘PAUL’ this is m (order), default is 4.

    • For ‘DOG’ this is m (m-th derivative), default is 2.

  • pad ({True,False}, optional) – Whether or not to pad the timeseries. with zeroes to get N up to the next higher power of 2. This prevents wraparound from the end of the time series to the beginning, and also speeds up the FFT’s used to do the wavelet transform. This will not eliminate all edge effects. The default is False.

Returns

  • wave (numpy.array) – The wavelet coefficients

  • coi (numpy.array) – The cone of influence. Periods greater than this are subject to edge effects.

See also

pyleoclim.utils.wavelet.tc_wave_bases

1D wavelet functions Morlet, Paul or Dog

References

Torrence, C. and G. P. Compo, 1998: A Practical Guide to Wavelet Analysis. Bull. Amer. Meteor. Soc., 79, 61-78. Python routines available at http://paos.colorado.edu/research/wavelets/