Additional screen output of derived onset time, [Bugfix] Use of argrelmax not reliable.
This commit is contained in:
parent
b607da7262
commit
b18298c4db
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user