1 year ago
#145598
TimeTravelPenguin
Converting CWT from MatLab to Python
I am working on converting the following MatLab code into Python:
function [pos,dx]=cwt_local_maximum(x,hpw)
dx = -cwt(x,2*hpw,'haar');
pos=find(sign(-sign(diff(sign(dx))+0.5)+1))';
end
I have investigated different means to achieve this via both SciPy.Signal
and pywavelet
. Unfortunately, I have had no success due to pywavelet
accepting haar
only for the dwt
function, and not cwt
.
Is anyone able to point me in a better direction as to how to make this code work?
python
matlab
wavelet
wavelet-transform
haar-wavelet
0 Answers
Your Answer