From 05c4add14e5073458d185246faa999e7747698a6 Mon Sep 17 00:00:00 2001 From: Jimena Arruti Date: Fri, 11 Feb 2022 13:34:23 -0300 Subject: [PATCH] interchanged pre and pos prefixes in peak_detection function --- carat/features.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/carat/features.py b/carat/features.py index a7cf274..21671db 100644 --- a/carat/features.py +++ b/carat/features.py @@ -600,7 +600,7 @@ def peak_detection(feature, threshold=0.05, pre_avg=0, pos_avg=0, pre_max=1, pos # compute the moving average if avg_length > 1: # origin controls the placement of the filter - avg_origin = int(np.floor((pre_avg - pos_avg) / 2)) + avg_origin = int(np.floor((pos_avg - pre_avg) / 2)) # moving average mov_avg = sp.ndimage.filters.uniform_filter(data, avg_length, mode='constant', @@ -615,7 +615,7 @@ def peak_detection(feature, threshold=0.05, pre_avg=0, pos_avg=0, pre_max=1, pos # compute the moving maximum if max_length > 1: # origin controls the placement of the filter - max_origin = int(np.floor((pre_max - pos_max) / 2)) + max_origin = int(np.floor((pos_max - pre_max) / 2)) # moving maximum mov_max = sp.ndimage.filters.maximum_filter(candidates, max_length, mode='constant',