# Filter ECG signal with Wavelet and Python

I have to filter the signal of an ECG with the wavelet method with Python. The data is in a txt file. I can create my dataframe with pandas, display that with seaborn, but can not find a way to apply the filter.

The wavelet method is imposed. I do not really know how to do it.

First I tried to understand the mathematical formula to transcribe it into a python algorithm: it's clearly beyond my abilities and my knowledge (and filling this gap would take me months, even years)

I also tried using the python pywavelets library.

The problem is that I do not know what to do with cA and cD :

cA, cD = pywt.dwt([1, 2, 3, 4], 'db1')


My research on google (in English and French) directs me towards papers of scientific research which are also outside my capacities of comprehension.

• Actually this package should be the right choice for your problem. But first you should try to understand what is your goal and what you want to compute. A first step could be to watch these introductory videos youtube.com/watch?v=QX1-xGVFqmw to get a grasp what the wavelet transform is. – varantir Feb 27 '19 at 13:39
• je suis dans la même situation que toi, peux-tu, s'il te plait, me dire si t'as trouver une solution !! Merci (I am in the same situation as you, can you, please, tell me if you have a solution !! Thank you) – DamiaMHD Apr 3 '19 at 16:03