Take into account that for individual stations cut times are set to zero, which has then lead to wrong initial pick times.

This commit is contained in:
Ludger Küperkoch 2019-06-17 20:48:01 +02:00
parent d9777eaa05
commit 291db16e2b

View File

@ -74,6 +74,7 @@ def earllatepicker(X, nfac, TSNR, Pick1, iplot=0, verbosity=1, fig=None, linecol
x = X[0].data
t = np.linspace(0, X[0].stats.npts / X[0].stats.sampling_rate,
X[0].stats.npts)
inoise = getnoisewin(t, Pick1, TSNR[0], TSNR[1])
# get signal window
isignal = getsignalwin(t, Pick1, TSNR[2])
@ -824,6 +825,10 @@ def checksignallength(X, pick, minsiglength, pickparams, iplot=0, fig=None, line
rms = abs(x1)
t = np.linspace(0, X[0].stats.delta * ilen, ilen)
if pick >= t[np.size(t)-1]: # it might happen, that for individual stations cut times
# are set to zero because of too small time series
# => pick time has to be reduced for pstart
pick = pick - pickparams["pstart"]
# get noise window in front of pick plus saftey gap
inoise = getnoisewin(t, pick, TSNR[0], TSNR[1])
@ -1141,6 +1146,11 @@ def checkZ4S(X, pick, pickparams, iplot, fig=None, linecolor='k'):
te = np.arange(0, edat[0].stats.npts / edat[0].stats.sampling_rate,
edat[0].stats.delta)
if pick >= tz[np.size(tz)-1]: # it might happen, that for individual stations cut times
# are set to zero because of too small time series
# => pick time has to be reduced for pstart
pick = pick - pickparams["pstart"]
zdiff = (zdat[0].stats.starttime - min_t)
ndiff = (ndat[0].stats.starttime - min_t)
ediff = (edat[0].stats.starttime - min_t)