Changeset e3f6ef5 in sasview


Ignore:
Timestamp:
Oct 10, 2011 3:53:52 PM (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:
4c712ea4
Parents:
05fb6d12
Message:

fixed updating on compute for batch plot

Location:
fittingview/src/sans/perspectives/fitting
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/basepage.py

    rb6685b2 re3f6ef5  
    17791779                    break 
    17801780     
    1781     def _draw_model(self, update_chisqr=True): 
     1781    def _draw_model(self, update_chisqr=True, source='model'): 
    17821782        """ 
    17831783        Method to draw or refresh a plotted model. 
     
    18101810                                    enable2D=is_2d, 
    18111811                                    update_chisqr=update_chisqr, 
     1812                                    source='model', 
    18121813                                    weight=weight) 
    18131814         
  • fittingview/src/sans/perspectives/fitting/fitpage.py

    rc7e8898 re3f6ef5  
    21622162        self._mac_sleep(0.1)   
    21632163        #plot model ( when drawing, do not update chisqr value again) 
    2164         self._draw_model(update_chisqr=False)     
     2164        self._draw_model(update_chisqr=False, source = 'fit')     
    21652165        #PostStatusEvent      
    21662166        #msg = "Fit completed!dddd " 
  • fittingview/src/sans/perspectives/fitting/fitting.py

    r05fb6d12 re3f6ef5  
    645645                   toggle_mode_on=False, 
    646646                   qmin=None, qmax=None,  
    647                    update_chisqr=True, weight=None): 
     647                   update_chisqr=True, weight=None, source='model'): 
    648648        """ 
    649649        Draw model. 
     
    675675                               toggle_mode_on=toggle_mode_on, 
    676676                               state=state, 
    677                                update_chisqr=update_chisqr) 
     677                               update_chisqr=update_chisqr, 
     678                               source=source) 
    678679        else:      
    679680            ## draw model 2D with no initial data 
     
    689690                                state=state, 
    690691                                toggle_mode_on=toggle_mode_on, 
    691                                 update_chisqr=update_chisqr) 
     692                                update_chisqr=update_chisqr, 
     693                                source=source) 
    692694             
    693695    def onFit(self, uid): 
     
    11781180                                  qmin=qmin, qmax=qmax,  
    11791181                                  update_chisqr=False,  
    1180                                   weight=weight) 
     1182                                  weight=weight, 
     1183                                  source='fit') 
    11811184        
    11821185    def on_set_batch_result(self, page_id, fid, batch_outputs, batch_inputs): 
     
    14891492                    weight=None, fid=None, 
    14901493                    toggle_mode_on=False, state=None,  
    1491                     data=None, update_chisqr=True): 
     1494                    data=None, update_chisqr=True, source='model'): 
    14921495        """ 
    14931496        Complete plotting 1D data 
     
    15321535            self.page_finder[page_id].set_fit_tab_caption(caption=caption) 
    15331536            try: 
    1534                 if batch_on: 
     1537                if source == 'fit': 
    15351538                    # replace model cal to fit calculation if possible 
    15361539                    new_plot.y = self.page_finder[page_id].get_result(fid=data.id).theory 
     
    15751578    def _complete2D(self, image, data, model, page_id,  elapsed, index, qmin, 
    15761579                qmax, fid=None, weight=None, toggle_mode_on=False, state=None,  
    1577                      update_chisqr=True): 
     1580                     update_chisqr=True, source='model'): 
    15781581        """ 
    15791582        Complete get the result of modelthread and create model 2D 
     
    16131616        title = new_plot.title 
    16141617        batch_on = self.fit_panel.get_page_by_id(page_id).batch_on 
    1615         if not batch_on: 
     1618        if not source == 'fit': 
    16161619            wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, 
    16171620                                               title=title)) 
     
    16511654                      weight=None, 
    16521655                      toggle_mode_on=False, 
    1653                        update_chisqr=True): 
     1656                       update_chisqr=True, source='model'): 
    16541657        """ 
    16551658        draw model in 2D 
     
    16811684                                    state=state, 
    16821685                                    completefn=self._complete2D, 
    1683                                     update_chisqr=update_chisqr) 
     1686                                    update_chisqr=update_chisqr, source=source) 
    16841687            self.calc_2D.queue() 
    16851688 
     
    16951698                weight=None, 
    16961699                fid=None,  
    1697                 toggle_mode_on=False, update_chisqr=True,  
     1700                toggle_mode_on=False, update_chisqr=True, source='model', 
    16981701                enable1D=True): 
    16991702        """ 
     
    17231726                                  completefn=self._complete1D, 
    17241727                                  #updatefn = self._update1D, 
    1725                                   update_chisqr=update_chisqr) 
     1728                                  update_chisqr=update_chisqr, 
     1729                                  source=source) 
    17261730            self.calc_1D.queue() 
    17271731        except: 
  • fittingview/src/sans/perspectives/fitting/model_thread.py

    rf64a4b7 re3f6ef5  
    2323                 updatefn=None, 
    2424                 update_chisqr=True, 
     25                 source='model', 
    2526                 yieldtime=0.04, 
    2627                 worktime=0.04 
     
    4445        self.starttime = 0   
    4546        self.update_chisqr = update_chisqr 
     47        self.source = source 
    4648         
    4749    def compute(self): 
     
    111113                       weight=self.weight, 
    112114                       #qstep=self.qstep, 
    113                        update_chisqr = self.update_chisqr) 
     115                       update_chisqr = self.update_chisqr, 
     116                       source=self.source) 
    114117         
    115118 
     
    130133                 completefn = None, 
    131134                 update_chisqr=True, 
     135                 source='model', 
    132136                 updatefn=None, 
    133137                 yieldtime=0.01, 
     
    152156        self.starttime = 0 
    153157        self.update_chisqr = update_chisqr 
     158        self.source = source 
    154159         
    155160    def compute(self): 
     
    181186                      elapsed=elapsed,index=index, model=self.model, 
    182187                      data=self.data,  
    183                       update_chisqr = self.update_chisqr) 
     188                      update_chisqr = self.update_chisqr, 
     189                      source=self.source) 
    184190         
    185191    def results(self): 
Note: See TracChangeset for help on using the changeset viewer.