PIA-Group / BioSPPy

Biosignal Processing in Python
Other
573 stars 274 forks source link

ecg.ecg sometimes duplicates R peaks #35

Closed stefperf closed 6 years ago

stefperf commented 6 years ago

The function ecg.ecg sometimes reports the same R peak twice in a row, which may cause users' own downstream processing to fail (by calculating an R-R distance of zero). The corresponding heartbeat wave templates also get duplicated. This happens, for example, at index 33 & 34 of the returned out['rpeaks'] and out['templates'] when the attached ecg is given as input.

ecg_resulting_in_duplicated_rpeaks.npy.zip

capcarr commented 6 years ago

Hi @stefperf Could you please indicate the sampling frequency of the signal, and the version of biosppy that you have installed?

stefperf commented 6 years ago

Biosppy version = 0.5.0 sampling frequency = 300 Hz (sorry for not realizing myself that this data was also needed)