Additional screen output of derived onset time, [Bugfix] Use of argrelmax not reliable.

This commit is contained in:
Ludger Küperkoch 2018-06-25 15:24:36 +02:00
parent b607da7262
commit b18298c4db
2 changed files with 7 additions and 6 deletions

View File

@ -564,7 +564,6 @@ def autopickstation(wfstream, pickparam, verbose=False,
SNRPdB,
FM)
print(msg)
msg = 'autopickstation: Refined P-Pick: {} s | P-Error: {} s'.format(mpickP, Perror)
print(msg)
Sflag = 1
@ -843,7 +842,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
lpickS = lpick[ipick]
Serror = pickerr[ipick]
msg = 'autopickstation: Refined S-Pick: {} s | S-Error: {} s'.format(mpickS, Serror)
msg = 'autopickstation: Refined S-Pick: {} s | S-Error: {} s'.format(hdat[0].stats.starttime + mpickS, Serror)
print(msg)
# get SNR

View File

@ -253,13 +253,15 @@ class AICPicker(AutoPicker):
except IndexError:
print("Slope Calculation: empty array islope, check signal window")
return
if len(dataslope) <= 1:
if len(dataslope) <= 2:
print('No or not enough data in slope window found!')
return
try:
imaxs, = argrelmax(dataslope)
if imaxs.size:
imaxs.size
imax = imaxs[0]
else:
except ValueError as e:
print(e, 'picker: argrelmax not working!')
imax = np.argmax(dataslope)
iislope = islope[0][0:imax + 1]
if len(iislope) < 2: