Changeset 792db7d5 in sasview for park_integration/Fitting.py
- Timestamp:
- Jul 8, 2008 11:48:38 AM (16 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 6e0f53a
- Parents:
- 1c94a9f1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
park_integration/Fitting.py
rcf3b781 r792db7d5 1 #class Fitting 1 """ 2 @organization: Class Fit contains ScipyFit and ParkFit methods declaration 3 allows to create instance of type ScipyFit or ParkFit to perform either 4 a park fit or a scipy fit. 5 """ 2 6 from sans.guitools.plottables import Data1D 3 7 from Loader import Load … … 9 13 class Fit: 10 14 """ 11 Wrap class that allows to select the fitting type 15 Wrap class that allows to select the fitting type.this class 16 can be used as follow : 17 18 from sans.fit.Fitting import Fit 19 fitter= Fit() 20 fitter.fit_engine('scipy') or fitter.fit_engine('park') 21 engine = fitter.returnEngine() 22 engine.set_data(data,Uid) 23 engine.set_param( model,model.name, pars) 24 engine.set_model(model,Uid) 25 26 chisqr1, out1, cov1=engine.fit(pars,qmin,qmax) 12 27 """ 13 28 def __init__(self): 14 15 # To initialize a type of Fit 29 """ 30 self._engine will contain an instance of ScipyFit or ParkFit 31 """ 16 32 self._engine=None 17 33 … … 20 36 Select the type of Fit 21 37 @param word: the keyword to select the fit type 38 @raise: if the user does not enter 'scipy' or 'park', 39 a valueError is rase 22 40 """ 23 41 if word=="scipy": … … 28 46 raise ValueError, "enter the keyword scipy or park" 29 47 def returnEngine(self): 48 """ @return self._engine""" 30 49 return self._engine 31 50 32 51 def fit(self,pars, qmin=None, qmax=None): 33 """ Dothe fit """52 """Perform the fit """ 34 53 35 54 def set_model(self,model,Uid):
Note: See TracChangeset
for help on using the changeset viewer.