Changeset 813334e in sasview for sansview/perspectives/fitting/fitpage.py
- Timestamp:
- Apr 23, 2009 5:39:33 PM (15 years ago)
- 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:
- 4bd557d
- Parents:
- e473e4f5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
re473e4f5 r813334e 45 45 ## draw sizer 46 46 self._fill_datainfo_sizer() 47 print "self.qmin, self.qmax====>",self.qmax_x,self.qmin_x 47 48 self._fill_model_sizer( self.sizer1) 48 49 self._fill_range_sizer() … … 53 54 self.enable_smearer.Disable() 54 55 self.disable_smearer.Disable() 55 #try: 56 ##Calculate chi2 57 # self.compute_chisqr(smearer= temp_smearer) 58 #except: 59 # raise 56 60 57 ## to update the panel according to the fit engine type selected 61 58 self.Bind(EVT_FITTER_TYPE,self._on_engine_change) … … 188 185 if not hasattr(self.data,"data"): #Display only for 1D data fit 189 186 # Minimum value of data 190 #data_min = str(format_number(numpy.min(self.data.x))) 191 data_min = str((numpy.min(self.data.x))) 187 data_min = min(self.data.x) 192 188 # Maximum value of data 193 # data_max = str(format_number(numpy.max(self.data.x))) 194 data_max = str((numpy.max(self.data.x))) 189 data_max = max(self.data.x) 195 190 text4_3 = wx.StaticText(self, -1, 'Total Q Range (1/A)', 196 191 style=wx.ALIGN_LEFT) 197 192 sizer_data.Add( text4_3 ) 198 sizer_data.Add(wx.StaticText(self, -1, "Min : %s"%data_min)) 199 200 sizer_data.Add(wx.StaticText(self, -1, "Max : %s"%data_max)) 193 sizer_data.Add(wx.StaticText(self, -1, "Min : %s"%str(data_min))) 194 sizer_data.Add(wx.StaticText(self, -1, "Max : %s"%str(data_max))) 201 195 202 196 else: 203 radius_min= 0 204 x= numpy.max(self.data.xmin, self.data.xmax) 205 y= numpy.max(self.data.ymin, self.data.ymax) 206 radius_max = math.sqrt(x*x + y*y) 207 197 ## Minimum value of data 198 data_min= 0 199 x= max(math.fabs(self.data.xmin), math.fabs(self.data.xmax)) 200 y= max(math.fabs(self.data.ymin), math.fabs(self.data.ymax)) 201 ## Maximum value of data 202 data_max = math.sqrt(x*x + y*y) 203 208 204 #For qmin and qmax, do not use format_number 209 205 #.(If do, qmin and max could be different from what is in the data.) 210 # Minimum value of data211 data_min = str((radius_min))212 # Maximum value of data213 data_max = str((radius_max))214 206 text4_3 = wx.StaticText(self, -1, "Total Q Range (1/A)", 215 207 style=wx.ALIGN_LEFT) 216 208 sizer_data.Add( text4_3 ) 217 sizer_data.Add(wx.StaticText(self, -1, "Min : %s"%data_min)) 218 sizer_data.Add(wx.StaticText(self, -1, "Max : %s"%data_max)) 219 209 sizer_data.Add(wx.StaticText(self, -1, "Min : %s"%str(data_min))) 210 sizer_data.Add(wx.StaticText(self, -1, "Max : %s"%str(data_max))) 211 ## set q range to plot 212 self.qmin_x= data_min 213 self.qmax_x= data_max 214 220 215 boxsizer1.Add(sizer_data) 221 216 #------------------------------------------------------------ 222 217 self.sizer0.Add(boxsizer1,0, wx.EXPAND | wx.ALL, 10) 223 218 self.sizer0.Layout() 224 225 self.qmin_x= data_min 226 self.qmax_x= data_max 219 227 220 228 221
Note: See TracChangeset
for help on using the changeset viewer.