Ignore:
Timestamp:
Sep 7, 2011 6:24:56 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:
44f9c8b
Parents:
7ad194fa
Message:

added custom weighting for single fit

File:
1 edited

Legend:

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

    r2e95da4 r55bb249c  
    869869        self.state.qmax_x = self.qmax_x 
    870870        self.state.qmin_x = self.qmin_x 
    871        
     871        self.state.dI_noweight = copy.deepcopy(self.dI_noweight.GetValue()) 
     872        self.state.dI_didata = copy.deepcopy(self.dI_didata.GetValue()) 
     873        self.state.dI_sqrdata = copy.deepcopy(self.dI_sqrdata.GetValue()) 
     874        self.state.dI_idata = copy.deepcopy(self.dI_idata.GetValue()) 
    872875        if hasattr(self,"enable_disp"): 
    873876            self.state.enable_disp= self.enable_disp.GetValue() 
     
    950953                                copy.deepcopy(self.pinhole_smearer.GetValue()) 
    951954        self.state.slit_smearer = copy.deepcopy(self.slit_smearer.GetValue())   
    952              
     955        self.state.dI_noweight = copy.deepcopy(self.dI_noweight.GetValue()) 
     956        self.state.dI_didata = copy.deepcopy(self.dI_didata.GetValue()) 
     957        self.state.dI_sqrdata = copy.deepcopy(self.dI_sqrdata.GetValue()) 
     958        self.state.dI_idata = copy.deepcopy(self.dI_idata.GetValue())   
    953959        if hasattr(self,"disp_box"): 
    954960            self.state.disp_box = self.disp_box.GetCurrentSelection() 
     
    10881094        self.pinhole_smearer.SetValue(state.pinhole_smearer) 
    10891095        self.slit_smearer.SetValue(state.slit_smearer) 
     1096         
     1097        self.dI_noweight.SetValue(state.dI_noweight) 
     1098        self.dI_didata.SetValue(state.dI_didata) 
     1099        self.dI_sqrdata.SetValue(state.dI_sqrdata) 
     1100        self.dI_idata.SetValue(state.dI_idata) 
     1101         
    10901102        ## we have two more options for smearing 
    10911103        if self.pinhole_smearer.GetValue(): self.onPinholeSmear(event=None) 
     
    12051217        self.pinhole_smearer.SetValue(state.pinhole_smearer) 
    12061218        self.slit_smearer.SetValue(state.slit_smearer) 
     1219         
     1220        self.dI_noweight.SetValue(state.dI_noweight) 
     1221        self.dI_didata.SetValue(state.dI_didata) 
     1222        self.dI_sqrdata.SetValue(state.dI_sqrdata) 
     1223        self.dI_idata.SetValue(state.dI_idata) 
     1224         
     1225         
    12071226        ## we have two more options for smearing 
    12081227        if self.pinhole_smearer.GetValue(): self.onPinholeSmear(event=None) 
    12091228        elif self.slit_smearer.GetValue(): self.onSlitSmear(event=None) 
    1210         
     1229         
    12111230        ## reset state of checkbox,textcrtl  and dispersity parameters value 
    12121231        self._reset_parameters_state(self.fittable_param,state.fittable_param) 
     
    17661785                if not self.disable_smearer.GetValue(): 
    17671786                    temp_smear= self.current_smearer 
     1787            weight = self.get_weight() 
    17681788            toggle_mode_on = self.model_view.IsEnabled() 
    17691789            self._manager.draw_model(self.model,  
     
    17761796                                    state = self.state, 
    17771797                                    enable2D=self.enable2D, 
    1778                                     update_chisqr=update_chisqr) 
     1798                                    update_chisqr=update_chisqr, 
     1799                                    weight=weight) 
    17791800         
    17801801        
Note: See TracChangeset for help on using the changeset viewer.