Skip to content

Commit

Permalink
Bugfix reported in #24
Browse files Browse the repository at this point in the history
The wrong array is checked for length. Thanks for @purpl3F0x for spotting it.
  • Loading branch information
berndporr committed Jan 21, 2024
1 parent 7a1ca56 commit f5d949d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ecgdetectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def hamilton_detector(self, unfiltered_ecg):
QRS.append(peak)
idx.append(i)
s_pks.append(ma[peak])
if len(n_pks)>8:
if len(s_pks)>8:
s_pks.pop(0)
s_pks_ave = np.mean(s_pks)

Expand Down

0 comments on commit f5d949d

Please sign in to comment.