Changeset b5e98540 in sasview for sansview


Ignore:
Timestamp:
Apr 15, 2009 10:39:38 AM (16 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:
aa1e9a72
Parents:
27c5c26
Message:

fixed the first or last points missing from calculations

Location:
sansview/perspectives/fitting
Files:
3 edited

Legend:

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

    r69bee6d rb5e98540  
    525525        """ 
    526526         
    527         self.qmin.SetValue(format_number(self.state.qmin)) 
    528         self.qmax.SetValue(format_number(self.state.qmax))  
     527        #self.qmin.SetValue(format_number(self.state.qmin)) 
     528        #self.qmax.SetValue(format_number(self.state.qmax))  
     529        self.qmin.SetValue(str(self.state.qmin)) 
     530        self.qmax.SetValue(str(self.state.qmax))  
    529531        if self.state.npts!=None: 
    530532            self.npts.SetValue(format_number(self.state.npts))  
     
    12141216        #-------------------------------------------------------------- 
    12151217        self.qmin    = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20)) 
    1216         self.qmin.SetValue(format_number(self.qmin_x)) 
     1218        #For qmin and qmax, do not use format_number.(If do, qmin and max could be different from what is in the data.) 
     1219        #self.qmin.SetValue(format_number(self.qmin_x)) 
     1220        self.qmin.SetValue(str(self.qmin_x)) 
    12171221        self.qmin.SetToolTipString("Minimun value of Q in linear scale.") 
    12181222        self.qmin.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 
     
    12211225      
    12221226        self.qmax    = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20)) 
    1223         self.qmax.SetValue(format_number(self.qmax_x)) 
     1227        #For qmin and qmax, do not use format_number.(If do, qmin and max could be different from what is in the data.) 
     1228        #self.qmax.SetValue(format_number(self.qmax_x)) 
     1229        self.qmax.SetValue(str(self.qmax_x)) 
    12241230        self.qmax.SetToolTipString("Maximum value of Q in linear scale.") 
    12251231        self.qmax.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 
  • sansview/perspectives/fitting/fitpage.py

    r27c5c26 rb5e98540  
    145145        if not hasattr(self.data,"data"): #Display only for 1D data fit 
    146146            # Minimum value of data    
    147             data_min = str(format_number(numpy.min(self.data.x))) 
     147            #data_min = str(format_number(numpy.min(self.data.x))) 
     148            data_min = str((numpy.min(self.data.x))) 
    148149            # Maximum value of data   
    149             data_max = str(format_number(numpy.max(self.data.x))) 
     150#            data_max = str(format_number(numpy.max(self.data.x))) 
     151            data_max = str((numpy.max(self.data.x))) 
    150152            text4_3 = wx.StaticText(self, -1, 'Total Q Range (1/A)', 
    151153                                     style=wx.ALIGN_LEFT) 
     
    160162            y= numpy.max(self.data.ymin, self.data.ymax) 
    161163            radius_max = math.sqrt(x*x + y*y) 
     164             
     165            #For qmin and qmax, do not use format_number.(If do, qmin and max could be different from what is in the data.) 
    162166            # Minimum value of data    
    163             data_min = str(format_number(radius_min)) 
     167            #data_min = str(format_number(radius_min)) 
     168            data_min = str((radius_min)) 
    164169            # Maximum value of data   
    165             data_max = str(format_number(radius_max)) 
     170            #data_max = str(format_number(radius_max)) 
     171            data_max = str((radius_max)) 
    166172            text4_3 = wx.StaticText(self, -1, 'Total Q Range (1/A)', 
    167173                                     style=wx.ALIGN_LEFT) 
  • sansview/perspectives/fitting/modelpage.py

    r27c5c26 rb5e98540  
    396396         
    397397        # Set the controls 
     398        #For qmin and qmax, do not use format_number.(If do, qmin and max could be different from what is in the data.) 
     399        """ 
    398400        self.qmin.SetValue(format_number(self.qmin_x)) 
    399401        self.qmax.SetValue(format_number(self.qmax_x)) 
     402        self.npts.SetValue(format_number(self.num_points)) 
     403        """ 
     404        self.qmin.SetValue((self.qmin_x)) 
     405        self.qmax.SetValue((self.qmax_x)) 
    400406        self.npts.SetValue(format_number(self.num_points)) 
    401407         
Note: See TracChangeset for help on using the changeset viewer.