xwc (pyleoclim.utils.wavelet.xwc)
- pyleoclim.utils.wavelet.xwc(ys1, ts1, ys2, ts2, smooth_factor=0.25, tau=None, freq=None, freq_method='log', freq_kwargs=None, c=0.012665147955292222, Neff=3, nproc=8, detrend=False, sg_kwargs=None, nMC=200, gaussianize=False, standardize=False, method='Kirchner_numba', verbose=False)[source]
Return the cross-wavelet coherence of two time series.
- Parameters
ys1 (array) – first of two time series
ys2 (array) – second of the two time series
ts1 (array) – time axis of first time series
ts2 (array) – time axis of the second time series
tau (array) – the evenly-spaced time points
freq (array) – vector of frequency
c (float) – the decay constant that determines the analytical resolution of frequency for analysis, the smaller the higher resolution; the default value 1/(8*np.pi**2) is good for most of the wavelet analysis cases
Neff (int) – effective number of points
nproc (int) – the number of processes for multiprocessing
nMC (int) – the number of Monte-Carlo simulations
detrend (string) –
None: the original time series is assumed to have no trend;
’linear’: a linear least-squares fit to ys is subtracted;
’constant’: the mean of ys is subtracted
’savitzy-golay’: ys is filtered using the Savitzky-Golay filters and the resulting filtered series is subtracted from y.
Empirical mode decomposition. The last mode is assumed to be the trend and removed from the series
sg_kwargs (dict) – The parameters for the Savitzky-Golay filters. see pyleoclim.utils.filter.savitzy_golay for details.
gaussianize (bool) – If True, gaussianizes the timeseries
standardize (bool) – If True, standardizes the timeseries
method (string) –
‘Foster’: the original WWZ method;
’Kirchner’: the method Kirchner adapted from Foster;
’Kirchner_f2py’: the method Kirchner adapted from Foster with f2py
’Kirchner_numba’: Kirchner’s algorithm with Numba support for acceleration (default)
verbose (bool) – If True, print warning messages
- Returns
res – contains the cross wavelet coherence, cross-wavelet phase, vector of frequency, evenly-spaced time points, AR1 sims, cone of influence
- Return type
dict
See also
pyleoclim.utils.wavelet.wwz_basic
Returns the weighted wavelet amplitude using the original method from Kirchner. No multiprocessing
pyleoclim.utils.wavelet.wwz_nproc
Returns the weighted wavelet amplitude using the original method from Kirchner. Supports multiprocessing
pyleoclim.utils.wavelet.kirchner_basic
Return the weighted wavelet amplitude (WWA) modified by Kirchner. No multiprocessing
pyleoclim.utils.wavelet.kirchner_nproc
Returns the weighted wavelet amplitude (WWA) modified by Kirchner. Supports multiprocessing
pyleoclim.utils.wavelet.kirchner_numba
Return the weighted wavelet amplitude (WWA) modified by Kirchner using Numba package.
pyleoclim.utils.wavelet.kirchner_f2py
Returns the weighted wavelet amplitude (WWA) modified by Kirchner. Uses Fortran. Fastest method but requires a compiler.
pyleoclim.utils.filter.savitzky_golay
Smooth (and optionally differentiate) data with a Savitzky-Golay filter.
pyleoclim.utils.wavelet.make_freq_vector
Make frequency vector