Skip to content

Commit

Permalink
Merge pull request #949 from LucaCerina/bugfix-function_ecg_findpeaks…
Browse files Browse the repository at this point in the history
…_rodrigues

[Fix] Fixed rodrigues2021 ECG peaks detector (make it work with < 50Hz sampling rate)
  • Loading branch information
DominiqueMakowski authored Jan 17, 2024
2 parents 2a1c621 + 576fa90 commit b25b8bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neurokit2/ecg/ecg_findpeaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ def _ecg_findpeaks_rodrigues(signal, sampling_rate=1000, **kwargs):
"""

N = int(np.round(3 * sampling_rate / 128))
N = int(np.clip(np.round(3 * sampling_rate / 128), 2, None))
Nd = N - 1
Pth = (0.7 * sampling_rate) / 128 + 2.7
# Pth = 3, optimal for fs = 250 Hz
Expand Down

0 comments on commit b25b8bb

Please sign in to comment.