I want to compute the wavelet of a signal with different scales and timeshifts.
In Matlab using the cwt()
function (Continuous 1-D wavelet transform) provided in the Wavelet Toolbox I can specify the scale(s) I want as a parameter to cwt(), and it will return all possible timeshifts:
x = [1, 2, 3, 4];
scales = [1, 2, 3];
wavelet_name = 'db1';
coefs = cwt(x,scales, wavelet_name);
>> coefs =
-0.0000 -0.0000 -0.0000 0.0000
-0.7071 -0.7071 -0.7071 -0.7071
-1.1553 -1.1553 -1.1553 1.7371
How can I achieve that in Python?
Here are my two attempts so far:
- In PyWavelets (Discrete Wavelet Transform in Python), I don't see how I can specify the scale parameter of the wavelet.
- In
scipy.signal.cwt
, I can't find the list of the built-in wavelet functions that I can pass to scipy.signal.cwt: I want to have at least the most common wavelet functions such as sym2 and db1. (e.g. see Matlab's built-in wavelet list).