[add] enabled jackknife function fpr P onsets

This commit is contained in:
Darius Arnold 2017-08-21 13:15:38 +02:00
parent f2a6228e83
commit 08ce54e890
2 changed files with 4 additions and 3 deletions

View File

@ -76,6 +76,7 @@ def autopickevent(data, param, iplot=0, fig_dict=None, ncores=0, metadata=None,
pick.pop('station')
all_onsets[station] = pick
all_onsets = checkPonsets(all_onsets, mdttolerance, iplot)
return all_onsets
# quality control

View File

@ -913,9 +913,9 @@ def jackknife(X, phi, h):
PHI_sub = None
# determine number of subgroups
g = len(X) / h
g = int(len(X) / h)
if type(g) is not int:
if (len(X) / h) % 1 != 0:
print("jackknife: Cannot divide quantity X in equal sized subgroups!")
print("Choose another size for subgroups!")
return PHI_jack, PHI_pseudo, PHI_sub
@ -931,7 +931,7 @@ def jackknife(X, phi, h):
# estimators of subgroups
PHI_pseudo = []
PHI_sub = []
for i in range(0, g - 1):
for i in range(0, g):
# subgroup i, remove i-th sample
xx = X[:]
del xx[i]