-
-
Notifications
You must be signed in to change notification settings - Fork 507
Open
Labels
Description
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)