Changeset 792db7d5 in sasview for park_integration/Fitting.py


Ignore:
Timestamp:
Jul 8, 2008 11:48:38 AM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
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
Message:

more tests added …most of them are failing because of uncertainty , scipy result and park resuls also little bit different

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""" 
    26from sans.guitools.plottables import Data1D 
    37from Loader import Load 
     
    913class Fit: 
    1014    """  
    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) 
    1227    """   
    1328    def __init__(self): 
    14          
    15         # To initialize a type of Fit 
     29        """ 
     30            self._engine will contain an instance of ScipyFit or ParkFit 
     31        """ 
    1632        self._engine=None 
    1733           
     
    2036            Select the type of Fit  
    2137            @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 
    2240        """ 
    2341        if word=="scipy": 
     
    2846            raise ValueError, "enter the keyword scipy or park" 
    2947    def returnEngine(self): 
     48        """ @return self._engine"""  
    3049        return self._engine 
    3150     
    3251    def fit(self,pars, qmin=None, qmax=None): 
    33         """ Do the fit """ 
     52        """Perform the fit """ 
    3453       
    3554    def set_model(self,model,Uid): 
Note: See TracChangeset for help on using the changeset viewer.