[add] jackknife safety factor no longer hardcoded, GUI parameter added

This commit is contained in:
Darius Arnold
2017-08-29 15:05:10 +02:00
committed by marcel
parent 71973a5348
commit bac6d6f5ec
3 changed files with 12 additions and 5 deletions
+2 -1
View File
@@ -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)
+3 -3
View File
@@ -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)