[add] jackknife safety factor no longer hardcoded, GUI parameter added
This commit is contained in:
@@ -41,6 +41,7 @@ def autopickevent(data, param, iplot=0, fig_dict=None, fig_dict_wadatijack=None,
|
||||
# parameter input file (usually autoPyLoT.in).
|
||||
wdttolerance = param.get('wdttolerance')
|
||||
mdttolerance = param.get('mdttolerance')
|
||||
jackfactor = param.get('jackfactor')
|
||||
apverbose = param.get('apverbose')
|
||||
for n in range(len(data)):
|
||||
station = data[n].stats.station
|
||||
@@ -80,7 +81,7 @@ def autopickevent(data, param, iplot=0, fig_dict=None, fig_dict_wadatijack=None,
|
||||
|
||||
# quality control
|
||||
# median check and jackknife on P-onset times
|
||||
jk_checked_onsets = checkPonsets(all_onsets, mdttolerance, 1, fig_dict_wadatijack)
|
||||
jk_checked_onsets = checkPonsets(all_onsets, mdttolerance, jackfactor, 1, fig_dict_wadatijack)
|
||||
#return jk_checked_onsets
|
||||
# check S-P times (Wadati)
|
||||
wadationsets = wadaticheck(jk_checked_onsets, wdttolerance, 1, fig_dict_wadatijack)
|
||||
|
||||
@@ -803,7 +803,7 @@ def checksignallength(X, pick, TSNR, minsiglength, nfac, minpercent, iplot=0, fi
|
||||
return returnflag
|
||||
|
||||
|
||||
def checkPonsets(pickdic, dttolerance, iplot=0, fig_dict=None):
|
||||
def checkPonsets(pickdic, dttolerance, jackfactor, iplot=0, fig_dict=None):
|
||||
'''
|
||||
Function to check statistics of P-onset times: Control deviation from
|
||||
median (maximum adjusted deviation = dttolerance) and apply pseudo-
|
||||
@@ -840,9 +840,9 @@ def checkPonsets(pickdic, dttolerance, iplot=0, fig_dict=None):
|
||||
return
|
||||
# get pseudo variances smaller than average variances
|
||||
# (times safety factor), these picks passed jackknife test
|
||||
ij = np.where(PHI_pseudo <= 5 * xjack)
|
||||
ij = np.where(PHI_pseudo <= jackfactor * xjack)
|
||||
# these picks did not pass jackknife test
|
||||
badjk = np.where(PHI_pseudo > 5 * xjack)
|
||||
badjk = np.where(PHI_pseudo > jackfactor * xjack)
|
||||
badjkstations = np.array(stations)[badjk]
|
||||
print("checkPonsets: %d pick(s) did not pass jackknife test!" % len(badjkstations))
|
||||
print(badjkstations)
|
||||
|
||||
Reference in New Issue
Block a user