Changeset 22ce7e2 in sasview


Ignore:
Timestamp:
Sep 23, 2011 8:40:23 AM (13 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:
5e48acb
Parents:
d97dd6f
Message:

make sure each panel know the batch state

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

Legend:

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

    r7f76f89 r22ce7e2  
    333333            caption = "FitPage" + str(self.fit_page_index) 
    334334            panel.set_index_model(self.fit_page_index) 
     335        panel.batch_on = self.batch_on 
    335336        panel.populate_box(dict=self.model_list_box) 
    336337        panel.set_manager(self._manager) 
  • fittingview/src/sans/perspectives/fitting/fitting.py

    r1b14795 r22ce7e2  
    10491049        """   
    10501050        self._mac_sleep(0.2) 
    1051         if page_id[0] in self.fit_thread_list.keys(): 
    1052             del self.fit_thread_list[page_id[0]]  
    1053         if self.batch_on: 
     1051        uid = page_id[0] 
     1052        if uid in self.fit_thread_list.keys(): 
     1053            del self.fit_thread_list[uid]  
     1054           
     1055        cpage = self.fit_panel.get_page_by_id(uid) 
     1056        if cpage.batch_on: 
    10541057            wx.CallAfter(self._batch_single_fit_complete_helper, 
    10551058                          result, pars, page_id, batch_outputs,  
     
    15801583            theory_data = self.page_finder[page_id].get_theory_data(fid=data_copy.id) 
    15811584            gn = theory_data.data#[index] 
    1582             if self.weight == None: 
    1583                 en = data_copy.err_data 
    1584             else: 
    1585                 en = self.weight#data_copy.err_data#[index] 
     1585            en = self.weight#data_copy.err_data#[index] 
    15861586            residuals.data = (fn - gn) / en  
    15871587            residuals.qx_data = data_copy.qx_data#[index] 
     
    16061606                ## Set consitently w/AbstractFitengine:  
    16071607                ## But this should be corrected later. 
    1608                 if self.weight == None: 
    1609                     dy = data_copy.dy 
    1610                 else: 
    1611                     dy = self.weight#deepcopy(data_copy.dy) 
     1608                dy = self.weight#deepcopy(data_copy.dy) 
    16121609                dy[dy==0] = 1   
    16131610            fn = data_copy.y[index]  
Note: See TracChangeset for help on using the changeset viewer.