now cf is an CharacteristicFunction object and not an array (changes should also be made to the caller run_makeCF.py)
This commit is contained in:
parent
479058a41e
commit
ce8b954a8b
@ -91,6 +91,10 @@ class CharacteristicFunction(object):
|
||||
def setTime2(self, t2):
|
||||
self.t2 = t2
|
||||
|
||||
def getTimeArray(self):
|
||||
cut = self.getCut()
|
||||
return np.arange(cut[0], cut[1], self.getIncrement())
|
||||
|
||||
def getOrder(self):
|
||||
return self.order
|
||||
|
||||
@ -98,6 +102,9 @@ class CharacteristicFunction(object):
|
||||
self.order = order
|
||||
|
||||
def getIncrement(self):
|
||||
"""
|
||||
:rtype : int
|
||||
"""
|
||||
return self.dt
|
||||
|
||||
def getFnoise(self):
|
||||
@ -148,7 +155,7 @@ class CharacteristicFunction(object):
|
||||
data = hh
|
||||
return data
|
||||
else:
|
||||
data = self.orig_data
|
||||
data = self.orig_data.copy()
|
||||
return data
|
||||
|
||||
def calcCF(self, data=None):
|
||||
|
@ -23,10 +23,10 @@ class AutoPicking(object):
|
||||
Superclass of different, automated picking algorithms applied on a CF determined
|
||||
using AIC, HOS, or AR prediction.
|
||||
'''
|
||||
def __init__(self, cf, Tcf, dt, Tslope, aerr, TSNR, PickWindow, peps, Tsmooth):
|
||||
def __init__(self, cf, Tslope, aerr, TSNR, PickWindow, peps, Tsmooth):
|
||||
'''
|
||||
:param: cf, characteristic function, on which the picking algorithm is applied
|
||||
:type: array
|
||||
:type: `~pylot.core.pick.CharFuns.CharacteristicFunction` object
|
||||
|
||||
:param: Tcf, corresponding time array
|
||||
:type: array
|
||||
@ -54,9 +54,9 @@ class AutoPicking(object):
|
||||
:type: float
|
||||
'''
|
||||
|
||||
self.cf = cf
|
||||
self.Tcf = Tcf
|
||||
self.dt = dt
|
||||
self.cf = cf.getCF()
|
||||
self.Tcf = cf.getTimeArray()
|
||||
self.dt = cf.getIncrement()
|
||||
self.setTslope(Tslope)
|
||||
self.setaerr(aerr)
|
||||
self.setTSNR(TSNR)
|
||||
@ -121,7 +121,7 @@ class AutoPicking(object):
|
||||
return self.Pick
|
||||
|
||||
def calcPick(self):
|
||||
self.Pick = Pick
|
||||
self.Pick = None
|
||||
|
||||
class AICPicker(AutoPicking):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user