From 071c18f64915eccb30b7c240fb2d85c4567c7acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Thu, 10 Aug 2017 12:44:28 +0200 Subject: [PATCH] Take into account very small prediction errors (synthetics!), [Bugfix] take into account very close zero crossings --- pylot/core/pick/picker.py | 4 +++- pylot/core/pick/utils.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pylot/core/pick/picker.py b/pylot/core/pick/picker.py index c72f1f60..2497f792 100644 --- a/pylot/core/pick/picker.py +++ b/pylot/core/pick/picker.py @@ -218,8 +218,10 @@ class AICPicker(AutoPicker): inoise = getnoisewin(self.Tcf, self.Pick, self.TSNR[0], self.TSNR[1]) # check, if these are counts or m/s, important for slope estimation! # this is quick and dirty, better solution? - if max(self.Data[0].data < 1e-3): + if max(self.Data[0].data < 1e-3) and max(self.Data[0].data >= 1e-6): self.Data[0].data = self.Data[0].data * 1000000 + elif max(self.Data[0].data < 1e-6): + self.Data[0].data = self.Data[0].data * 1e12 # get signal window isignal = getsignalwin(self.Tcf, self.Pick, self.TSNR[2]) ii = min([isignal[len(isignal) - 1], len(self.Tcf)]) diff --git a/pylot/core/pick/utils.py b/pylot/core/pick/utils.py index 3fbb119c..8cad1889 100644 --- a/pylot/core/pick/utils.py +++ b/pylot/core/pick/utils.py @@ -235,7 +235,7 @@ def fmpicker(Xraw, Xfilt, pickwin, Pick, iplot=0, fig=None): li1 = index1[1] else: li1 = index1[0] - if np.size(xraw[ipick[0][1]:ipick[0][li1]]) == 0: + if np.size(xraw[ipick[0][1]:ipick[0][li1]]) == 0 or len(index1) <= 1: print("fmpicker: Onset on unfiltered trace too emergent for first motion determination!") P1 = None else: @@ -277,7 +277,7 @@ def fmpicker(Xraw, Xfilt, pickwin, Pick, iplot=0, fig=None): li2 = index2[1] else: li2 = index2[0] - if np.size(xfilt[ipick[0][1]:ipick[0][li2]]) == 0: + if np.size(xfilt[ipick[0][1]:ipick[0][li2]]) == 0 or len(index2) <= 1: print("fmpicker: Onset on filtered trace too emergent for first motion determination!") P2 = None else: