def findBestModel(self): """Determine best fit model using SS F-test""" models = self.modelselector.getcurselection() if len(models)<2: print 'select 2 or more models' return fitters= [] for m in models: model = self.modelsdict[m] X = self.createFitter(model, m) fitters.append(X) Fitting.updateModels(self.modelsdict) self.previewer.findBestModel(models) return
def testFitter(self): """Parse the entry fields and create the fitter""" self.currentmodel = self.parseValues() X = self.createFitter(self.currentmodel, self.currentname) X.guess_start() if self.previewer.plotfunctionvar.get() == 1: self.previewer.plotframe.clearData() self.previewer.plotframe.updateFit(X, showfitvars=True) else: X.fit(rounds=60) self.updateModelsDict() #update the global fitting models since the plotter uses them Fitting.updateModels(self.modelsdict) self.previewer.finishFit(X) return