diff --git a/ecgdetectors.py b/ecgdetectors.py index 4b3b825..e69162a 100644 --- a/ecgdetectors.py +++ b/ecgdetectors.py @@ -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)