Changeset 6831a99 in sasview


Ignore:
Timestamp:
Jul 15, 2008 2:02:59 PM (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:
f4e1c9e
Parents:
5ef6709
Message:

modified setmodel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • park_integration/AbstractFitEngine.py

    r94b44293 r6831a99  
    4646             
    4747        """ 
    48         self.parameters=[] 
    49         if model==None: 
    50             raise ValueError, "Cannot set parameters for empty model" 
     48        if pars !={}: 
     49            self.parameters=[] 
     50            if model==None: 
     51                raise ValueError, "Cannot set parameters for empty model" 
     52            else: 
     53                model.name=name 
     54                for key, value in pars.iteritems(): 
     55                    param = Parameter(model, key, value) 
     56                    self.parameters.append(param) 
     57             
     58            #A fitArrange is already created but contains dList only at Uid 
     59            if self.fitArrangeList.has_key(Uid): 
     60                self.fitArrangeList[Uid].set_model(model) 
     61            else: 
     62            #no fitArrange object has been create with this Uid 
     63                fitproblem= FitArrange() 
     64                fitproblem.set_model(model) 
     65                self.fitArrangeList[Uid]=fitproblem 
    5166        else: 
    52             model.name=name 
    53             for key, value in pars.iteritems(): 
    54                 param = Parameter(model, key, value) 
    55                 self.parameters.append(param) 
    56          
    57         #A fitArrange is already created but contains dList only at Uid 
    58         if self.fitArrangeList.has_key(Uid): 
    59             self.fitArrangeList[Uid].set_model(model) 
    60         else: 
    61         #no fitArrange object has been create with this Uid 
    62             fitproblem= FitArrange() 
    63             fitproblem.set_model(model) 
    64             self.fitArrangeList[Uid]=fitproblem 
     67            raise ValueError, "park_integration:missing parameters" 
    6568         
    6669         
Note: See TracChangeset for help on using the changeset viewer.