scipy is a very useful tool, a module full of mathematical processing, and I'm indebted to it. When I wanted to draw the envelope (absolute value) of the waveform using the Hilbert transform, I could write it in a few lines, so I'm very worried whether it is honest. Let data
be the target waveform
envelope.py
from scipy import signal
envelope = abs(signal.hilbert(data))
Now you can draw the envelope of the waveform. This is the result I drew with my own data. Blue is the actual data and red is the envelope.
I want to extract features from the waveform and use machine learning, so this kind of work is being taken care of by scipy. Wavelet transform, etc.
signal.cwt(data, signal.ricker, np.arange(1, 31))
It seems that calculation is possible like this, but is it true? Anyway, scipy is amazing
Recommended Posts