Changeset 342dc442 in sasview for fittingview/src/sans/perspectives


Ignore:
Timestamp:
Oct 3, 2011 12:15:03 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:
3fb5e68
Parents:
63dc6e5
Message:

"fixed problem not updating weight on smear

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

Legend:

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

    rd682c92 r342dc442  
    21702170        """ 
    21712171        self.weightbt_string = event.GetEventObject().GetLabelText() 
     2172        # compute weight for the current data 
     2173        from .utils import get_weight 
     2174        flag_weight = self.get_weight_flag() 
     2175        weight = get_weight(data=self.data,  
     2176                            is2d=self._is_2D(),  
     2177                            flag=flag_weight) 
     2178        self._manager.set_fit_weight(uid=self.uid,  
     2179                                     flag=flag_weight,  
     2180                                     is2d=self._is_2D(),  
     2181                                     fid=None) 
    21722182     
    21732183    def onPinholeSmear(self, event): 
     
    25922602        self.sizer_set_smearer.Layout() 
    25932603        self.Layout() 
     2604         
     2605        # compute weight for the current data 
     2606        from .utils import get_weight 
     2607        flag_weight = self.get_weight_flag() 
     2608        weight = get_weight(data=self.data,  
     2609                            is2d=self._is_2D(),  
     2610                            flag=flag_weight) 
     2611        self._manager.set_fit_weight(uid=self.uid,  
     2612                                     flag=flag_weight,  
     2613                                     is2d=self._is_2D(),  
     2614                                     fid=None) 
     2615         
    25942616        ## set smearing value whether or not the data contain the smearing info 
    25952617        self._manager.set_smearer(uid=self.uid, smearer=temp_smearer, 
  • fittingview/src/sans/perspectives/fitting/fitting.py

    r7bd6cfae r342dc442  
    620620            ## redraw the model with data smeared 
    621621            smear = self.page_finder[uid].get_smearer(fid=fid) 
     622 
     623            # compute weight for the current data 
     624            weight = self.page_finder[uid].get_weight(fid=fid) 
     625 
    622626            self.draw_model(model=model, data=data, page_id=uid, smearer=smear, 
    623627                enable1D=enable1D, enable2D=enable2D, 
    624                 qmin=qmin, qmax=qmax, weight=None) 
     628                qmin=qmin, qmax=qmax, weight=weight) 
    625629            self._mac_sleep(0.2) 
    626630             
Note: See TracChangeset for help on using the changeset viewer.