Skip to content

Complex Morlet wavelet in CWT is not symmetric at fractional scale #535

@amanita-citrina

Description

@amanita-citrina

Complex Morlet coefficients should always be symmetric

This issue may be related to issue #531.

The complex Morlet wavelet at fractional scales is not symmetric in the real part nor anti-symmetric in the imaginary part. This can be seen by computing the CWT of a Dirac signal (single impulse).

In my application, this caused strange artefacts similar to #531. They vanished when I applied the equations from Wikipedia directly. I chose the sampling instants such that the wavelet coefficients were symmetric/anti-symmetric.

To reproduce the issue, consider the code snippet below. (Integer scales yield the expected symmetries.)

import pywt
import numpy as np
import matplotlib.pyplot as plt

x = np.arange(-16,16) == 0
coef,freqs = pywt.cwt(x, 2.3, 'cmor2.0-1.0')
y = np.vstack([np.real(coef), np.imag(coef)]).T
plt.plot(y)

cwt_dirac

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions