Changeset 06e7c26 in sasview for park_integration


Ignore:
Timestamp:
Dec 2, 2011 10:03:01 AM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
7a7dbf4
Parents:
fa4885f9
Message:

fixed combined/batch

Location:
park_integration/src/sans/fit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • park_integration/src/sans/fit/AbstractFitEngine.py

    rbd7a426 r06e7c26  
    557557        #Dictionnary of fitArrange element (fit problems) 
    558558        self.fit_arrange_dict = {} 
     559        self.fitter_id = None 
    559560         
    560561    def set_model(self, model,  id,  pars=[], constraints=[], data=None): 
     
    787788    def __init__(self, model=None, param_list=None, data=None): 
    788789        self.calls = None 
     790        self.pars = [] 
    789791        self.fitness = None 
    790792        self.chisqr = None 
     
    805807        self.iterations = 0 
    806808        self.inputs = [] 
     809        self.fitter_id = None 
    807810        if self.model is not None and self.data is not None: 
    808811            self.inputs = [(self.model, self.data)] 
  • park_integration/src/sans/fit/Fitting.py

    rba7dceb r06e7c26  
    1010 
    1111 
    12 class Fit: 
     12class Fit(object): 
    1313    """  
    1414    Wrap class that allows to select the fitting type.this class  
     
    3131        #self._engine will contain an instance of ScipyFit or ParkFit 
    3232        self._engine = None 
     33        self.fitter_id = None 
    3334        self.set_engine(engine) 
    3435           
     36    def __setattr__(self, name, value): 
     37        """ 
     38        set fitter_id and its engine at the same time 
     39        """ 
     40        if name == "fitter_id": 
     41            self.__dict__[name] = value 
     42            if hasattr(self, "_engine") and self._engine is not None: 
     43                self._engine.fitter_id = value     
     44        elif name == "_engine": 
     45            self.__dict__[name] = value 
     46            if hasattr(self, "fitter_id") and self.fitter_id is not None: 
     47                self._engine.fitter_id = self.fitter_id 
     48        else: 
     49            self.__dict__[name] = value 
     50                 
    3551    def set_engine(self, word): 
    3652        """ 
  • park_integration/src/sans/fit/ParkFitting.py

    r2605b879 r06e7c26  
    425425            residuals, theory = m.fitness.residuals() 
    426426            small_result = FResult(model=m.model, data=m.data.sans_data) 
     427            small_result.fitter_id = self.fitter_id 
    427428            small_result.theory = theory 
    428429            small_result.residuals = residuals 
  • park_integration/src/sans/fit/ScipyFitting.py

    ree19117 r06e7c26  
    9090         
    9191        result = FResult(model=model, data=data, param_list=self.param_list) 
     92        result.pars = fitproblem[0].pars 
     93        result.fitter_id = self.fitter_id 
    9294        if handler is not None: 
    9395            handler.set_result(result=result) 
Note: See TracChangeset for help on using the changeset viewer.