If one horizontal component is missing, AR prediction is calculated on original trace and copy of it.

This commit is contained in:
Ludger Küperkoch 2017-08-08 14:19:13 +02:00
parent cc2da4fc41
commit ab410b790c

View File

@ -478,6 +478,21 @@ def autopickstation(wfstream, pickparam, verbose=False,
print('autopickstation: No vertical component data available!, ' print('autopickstation: No vertical component data available!, '
'Skipping station!') 'Skipping station!')
if ((len(edat) > 0 and len(ndat) == 0) or (
len(ndat) > 0 and len(edat) == 0)) and Pweight < 4:
msg = 'Go on picking S onset ...\n' \
'##################################################\n' \
'Only one horizontal component available!\n' \
'ARH prediction requires at least 2 components!\n' \
'Copying existing horizontal component ...'
if verbose: print(msg)
# check which component is missing
if len(edat) == 0:
edat = ndat
else:
ndat = edat
if edat is not None and ndat is not None and len(edat) > 0 and len( if 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:
msg = 'Go on picking S onset ...\n' \ msg = 'Go on picking S onset ...\n' \
@ -736,6 +751,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
# re-create stream object including both horizontal components # re-create stream object including both horizontal components
hdat = edat.copy() hdat = edat.copy()
hdat += ndat hdat += ndat
else: else:
print('autopickstation: No horizontal component data available or ' \ print('autopickstation: No horizontal component data available or ' \
'bad P onset, skipping S picking!') 'bad P onset, skipping S picking!')