From df16a7cddef30bcb52844203d05badb4359ba547 Mon Sep 17 00:00:00 2001 From: Frz Date: Fri, 26 Apr 2024 22:03:00 +0800 Subject: [PATCH] Fix peak detection with HeartPy --- biobss/preprocess/signal_detectpeaks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/biobss/preprocess/signal_detectpeaks.py b/biobss/preprocess/signal_detectpeaks.py index baa687f..26fb438 100644 --- a/biobss/preprocess/signal_detectpeaks.py +++ b/biobss/preprocess/signal_detectpeaks.py @@ -138,11 +138,11 @@ def _peakdetection_peakdet(v: ArrayLike, delta: float, x: ArrayLike = None) -> A return np.array(maxtab), np.array(mintab) -def _peakdetection_heartpy(sig: ArrayLike, sampling_rate: float) -> Any: +def _peakdetection_heartpy(sig: ArrayLike, sampling_rate: float) -> dict: """Detects signal peaks using HeartPy.""" - wd, m = hp.process(sig, sample_rate=sampling_rate) + wd, _ = hp.process(sig, sample_rate=sampling_rate) - return wd, m + return wd def _peakdetection_scipy(sig: ArrayLike) -> Any: