Python Forum

Full Version: How to denoise ECG Signal with median filter using WFDB for Python?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Anybody familiar with WFDB application for Python?

So I'm trying to denoise MIT-BIH Arrhythmia Database (mitdb) downloaded from Physionet using median filter. Using WFDB, I can read the signal data with the following code:

 record = wfdb.rdrecord('mitdb/100', sampto=3000) 
 ann = wfdb.rdann('mitdb/100', 'atr', sampto=3000)
Then, when it comes to denoising, I read the WFDB documentation for Python and there is no such function to do median filter, unlike WFDB for Matlab which has the function medfilt

I am aware that SciPy Signal has medfilt function but if I read the signal data with WFDB, how can I input the data in the medfilt SciPy Signal function? Or should I use another method to read/open the data so I can use medfilt in SciPy? Or perhaps anybody know how to do median filtering with WFDB in Python?

TIA