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,
|
SNRPdB,
|
||||||
FM)
|
FM)
|
||||||
print(msg)
|
print(msg)
|
||||||
msg = 'autopickstation: Refined P-Pick: {} s | P-Error: {} s'.format(mpickP, Perror)
|
|
||||||
print(msg)
|
print(msg)
|
||||||
Sflag = 1
|
Sflag = 1
|
||||||
|
|
||||||
@ -843,7 +842,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
lpickS = lpick[ipick]
|
lpickS = lpick[ipick]
|
||||||
Serror = pickerr[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)
|
print(msg)
|
||||||
|
|
||||||
# get SNR
|
# get SNR
|
||||||
|
@ -253,13 +253,15 @@ class AICPicker(AutoPicker):
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
print("Slope Calculation: empty array islope, check signal window")
|
print("Slope Calculation: empty array islope, check signal window")
|
||||||
return
|
return
|
||||||
if len(dataslope) <= 1:
|
if len(dataslope) <= 2:
|
||||||
print('No or not enough data in slope window found!')
|
print('No or not enough data in slope window found!')
|
||||||
return
|
return
|
||||||
|
try:
|
||||||
imaxs, = argrelmax(dataslope)
|
imaxs, = argrelmax(dataslope)
|
||||||
if imaxs.size:
|
imaxs.size
|
||||||
imax = imaxs[0]
|
imax = imaxs[0]
|
||||||
else:
|
except ValueError as e:
|
||||||
|
print(e, 'picker: argrelmax not working!')
|
||||||
imax = np.argmax(dataslope)
|
imax = np.argmax(dataslope)
|
||||||
iislope = islope[0][0:imax + 1]
|
iislope = islope[0][0:imax + 1]
|
||||||
if len(iislope) < 2:
|
if len(iislope) < 2:
|
||||||
|
Loading…
Reference in New Issue
Block a user