Add init to ARZcf that extracts parameters from pickparams
t1, t2 cant be extracted in the init function since they are not the same during the first and the second instantiation.
This commit is contained in:
parent
ab6e74c482
commit
790cf803d7
@ -836,8 +836,7 @@ class AutopickStation(object):
|
||||
if self.p_params.algoP == 'HOS':
|
||||
self.cf1 = HOScf(z_copy, cuttimes, self.pickparams)
|
||||
elif self.p_params.algoP == 'ARZ':
|
||||
self.cf1 = ARZcf(z_copy, cuttimes, self.p_params.tpred1z, self.p_params.Parorder, self.p_params.tdet1z,
|
||||
self.p_params.addnoise)
|
||||
self.cf1 = ARZcf(z_copy, cuttimes, self.pickparams["tdet1z"], self.pickparams["tpred1z"], self.pickparams)
|
||||
else:
|
||||
self.cf1 = None
|
||||
assert isinstance(self.cf1, CharacteristicFunction), 'cf1 is not set correctly: maybe the algorithm name ({})' \
|
||||
@ -886,7 +885,7 @@ class AutopickStation(object):
|
||||
if self.p_params.algoP == 'HOS':
|
||||
self.cf2 = HOScf(z_copy, cuttimes2, self.pickparams)
|
||||
elif self.p_params.algoP == 'ARZ':
|
||||
self.cf2 = ARZcf(z_copy, cuttimes2, self.p_params.tpred2z, self.p_params.Parorder, self.p_params.tdet2z, self.p_params.addnoise)
|
||||
self.cf2 = ARZcf(z_copy, cuttimes2, self.pickparams["tdet2z"], self.pickparams["tpred2z"], self.pickparams)
|
||||
else:
|
||||
self.cf2 = None
|
||||
assert isinstance(self.cf2, CharacteristicFunction), 'cf2 is not set correctly: maybe the algorithm name () is ' \
|
||||
|
@ -306,6 +306,9 @@ class HOScf(CharacteristicFunction):
|
||||
|
||||
class ARZcf(CharacteristicFunction):
|
||||
|
||||
def __init__(self, data, cut, t1, t2, pickparams):
|
||||
super(ARZcf, self).__init__(data, cut, t1=t1, t2=t2, order=pickparams["Parorder"], fnoise=pickparams["addnoise"])
|
||||
|
||||
def calcCF(self, data):
|
||||
"""
|
||||
function used to calculate the AR prediction error from a single vertical trace. Can be used to pick
|
||||
|
Loading…
Reference in New Issue
Block a user