Changeset 464fce54 in sasview for sansview/perspectives/fitting
- Timestamp:
- Nov 16, 2009 12:52:30 PM (15 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:
- 255306e
- Parents:
- fd6b789
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
rc69b6d5 r464fce54 472 472 wx.PostEvent(self.parent, StatusEvent(status= msg )) 473 473 return 474 474 475 #Do the simultaneous fit 475 476 try: … … 508 509 wx.PostEvent(self.parent, StatusEvent(status= msg ,type="stop")) 509 510 return 511 512 510 513 def ready_fit(self): 511 514 """ … … 608 611 #Create list of parameters for fitting used 609 612 templist=[] 610 pars=pars613 611 614 try: 612 # # create a park model and reset parameter value if constraint613 ## is given614 new_model = Model(model)615 #Extra list of parameters and their constraints 616 listOfConstraint= [] 617 615 618 param = value.get_model_param() 616 619 if len(param)>0: 617 620 for item in param: 618 param_value = item[1]619 param_name = item[0]620 621 ## check if constraint 621 if param_value !=None and param_name!= None:622 new_model.parameterset[ param_name].set( param_value)623 622 if item[0] !=None and item[1] != None: 623 listOfConstraint.append((item[0],item[1])) 624 624 625 #Do the single fit 625 self.fitter.set_model(new_model, self.fit_id, pars) 626 self.fitter.set_model(model, self.fit_id, 627 pars,constraints = listOfConstraint) 626 628 627 629 self.fitter.set_data(data=metadata,Uid=self.fit_id, … … 634 636 msg= title +" error: %s" % sys.exc_value 635 637 wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 636 return638 637 639 638 640 def _onSelect(self,event):
Note: See TracChangeset
for help on using the changeset viewer.