From 8023ba2993e0217739c209f2d16e238169687d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Thu, 10 Aug 2017 15:10:15 +0200 Subject: [PATCH] [Bugfix] Wrong use of indices. --- pylot/core/pick/picker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pylot/core/pick/picker.py b/pylot/core/pick/picker.py index 8522e6d4..e9ad65ec 100644 --- a/pylot/core/pick/picker.py +++ b/pylot/core/pick/picker.py @@ -242,13 +242,14 @@ class AICPicker(AutoPicker): & (self.Tcf >= self.Pick)) # find maximum within slope determination window # 'cause slope should be calculated up to first local minimum only! - imax = np.argmax(self.Data[0].data[islope]) + #imax = np.argmax(self.Data[0].data[islope]) + imax = np.argmax(self.Data[0].data[islope[0][0]:islope[0][len(islope[0])-1]]) iislope = islope[0][0:imax+1] if len(iislope) <= 2: # calculate slope from initial onset to maximum of AIC function print("AICPicker: Not enough data samples left for slope calculation!") print("Calculating slope from initial onset to maximum of AIC function ...") - imax = np.argmax(aicsmooth[islope]) + imax = np.argmax(aicsmooth[islope[0][0]:islope[0][len(islope[0])-1]]) if imax == 0: print("AICPicker: Maximum for slope determination right at the beginning of the window!") print("Choose longer slope determination window!")