0

I'm trying to define my own wavelet to perform wavelet transform on some data. Previously, I used the already defined morlet wavelet in python, but I wanted to create my own wavelet, which is basically the same as the morlet wavelet, but instead of cosine I use sine. I haven't been able to find any resources that provide examples of this or something similar.

I'm not sure how to define the wavelet and then how to use it when calling pywt.cwt. Like how to define it then what does wavelet = "" in pywt.cwt.

I tried to define the wavelet as a function but then I'm not sure how it's used in pywt.cwt

  • What you are looking for is probably the imaginary part of the complex morlet wavelet. In matlab: `[a,b]=cmorwavf(-pi,pi,100);plot(b,real(a),b,imag(a))`, in python: `import numpy as np;from scipy import signal;wavelet = signal.morlet2(100, 10); import matplotlib.pyplot as plt;plt.plot(range(100),np.real(wavelet),range(100),np.imag(wavelet));plt.show()` – alle_meije Nov 18 '22 at 14:23

0 Answers0