I have defined the same signal in both MatLab and Python but the results differ! Please could you help me out to see where's the issue? MatLab results are much more clear!
Best regards,
Mohammad
import numpy as np
import matplotlib.pyplot as plt
from ssqueezepy import ssq_cwt, Wavelet
# Define the signal and sampling frequency
fs = 20 # Sampling frequency in Hz
t = np.arange(0, 10, 1/fs)
x = np.sin(2 * np.pi * t)
fig, axs = plt.subplots(figsize=(15,10))
kw = dict(wavelet=Wavelet(('morlet'), N=1024), scales='log-piecewise', nv=32, fs=None, t=t,
ssq_freqs=None, padtype='symmetric', squeezing='sum', maprange='energy',
difftype='trig', difforder=None, gamma=None, vectorized=True,
preserve_transform=None, astensor=True, order=0, nan_checks=None,
patience=0, flipud=True, cache_wavelet=None,
get_w=False, get_dWx=False)
Tx, Wx, ssq_freqs, scales = ssq_cwt(x, **kw)
imshow(Tx, abs=1, ridge=0, cmap='turbo', yticks=ssq_freqs, xticks=t, show=1, title="abs(SSQ_CWT)",
xlabel='Time (sec)', ylabel='Frequency [Hz]', ax=axs, fig=fig)
Dear @OverLordGoldDragon
I have defined the same signal in both MatLab and Python but the results differ! Please could you help me out to see where's the issue? MatLab results are much more clear!
Best regards, Mohammad