freq_vector_scale (pyleoclim.utils.wavelet.freq_vector_scale)

pyleoclim.utils.wavelet.freq_vector_scale(ts, dj=0.25, s0=None, j1=None, mother='MORLET', param=None)[source]

Return the frequency vector based on scales for wavelet analysis. This function is adapted from Torrence and Compo

Parameters
  • ts (numpy.array) – The time axis for the timeseries

  • dj (float, optional) – The spacing between discrete scales. The default is 0.25. A smaller number will give better scale resolution, but be slower to plot.

  • s0 (float, optional) – the smallest scale of the wavelet. The default is None, representing 2*dT.

  • j1 (float, optional) – the number of scales minus one. Scales range from S0 up to S0*2**(J1*DJ), to give a total of (J1+1) scales. The default is None, which represents (LOG2(N DT/S0))/DJ.

  • 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.

Returns

freq – the frequency vector

Return type

array

See also

pyleoclim.utils.wavelet.freq_vector_lomb_scargle

Return the frequency vector based on the REDFIT recommendation.

pyleoclim.utils.wavelet.freq_vector_welch

Return the frequency vector based on the Welch’s method.

pyleoclim.utils.wavelet.freq_vector_nfft

Return the frequency vector based on NFFT

pyleoclim.utils.wavelet.freq_vector_log

Return the frequency vector based on logspace

pyleoclim.utils.wavelet.make_freq_vector

Make frequency vector

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/