Changeset dd2c2ea3 in sasview


Ignore:
Timestamp:
Oct 18, 2009 12:56:41 AM (15 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:
1ea3488
Parents:
8d143e8
Message:

This fixes one of Fit problem on MAC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitting.py

    ra1100c07 rdd2c2ea3  
    373373            @param smearer: smear object to allow smearing data 
    374374        """    
    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) 
    377377        ## 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() 
    380380        ## if user has already selected a model to plot 
    381381        ## redraw the model with data smeared 
    382382         
    383         smear =self.page_finder[current_pg].get_smearer() 
     383        smear =self.page_finder[self.current_pg].get_smearer() 
    384384        if model!= None: 
    385385            self.draw_model( model=model, data= data, smearer= smear, 
     
    440440             
    441441        fproblemId = 0 
    442         current_pg=None 
     442        self.current_pg=None 
    443443        for page, value in self.page_finder.iteritems(): 
    444444            try: 
     
    452452                        pars.append(name) 
    453453                    #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, 
    455455                                      id=fproblemId, title= engineType )  
    456456                    fproblemId += 1  
    457                     current_pg= page 
     457                    self.current_pg= page 
    458458            except: 
    459459                msg= "%s error: %s" % (engineType,sys.exc_value) 
     
    472472            ## perform single fit 
    473473            if self._fit_engine=="scipy": 
    474                 qmin, qmax= current_pg.get_range() 
     474                qmin, qmax= self.current_pg.get_range() 
    475475                self.calc_fit=FitThread(parent =self.parent, 
    476476                                        fn= self.fitter, 
    477                                        cpage=current_pg, 
     477                                       cpage=self.current_pg, 
    478478                                       pars= pars, 
    479479                                       completefn= self._single_fit_completed, 
     
    575575            fitproblem.schedule_tofit(value) 
    576576             
    577     def _fit_helper(self,current_pg,pars,value, id, title="Single Fit " ): 
     577    def _fit_helper(self,pars,value, id, title="Single Fit " ): 
    578578        """ 
    579579            helper for fitting 
     
    921921            return 
    922922        model.origin_name = model.name 
    923         current_pg = self.fit_panel.get_current_page()  
     923        self.current_pg = self.fit_panel.get_current_page()  
    924924        ## make sure nothing is done on self.sim_page 
    925925        ## 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 : 
    927927            
    928             if self.page_finder[current_pg].get_model()== None : 
     928            if self.page_finder[self.current_pg].get_model()== None : 
    929929                 
    930930                model.name="M"+str(self.index_model) 
    931931                self.index_model += 1   
    932932            else: 
    933                 model.name= self.page_finder[current_pg].get_model().name 
    934                  
    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() 
    936936             
    937937            # 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() 
    942942            # save model name 
    943943            self.draw_model( model=model,smearer=smearer,  
Note: See TracChangeset for help on using the changeset viewer.