diff --git a/pylot/core/pick/picker.py b/pylot/core/pick/picker.py index c7131bb5..676ad681 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 a65e8580..41a5509a 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: