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:
Sebastian Wehling-Benatelli 2014-12-08 05:27:54 +01:00
parent 479058a41e
commit ce8b954a8b
2 changed files with 14 additions and 7 deletions

View File

@ -91,6 +91,10 @@ class CharacteristicFunction(object):
def setTime2(self, t2): def setTime2(self, t2):
self.t2 = t2 self.t2 = t2
def getTimeArray(self):
cut = self.getCut()
return np.arange(cut[0], cut[1], self.getIncrement())
def getOrder(self): def getOrder(self):
return self.order return self.order
@ -98,6 +102,9 @@ class CharacteristicFunction(object):
self.order = order self.order = order
def getIncrement(self): def getIncrement(self):
"""
:rtype : int
"""
return self.dt return self.dt
def getFnoise(self): def getFnoise(self):
@ -148,7 +155,7 @@ class CharacteristicFunction(object):
data = hh data = hh
return data return data
else: else:
data = self.orig_data data = self.orig_data.copy()
return data return data
def calcCF(self, data=None): def calcCF(self, data=None):

View File

@ -23,10 +23,10 @@ class AutoPicking(object):
Superclass of different, automated picking algorithms applied on a CF determined Superclass of different, automated picking algorithms applied on a CF determined
using AIC, HOS, or AR prediction. 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 :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 :param: Tcf, corresponding time array
:type: array :type: array
@ -54,9 +54,9 @@ class AutoPicking(object):
:type: float :type: float
''' '''
self.cf = cf self.cf = cf.getCF()
self.Tcf = Tcf self.Tcf = cf.getTimeArray()
self.dt = dt self.dt = cf.getIncrement()
self.setTslope(Tslope) self.setTslope(Tslope)
self.setaerr(aerr) self.setaerr(aerr)
self.setTSNR(TSNR) self.setTSNR(TSNR)
@ -121,7 +121,7 @@ class AutoPicking(object):
return self.Pick return self.Pick
def calcPick(self): def calcPick(self):
self.Pick = Pick self.Pick = None
class AICPicker(AutoPicking): class AICPicker(AutoPicking):
''' '''