Changeset dd2c2ea3 in sasview
- Timestamp:
- Oct 18, 2009 12:56:41 AM (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:
- 1ea3488
- Parents:
- 8d143e8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
ra1100c07 rdd2c2ea3 373 373 @param smearer: smear object to allow smearing data 374 374 """ 375 current_pg=self.fit_panel.get_current_page()376 self.page_finder[ current_pg].set_smearer(smearer)375 self.current_pg=self.fit_panel.get_current_page() 376 self.page_finder[self.current_pg].set_smearer(smearer) 377 377 ## draw model 1D with smeared data 378 data = self.page_finder[ current_pg].get_plotted_data()379 model = self.page_finder[ current_pg].get_model()378 data = self.page_finder[self.current_pg].get_plotted_data() 379 model = self.page_finder[self.current_pg].get_model() 380 380 ## if user has already selected a model to plot 381 381 ## redraw the model with data smeared 382 382 383 smear =self.page_finder[ current_pg].get_smearer()383 smear =self.page_finder[self.current_pg].get_smearer() 384 384 if model!= None: 385 385 self.draw_model( model=model, data= data, smearer= smear, … … 440 440 441 441 fproblemId = 0 442 current_pg=None442 self.current_pg=None 443 443 for page, value in self.page_finder.iteritems(): 444 444 try: … … 452 452 pars.append(name) 453 453 #Set Engine (model , data) related to the page on 454 self._fit_helper( current_pg=page,value=value,pars=pars,454 self._fit_helper( value=value,pars=pars, 455 455 id=fproblemId, title= engineType ) 456 456 fproblemId += 1 457 current_pg= page457 self.current_pg= page 458 458 except: 459 459 msg= "%s error: %s" % (engineType,sys.exc_value) … … 472 472 ## perform single fit 473 473 if self._fit_engine=="scipy": 474 qmin, qmax= current_pg.get_range()474 qmin, qmax= self.current_pg.get_range() 475 475 self.calc_fit=FitThread(parent =self.parent, 476 476 fn= self.fitter, 477 cpage= current_pg,477 cpage=self.current_pg, 478 478 pars= pars, 479 479 completefn= self._single_fit_completed, … … 575 575 fitproblem.schedule_tofit(value) 576 576 577 def _fit_helper(self, current_pg,pars,value, id, title="Single Fit " ):577 def _fit_helper(self,pars,value, id, title="Single Fit " ): 578 578 """ 579 579 helper for fitting … … 921 921 return 922 922 model.origin_name = model.name 923 current_pg = self.fit_panel.get_current_page()923 self.current_pg = self.fit_panel.get_current_page() 924 924 ## make sure nothing is done on self.sim_page 925 925 ## example trying to call set_panel on self.sim_page 926 if current_pg != self.sim_page :926 if self.current_pg != self.sim_page : 927 927 928 if self.page_finder[ current_pg].get_model()== None :928 if self.page_finder[self.current_pg].get_model()== None : 929 929 930 930 model.name="M"+str(self.index_model) 931 931 self.index_model += 1 932 932 else: 933 model.name= self.page_finder[ current_pg].get_model().name934 935 metadata = self.page_finder[ current_pg].get_plotted_data()933 model.name= self.page_finder[self.current_pg].get_model().name 934 935 metadata = self.page_finder[self.current_pg].get_plotted_data() 936 936 937 937 # save the name containing the data name with the appropriate model 938 self.page_finder[ current_pg].set_model(model)939 qmin, qmax= current_pg.get_range()940 self.page_finder[ current_pg].set_range(qmin=qmin, qmax=qmax)941 smearer= self.page_finder[ current_pg].get_smearer()938 self.page_finder[self.current_pg].set_model(model) 939 qmin, qmax= self.current_pg.get_range() 940 self.page_finder[self.current_pg].set_range(qmin=qmin, qmax=qmax) 941 smearer= self.page_finder[self.current_pg].get_smearer() 942 942 # save model name 943 943 self.draw_model( model=model,smearer=smearer,
Note: See TracChangeset
for help on using the changeset viewer.