I did the cwt on a chirp signal :
import numpy as np
from scipy.signal import chirp
import matplotlib.pyplot as plt
T = 5
n = 1000
t = np.linspace(0, T, n, endpoint=False)
f0 = 1
f1 = 10
y = chirp(t, f0, T, f1, method='logarithmic')
plt.plot(t, y)
plt.grid(alpha=0.25)
plt.xlabel('t (seconds)')
plt.show()
from scipy import signal
import matplotlib.pyplot as plt
widths = np.arange(1,100) #wavelet widths
cwtmatr = signal.cwt(y, signal.ricker, widths)
plt.pcolormesh(t,widths,cwtmatr,shading='auto',cmap='jet')
As you can see I get time values on x-axis. However, I get width values on y-axis . How can I convert the width values to the corresponding wavelet frequencies ?


signal.ricker(compute center freq forwidth=1instead of using5). – OverLordGoldDragon Sep 30 '22 at 06:59