Skip to content

Commit

Permalink
Added minimum N in rodrigues2021 peaks detector
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaCerina committed Jan 17, 2024
1 parent 3d004b4 commit 576fa90
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 @@ -1119,7 +1119,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 576fa90

Please sign in to comment.