Skip to content

Commit e98b9e0

Browse files
committed
hrv - fixed pan-tompkins
1 parent 772c12f commit e98b9e0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/data_analysis/heart_rate_variability/exploring_heart_rate_variability.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,9 @@
339339
4 5 15))
340340
;; Differentiate and square
341341
(tc/add-column :sqdiff
342-
#(tcc/- (:filtered %)
343-
(tcc/shift (:filtered %) 1))))
342+
#(tcc/sq
343+
(tcc/- (:filtered %)
344+
(tcc/shift (:filtered %) 1)))))
344345
;; Find peaks with distance constraint (200 samples = ~0.29s)
345346
peak-indices (find-peaks (:sqdiff pipeline)
346347
{:distance 200})

0 commit comments

Comments
 (0)