Modified checking of signal length, uses RMS trace of all components now (if available).

This commit is contained in:
Ludger Küperkoch 2015-09-04 11:13:52 +02:00
parent 0dc1091078
commit de608798b9

View File

@ -41,9 +41,9 @@ def autopickevent(data, param):
# quality control # quality control
# median check and jackknife on P-onset times # median check and jackknife on P-onset times
jk_checked_onsets = checkPonsets(all_onsets, mdttolerance, 2) jk_checked_onsets = checkPonsets(all_onsets, mdttolerance, iplot)
# check S-P times (Wadati) # check S-P times (Wadati)
return wadaticheck(jk_checked_onsets, wdttolerance, 2) return wadaticheck(jk_checked_onsets, wdttolerance, iplot)
def autopickstation(wfstream, pickparam): def autopickstation(wfstream, pickparam):
""" """
@ -196,16 +196,18 @@ def autopickstation(wfstream, pickparam):
############################################################## ##############################################################
if aicpick.getpick() is not None: if aicpick.getpick() is not None:
# check signal length to detect spuriously picked noise peaks # check signal length to detect spuriously picked noise peaks
# use all available components to avoid skipping correct picks
# on vertical traces with weak P coda
z_copy[0].data = tr_filt.data z_copy[0].data = tr_filt.data
Pflag = checksignallength(z_copy, aicpick.getpick(), tsnrz, zne = z_copy
minsiglength, \
nfacsl, minpercent, iplot)
if Pflag == 1:
# check for spuriously picked S onset
# both horizontal traces needed
if len(ndat) == 0 or len(edat) == 0: if len(ndat) == 0 or len(edat) == 0:
print 'One or more horizontal components missing!' print ("One or more horizontal components missing!")
print 'Skipping control function checkZ4S.' print ("Signal length only checked on vertical component!")
print ("Decreasing minsiglengh from %f to %f" \
% (minsiglength, minsiglength / 2))
Pflag = checksignallength(zne, aicpick.getpick(), tsnrz,
minsiglength / 2, \
nfacsl, minpercent, iplot)
else: else:
# filter and taper horizontal traces # filter and taper horizontal traces
trH1_filt = edat.copy() trH1_filt = edat.copy()
@ -218,9 +220,19 @@ def autopickstation(wfstream, pickparam):
zerophase=False) zerophase=False)
trH1_filt.taper(max_percentage=0.05, type='hann') trH1_filt.taper(max_percentage=0.05, type='hann')
trH2_filt.taper(max_percentage=0.05, type='hann') trH2_filt.taper(max_percentage=0.05, type='hann')
zne = z_copy
zne += trH1_filt zne += trH1_filt
zne += trH2_filt zne += trH2_filt
Pflag = checksignallength(zne, aicpick.getpick(), tsnrz,
minsiglength, \
nfacsl, minpercent, iplot)
if Pflag == 1:
# check for spuriously picked S onset
# both horizontal traces needed
if len(ndat) == 0 or len(edat) == 0:
print 'One or more horizontal components missing!'
print 'Skipping control function checkZ4S.'
else:
Pflag = checkZ4S(zne, aicpick.getpick(), zfac, \ Pflag = checkZ4S(zne, aicpick.getpick(), zfac, \
tsnrz[3], iplot) tsnrz[3], iplot)
if Pflag == 0: if Pflag == 0:
@ -515,9 +527,10 @@ def autopickstation(wfstream, pickparam):
hdat = edat.copy() hdat = edat.copy()
hdat += ndat hdat += ndat
h_copy = hdat.copy() h_copy = hdat.copy()
cordat = data.restituteWFData(invdir, h_copy) [cordat, restflag] = data.restituteWFData(invdir, h_copy)
# calculate WA-peak-to-peak amplitude # calculate WA-peak-to-peak amplitude
# using subclass WApp of superclass Magnitude # using subclass WApp of superclass Magnitude
if restflag == 1:
if Sweight < 4: if Sweight < 4:
wapp = WApp(cordat, mpickS, mpickP + sstop, iplot) wapp = WApp(cordat, mpickS, mpickP + sstop, iplot)
else: else:
@ -544,7 +557,8 @@ def autopickstation(wfstream, pickparam):
hdat = edat.copy() hdat = edat.copy()
hdat += ndat hdat += ndat
h_copy = hdat.copy() h_copy = hdat.copy()
cordat = data.restituteWFData(invdir, h_copy) [cordat, restflag] = data.restituteWFData(invdir, h_copy)
if restflag == 1:
# calculate WA-peak-to-peak amplitude # calculate WA-peak-to-peak amplitude
# using subclass WApp of superclass Magnitude # using subclass WApp of superclass Magnitude
wapp = WApp(cordat, mpickP, mpickP + sstop + (0.5 * (mpickP \ wapp = WApp(cordat, mpickP, mpickP + sstop + (0.5 * (mpickP \