The continuous wavelet transform (CWT) is a highly redundant
transformation of a real-valued or complex-valued function $f(x)$, mapping it
from the time domain to the so-called time-scale domain. Loosely,
speaking the CWT coefficients are proportional to the variability of a
function at a given time and scale.The CWT is defined by a
complex correlation of a scaled and time-shifted mother wavelet with a
function $f(x)$.
Let $\psi(x)$ be a real- or complex-valued function representing a
mother wavelet, i.e. a function which meets the standard
mathematical criteria for a wavelet
and one that can be used to generate
all other wavelets within the same family.
Let $\psi^*(\cdot)$ be the complex conjugate of
$\psi(\cdot)$. The CWT of
$f(x)$ is defined as
$$W_f(a,b) \equiv \frac{1}{\sqrt{a}} \int_{-\infty}^\infty f(x) \psi^* \Bigl(\frac{x-b}{a}
\Bigr) \; dx,$$
for $(a,b) \in {\mathcal{R}}$ and $a > 0$,
where $a$ is the scale of the wavelet and $b$ is the shift of the
wavelet in time. It can be shown that the above complex correlation
maintains a duality with the Fourier transform defined by the relation
$$W_f(a,b) \equiv \frac{1}{\sqrt{a}} \int_{-\infty}^\infty f(x) \psi^* \Bigl(\frac{x-b}{a}
\Bigr) \; dx \longleftrightarrow \sqrt{a} \, F(\omega) \,\Psi^*(a\omega)$$
where $F(\cdot)$ is the Fourier transform of $f(x)$ and $\omega$ is the frequency in radians.
This function calculates the CWT in the Fourier domain followed by an inverse Fourier transform.