Waveform envelope in Python

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. Unknown.png

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

Waveform envelope in Python
Draw mp3 waveform in Python
Quadtree in Python --2
CURL in python
Metaprogramming in Python
Python 3.3 in Anaconda
Geocoding in python
SendKeys in Python
Meta-analysis in Python
Unittest in python
Discord in Python
DCI in Python
quicksort in python
nCr in python
N-Gram in Python
Programming in python
Plink in Python
Constant in python
Lifegame in Python.
FizzBuzz in Python
Sqlite in python
StepAIC in Python
N-gram in python
LINE-Bot [0] in Python
Csv in python
Disassemble in Python
Reflection in Python
Constant in python
nCr in Python.
format in python
Scons in Python3
Puyo Puyo in python
python in virtualenv
PPAP in Python
Quad-tree in Python
Reflection in Python
Chemistry in Python
Hashable in python
DirectLiNGAM in Python
LiNGAM in Python
Flatten in python
flatten in python
Sorted list in Python
Daily AtCoder # 36 in Python
Clustering text in Python
Daily AtCoder # 2 in Python
Implement Enigma in python
Daily AtCoder # 32 in Python
Daily AtCoder # 6 in Python
Edit fonts in Python
Singleton pattern in Python
File operations in Python
Read DXF in python
Daily AtCoder # 53 in Python
Key input in Python
Use config.ini in Python
Daily AtCoder # 33 in Python
Solve ABC168D in Python
Logistic distribution in Python
Daily AtCoder # 7 in Python
One liner in Python