CrossWavelet Transform
Before we talk about crosswavelet transform (CWT)^{1}, we need to understand wavelet transform (WT). Before we learn wavelet transform, we’d better have a good understanding of Fourier transform. Take a look at wavelet transform before moving on.
The crosswavelet transform (CWT) method is a technique that characterizes the interaction between the wavelet transform (WT) of two individual timeseries.^{2}
The CWT method allows us to measure
 the degree of synchronization phenomenon between different components
 the evolution over time of the timesseries data set.
Similarity/differences between two timeseries can be identified. If these behavioral states have different temporal evolution, the CWT method helps quantifying how different they are, and what the time lag between the two different behavioral states is. In short, this method is able to yield information on the spatiotemporal organization between two timeseries.
Synchronization
If you calculate the linear correlation between two timeseries, you will get one value for the whole data; if you calculate the “local” linear correlation, you will get a 1D line values; if you perform CWT, you will get a 2D spectrum, i.e. the correlation at a given frequency at a given time.
So far, the Hilbert transform seems to be a relevant method to detect the phase synchronization between two timeseries providing that the components of the timeseries possess the same frequencies. However, this method cannot be directly applied to the analysis of the phase synchronization between two plurifrequential components of a timeseries. A plurifrequential timeseries is composed of a timeseries with multiple frequencies occurring in the same time as it is commonly the case in living systems. The CWT method would be able to deal with such plurifrequential timeseries and is conjointly able to detect the phase synchronization of such timeseries.
Relative Phase
CWT can measure the ordering of the interaction among components, or in a continuous manner, lag.
Requirements
 Same duration for the two timeseries
 Similar sampling rate (downsampling may be useful if one of the timeseries has a higher sampling rate than the other)
Example
Here I repost the example given in the referenced tutorial. Two synthetic timeseries were created. The two timeseries, s1 (Figure 2A) and s2 (Figure 2B) have a duration of 102.4 s (with a sampling rate of 50 Hz). The amplitude of s1 and s2 is 1 arbitrary unit (a.u.). Both timeseries have been divided into five intervals.
 For the first three intervals
[0–61.44]
, the timeseries are composed of a high frequency component at 1 Hz and a low frequency component at 0.5 Hz.  For the last two intervals
[61.44–102.4]
, the timeseries are composed of a high frequency component (1 Hz) and an intermediate frequency component (0.75 Hz).  1st interval: characterized by a zero degree RP between s1 and s2 (the two timeseries are identical in this interval).
 2nd interval: the timeseries s1 is characterized by a 90° phase lag in the high frequency component (1 Hz).
 3rd interval: a 90° phase lag is applied on s1 in the low frequency component (0.5 Hz).
 4th interval: a phase lag of 90° on the high frequency component and a phase lag of 180° on the intermediate frequency component are applied to s1.
 5th interval: a phase lag of 180° on the high frequency component and of 90° on the intermediate frequency component are applied to s1 (see Table 1 for a summary of the changes made to s1).
 No phase lag exists in s2.
Discriminate the Properties of TimeSeries
Following the statistical test described in Wavelet Transform, we can obtain what is usually known as the cone of influence, which is the region under the thin black lines in Figure 1.
Tools
MATLAB
MATLAB’s wavelet toolbox provides wcoherence for computing the crosswavelet tranform. The key formula is
\[ \frac{ S(C_x^\ast(a,b) C_y(a,b) ) ^2}{S( C_x(a,b) ^2)\cdot S( C_y(a,b) ^2)} \]
where \( C_x(a,b) \) and \( C_y(a,b) \) denote the continuous wavelet transforms of x and y at scales a and positions b. The superscript * is the complex conjugate and S is a smoothing operator in time and scale.
Julia
Waiting for the magic to happen in ContinuousWavelets.jl.

This acronym is also used for continuous wavelet transform, to be distinguished from discrete wavelet transform. In MATLAB, the
cwt
function refers to continuous wavelet transform. ↩ 
There is a nice reference in the field of psychology, The relevance of the crosswavelet transform in the analysis of human interaction – a tutorial. ↩