[bugfix] if no cuttimes are set for h-comp skip S
This commit is contained in:
parent
4b6b3de547
commit
ec095c572d
@ -229,7 +229,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
|
|
||||||
# for global seismology: use tau-p method for estimating travel times (needs source and station coords.)
|
# for global seismology: use tau-p method for estimating travel times (needs source and station coords.)
|
||||||
# if not given: sets Lc to infinity to use full stream
|
# if not given: sets Lc to infinity to use full stream
|
||||||
if use_taup:
|
if use_taup == True:
|
||||||
Lc = np.inf
|
Lc = np.inf
|
||||||
print('autopickstation: use_taup flag active.')
|
print('autopickstation: use_taup flag active.')
|
||||||
if not metadata[1]:
|
if not metadata[1]:
|
||||||
@ -271,7 +271,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
pstart = max(pstart, 0)
|
pstart = max(pstart, 0)
|
||||||
pstop = min(pstop, len(zdat[0])*zdat[0].stats.delta)
|
pstop = min(pstop, len(zdat[0])*zdat[0].stats.delta)
|
||||||
|
|
||||||
if not use_taup or origin:
|
if not use_taup == True or origin:
|
||||||
Lc = pstop - pstart
|
Lc = pstop - pstart
|
||||||
|
|
||||||
Lwf = zdat[0].stats.endtime - zdat[0].stats.starttime
|
Lwf = zdat[0].stats.endtime - zdat[0].stats.starttime
|
||||||
@ -526,16 +526,31 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
else:
|
else:
|
||||||
ndat = edat
|
ndat = edat
|
||||||
|
|
||||||
if edat is not None and ndat is not None and len(edat) > 0 and len(
|
pickSonset = (edat is not None and ndat is not None and len(edat) > 0 and len(
|
||||||
ndat) > 0 and Pweight < 4:
|
ndat) > 0 and Pweight < 4)
|
||||||
|
|
||||||
|
if pickSonset:
|
||||||
|
# determine time window for calculating CF after P onset
|
||||||
|
cuttimesh = [
|
||||||
|
round(max([mpickP + sstart, 0])), # MP MP relative time axis
|
||||||
|
round(min([
|
||||||
|
mpickP + sstop,
|
||||||
|
edat[0].stats.endtime-edat[0].stats.starttime,
|
||||||
|
ndat[0].stats.endtime-ndat[0].stats.starttime
|
||||||
|
]))
|
||||||
|
]
|
||||||
|
|
||||||
|
if not cuttimesh[1] >= cuttimesh[0]:
|
||||||
|
print('Cut window for horizontal phases too small! Will not pick S onsets.')
|
||||||
|
pickSonset = False
|
||||||
|
|
||||||
|
if pickSonset:
|
||||||
msg = 'Go on picking S onset ...\n' \
|
msg = 'Go on picking S onset ...\n' \
|
||||||
'##################################################\n' \
|
'##################################################\n' \
|
||||||
'Working on S onset of station {0}\nFiltering horizontal ' \
|
'Working on S onset of station {0}\nFiltering horizontal ' \
|
||||||
'traces ...'.format(edat[0].stats.station)
|
'traces ...'.format(edat[0].stats.station)
|
||||||
if verbose: print(msg)
|
if verbose: print(msg)
|
||||||
# determine time window for calculating CF after P onset
|
|
||||||
cuttimesh = [round(max([mpickP + sstart, 0])),
|
|
||||||
round(min([mpickP + sstop, Lwf]))]
|
|
||||||
|
|
||||||
if algoS == 'ARH':
|
if algoS == 'ARH':
|
||||||
# re-create stream object including both horizontal components
|
# re-create stream object including both horizontal components
|
||||||
|
Loading…
Reference in New Issue
Block a user