PEATDB/Ekin/Base.py
def fitDataset(self, dataset, model=None, update=True,
                    noiter=300, conv=None, grad=None, damper=1.0,
                    silent=False, guess=True, startvalues=None, changevars=None,
                    callback=None):
        """Calculate the fit for this current dataset, if a model
           is given we use that instead of the current one.
           update=True means that the dataset fit info will be overwritten"""

        #check case of model, as our names are stupidly kept case sensitive
        for m in Fitting.fitterClasses:
            if model == m or model == m.lower():
                model = m
        datatofit = self.data[dataset]
        if model == None:
            currfitdata = self.getFitData(dataset)
            if currfitdata.has_key('model'):
                model = currfitdata['model']
            else:
                model = self.defaultmodel
        else:
            currfitdata = None

        fitresult, X = Fitting.doFit(ekindata=datatofit, fitdata=currfitdata, model=model,
                                     noiter=noiter, conv=conv, grad=grad, LM_damper=damper,
                                     silent=silent, guess=guess, startvalues=startvalues,
                                     changevars=changevars, callback=callback)

        if fitresult == None:
            print 'Fitter returned None..'
            return

        if update == True:
            self.__datatabs_fits__[dataset] = fitresult

        return fitresult, X
Calculate the fit for this current dataset, if a model
           is given we use that instead of the current one.
           update=True means that the dataset fit info will be overwritten
Calculate the fit for this current dataset, if a model
is given we use that instead of the current one.
update=True means that the dataset fit info will be overwritten
Calculate the fit for this current dataset if a model is given we use that instead of the current one . update = True means that the dataset fit info will be overwritten
def fitDataset(self, dataset, model=None, update=True,
                    noiter=300, conv=None, grad=None, damper=1.0,
                    silent=False, guess=True, startvalues=None, changevars=None,
                    callback=None):
        for m in Fitting.fitterClasses:
            if model == m or model == m.lower():
                model = m
        datatofit = self.data[dataset]
        if model == None:
            currfitdata = self.getFitData(dataset)
            if currfitdata.has_key('model'):
                model = currfitdata['model']
            else:
                model = self.defaultmodel
        else:
            currfitdata = None
        fitresult, X = Fitting.doFit(ekindata=datatofit, fitdata=currfitdata, model=model,
                                     noiter=noiter, conv=conv, grad=grad, LM_damper=damper,
                                     silent=silent, guess=guess, startvalues=startvalues,
                                     changevars=changevars, callback=callback)
        if fitresult == None:
            print 'Fitter returned None..'
            return
        if update == True:
            self.__datatabs_fits__[dataset] = fitresult
        return fitresult, X
def fitDataset ( self , dataset , model = None , update = True , noiter = 300 , conv = None , grad = None , damper = 1.0 , silent = False , guess = True , startvalues = None , changevars = None , callback = None ) : for m in Fitting . fitterClasses : if model == m or model == m . lower ( ) : model = m datatofit = self . data [ dataset ] if model == None : currfitdata = self . getFitData ( dataset ) if currfitdata . has_key ( 'model' ) : model = currfitdata [ 'model' ] else : model = self . defaultmodel else : currfitdata = None fitresult , X = Fitting . doFit ( ekindata = datatofit , fitdata = currfitdata , model = model , noiter = noiter , conv = conv , grad = grad , LM_damper = damper , silent = silent , guess = guess , startvalues = startvalues , changevars = changevars , callback = callback ) if fitresult == None : print 'Fitter returned None..' return if update == True : self . __datatabs_fits__ [ dataset ] = fitresult return fitresult , X
Calculate the fit for this current dataset, if a model
is given we use that instead of the current one.
Calculate the fit for this current dataset if a model is given we use that instead of the current one .
"""Calculate the fit for this current dataset, if a model
           is given we use that instead of the current one.
           update=True means that the dataset fit info will be overwritten""" #check case of model, as our names are stupidly kept case sensitive
self
dataset
model
update
noiter
conv
grad
damper
silent
guess
startvalues
changevars
callback