mouslyddiaw / wavedel

Wavelet-based ECG delineator
2 stars 1 forks source link

question #1

Open xhl1370 opened 2 years ago

xhl1370 commented 2 years ago

What if the sampling rate is less than 250?

mouslyddiaw commented 2 years ago

It should not matter. The algorithm is designed to work for any sampling rate.

xhl1370 commented 2 years ago

It should not matter. The algorithm is designed to work for any sampling rate.

But the graph doesn't detect the waveform

xhl1370 commented 2 years ago

QQ图片20221017215422

xhl1370 commented 2 years ago

_OH4 @ 1TK~15IG8W%PBGD0

xhl1370 commented 2 years ago

My data sample rate is 100Hz

mouslyddiaw commented 2 years ago

Does it work if you try resampling it (with scipy.signal.resample for instance)? What's the duration of your signal (seconds, minutes)?

xhl1370 commented 2 years ago

The signal lasts for eight or nine hours and is an electrocardiographic signal. The sampling rate is 100Hz, lower than 250Hz

xhl1370 commented 2 years ago

Will the signal upsampling be distorted?

xhl1370 commented 2 years ago

Will increasing the sample rate distort the signal? The code doesn't seem to work with signals below 250Hz

mouslyddiaw commented 2 years ago

Assuming you are running main.py have you changed the value of the sampling rate in markers = ecg_delineator(ecg, sampling_rate = 500) by replacing 500 with 100? Otherwise, how are you running the algorithm? Are you feeding the whole 8 hours to the algorithm? Maybe try a shorter subset first? No, upsampling should not distort the signal. There is no reason for the method to fail for lower sampling rates specially given how clean your signal is.

xhl1370 commented 2 years ago

![Uploading QQ图片20221017221544.png…]()

xhl1370 commented 2 years ago

QQ图片20221017221544

xhl1370 commented 2 years ago

QQ图片20221017221605

xhl1370 commented 2 years ago

QQ图片20221017221800

xhl1370 commented 2 years ago

What I'm trying is 1000 samples, which is 10 seconds, and the sampling frequency is 100Hz

xhl1370 commented 2 years ago

Maybe I could try upsampling, but generally I only use oversampling. Thank you very much for answering my question

mouslyddiaw commented 2 years ago

Alright. Please try to resample the signal to 500 Hz for instance and see if the algorithm behaves differently.

xhl1370 commented 2 years ago

thank you very much

xhl1370 commented 2 years ago

This dataset uses apnea-ecg-database-1.0.0, I can detect the QRS waveform by upsampling

xhl1370 commented 2 years ago

Is there an explanation for this code? I can't understand some places. If there is, I would really appreciate it

mouslyddiaw commented 2 years ago

Which part can't you understand? Reading the original paper might help.