Ignore:
Timestamp:
May 11, 2010 9:51:05 AM (14 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:
46fe6a6
Parents:
f72333f
Message:

Fixed minor bug on pinhol acc. cb

File:
1 edited

Legend:

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

    rf72333f r4fbc93e  
    2424_DATA_BOX_WIDTH = 300 
    2525SMEAR_SIZE_L = 0.005 
    26 SMEAR_SIZE_H = 0.01 
     26SMEAR_SIZE_H = 0.006 
    2727 
    2828import basepage 
     
    883883        #get event object 
    884884        tcrtl= event.GetEventObject() 
    885  
     885        wx.PostEvent(self.manager.parent, StatusEvent(status=" \ 
     886                                updating ... ",type="update")) 
    886887        #Clear msg if previously shown. 
    887888        msg= "" 
     
    12141215        """ 
    12151216        #event.Skip() 
    1216         accuracy = event.GetEventObject() 
    1217          
    1218         self.smear2d_accuracy = accuracy.GetValue() 
     1217         
     1218        # Check if the accuracy is same as before 
     1219        # Mac does not get the GetEventObject; use the line below 
     1220        #self.smear2d_accuracy = event.GetEventObject().GetValue() 
     1221        self.smear2d_accuracy = self.smear_accuracy.GetValue() 
    12191222        if self.pinhole_smearer.GetValue(): 
    12201223            self.onPinholeSmear(event=None) 
    1221          
    1222         else:    self.onSmear(event=None) 
    1223         if self.current_smearer !=None: 
     1224        else:     
     1225            self.onSmear(event=None) 
     1226            if self.current_smearer != None: 
    12241227                self.current_smearer.set_accuracy(accuracy = self.smear2d_accuracy) 
     1228                
    12251229        event.Skip() 
     1230         
    12261231    def _onMask(self, event):      
    12271232        """ 
     
    15281533            Create a custom pinhole smear object that will change the way residuals 
    15291534            are compute when fitting 
     1535            @ accuracy: given by strings'High','Med', 'Low' FOR 2d,  None for 1D 
    15301536        """ 
    15311537 
     
    16581664                else: data.dx[data.dx==0] = self.dx_max           
    16591665            self.current_smearer = smear_selection(data) 
     1666            # 2D need to set accuracy 
     1667            if self._is_2D():  
     1668                self.current_smearer.set_accuracy(accuracy = self.smear2d_accuracy) 
    16601669 
    16611670        if msg != None: 
     
    16661675        ## set smearing value whether or not the data contain the smearing info 
    16671676        self.manager.set_smearer(smearer=self.current_smearer, qmin= float(self.qmin_x),qmax= float(self.qmax_x)) 
    1668   
    16691677        return msg 
    16701678         
Note: See TracChangeset for help on using the changeset viewer.