Merge branch 'develop' of ariadne:/data/git/pylot into develop
This commit is contained in:
commit
cb1fb60eec
@ -215,6 +215,8 @@ class LocalMagnitude(Magnitude):
|
|||||||
th = np.arange(0, len(sqH) * dt, dt)
|
th = np.arange(0, len(sqH) * dt, dt)
|
||||||
# get maximum peak within pick window
|
# get maximum peak within pick window
|
||||||
iwin = getsignalwin(th, t0 - stime, self.calc_win)
|
iwin = getsignalwin(th, t0 - stime, self.calc_win)
|
||||||
|
ii = min([iwin[len(iwin)-1], len(th)])
|
||||||
|
iwin = iwin[0:ii]
|
||||||
wapp = np.max(sqH[iwin])
|
wapp = np.max(sqH[iwin])
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
print("Determined Wood-Anderson peak-to-peak amplitude for station {0}: {1} "
|
print("Determined Wood-Anderson peak-to-peak amplitude for station {0}: {1} "
|
||||||
|
@ -212,6 +212,14 @@ class AICPicker(AutoPicker):
|
|||||||
self.Data[0].data = self.Data[0].data * 1000000
|
self.Data[0].data = self.Data[0].data * 1000000
|
||||||
# get signal window
|
# get signal window
|
||||||
isignal = getsignalwin(self.Tcf, self.Pick, self.TSNR[2])
|
isignal = getsignalwin(self.Tcf, self.Pick, self.TSNR[2])
|
||||||
|
ii = min([isignal[len(isignal)-1], len(self.Tcf)])
|
||||||
|
isignal = isignal[0:ii]
|
||||||
|
try:
|
||||||
|
aic[isignal]
|
||||||
|
except IndexError as e:
|
||||||
|
msg = "Time series out of bounds! {}".format(e)
|
||||||
|
print(msg)
|
||||||
|
return
|
||||||
# calculate SNR from CF
|
# calculate SNR from CF
|
||||||
self.SNR = max(abs(aic[isignal] - np.mean(aic[isignal]))) / \
|
self.SNR = max(abs(aic[isignal] - np.mean(aic[isignal]))) / \
|
||||||
max(abs(aic[inoise] - np.mean(aic[inoise])))
|
max(abs(aic[inoise] - np.mean(aic[inoise])))
|
||||||
|
Loading…
Reference in New Issue
Block a user