Changeset cb270ad2 in sasview
- Timestamp:
- Apr 6, 2013 1:23:46 PM (12 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:
- 3e001f9
- Parents:
- e2271c5
- Location:
- fittingview/src/sans/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/basepage.py
r0d795bf rcb270ad2 239 239 self._create_default_2d_data() 240 240 else: 241 self._create_default_1d_data() 241 if self.pointsbox.GetValue(): 242 self._create_log_1d_data() 243 else: 244 self._create_default_1d_data() 245 242 246 if self.model != None: 243 247 if not self.data.is_data: … … 265 269 self.data.id = str(self.uid) + " data" 266 270 self.data.group_id = str(self.uid) + " Model1D" 267 271 272 def _create_log_1d_data(self): 273 """ 274 Create log-spaced data for fitting perspective 275 Only when the page is on theory mode. 276 :warning: This data is never plotted. 277 278 """ 279 if self.qmin_x >= 1.e-10: 280 qmin = numpy.log10(self.qmin_x) 281 else: 282 qmin = -10. 283 284 if self.qmax_x <= 1.e10: 285 qmax = numpy.log10(self.qmax_x) 286 else: 287 qmax = 10. 288 289 x = numpy.logspace(start=qmin, stop=qmax, 290 num=self.npts_x, endpoint=True, base=10.0) 291 self.data = Data1D(x=x) 292 self.data.xaxis('\\rm{Q}', "A^{-1}") 293 self.data.yaxis('\\rm{Intensity}', "cm^{-1}") 294 self.data.is_data = False 295 self.data.id = str(self.uid) + " data" 296 self.data.group_id = str(self.uid) + " Model1D" 297 268 298 def _create_default_2d_data(self): 269 299 """ … … 2936 2966 self._draw_model() 2937 2967 2968 def select_log(self, event): 2969 """ 2970 Log checked to generate log spaced points for theory model 2971 """ 2972 2938 2973 def get_images(self): 2939 2974 """ -
fittingview/src/sans/perspectives/fitting/fitpage.py
r0d795bf rcb270ad2 348 348 sizer_smearer.Add((10, 10)) 349 349 350 # StaticText for chi2, N(for fitting), Npts 350 # StaticText for chi2, N(for fitting), Npts + Log/linear spacing 351 351 self.tcChi = BGTextCtrl(self, -1, "-", size=(75, 20), style=0) 352 352 self.tcChi.SetToolTipString("Chi2/Npts(Fit)") … … 361 361 self.Npts_total.SetToolTipString(\ 362 362 " Total Npts : total number of data points") 363 363 364 364 # Update and Draw button 365 365 self.draw_button = wx.Button(self, wx.NewId(), … … 369 369 self.draw_button.SetToolTipString("Compute and Draw.") 370 370 371 self.points_sizer = wx.BoxSizer(wx.HORIZONTAL) 372 self.pointsbox = wx.CheckBox(self, -1, 'Log?', (10, 10)) 373 self.pointsbox.SetValue(False) 374 self.pointsbox.SetToolTipString("Check mark to use log spaced points") 375 wx.EVT_CHECKBOX(self, self.pointsbox.GetId(), self.select_log) 376 377 self.points_sizer.Add(wx.StaticText(self, -1, 'Npts ')) 378 self.points_sizer.Add(self.pointsbox) 379 371 380 box_description_1 = wx.StaticText(self, -1, ' Chi2/Npts') 372 381 box_description_2 = wx.StaticText(self, -1, 'Npts(Fit)') 373 box_description_3 = wx.StaticText(self, -1, 'Total Npts')374 box_description_3.SetToolTipString( \375 " Total Npts : total number of data points")382 #box_description_3 = wx.StaticText(self, -1, 'Total Npts') 383 #box_description_3.SetToolTipString( \ 384 # " Total Npts : total number of data points") 376 385 377 386 sizer_fit.Add(box_description_1, 0, 0) 378 387 sizer_fit.Add(box_description_2, 0, 0) 379 sizer_fit.Add(box_description_3, 0, 0) 388 sizer_fit.Add(self.points_sizer, 0, 0) 389 #sizer_fit.Add(box_description_3, 0, 0) 380 390 sizer_fit.Add(self.draw_button, 0, 0) 381 391 sizer_fit.Add(self.tcChi, 0, 0) … … 528 538 self.btEditMask.SetToolTipString("Edit Mask.") 529 539 self.EditMask_title = wx.StaticText(self, -1, ' Masking(2D)') 530 540 531 541 sizer.Add(wx.StaticText(self, -1, ' Q range')) 532 542 sizer.Add(wx.StaticText(self, -1, ' Min[1/A]')) … … 1848 1858 1849 1859 self.Npts_total.Bind(wx.EVT_MOUSE_EVENTS, self._npts_click) 1860 self.pointsbox.Disable() 1850 1861 self.dataSource.SetValue(data_name) 1851 1862 self.state.data = data … … 2648 2659 param2fit.append(item[1]) 2649 2660 self.parent._manager.set_param2fit(self.uid, param2fit) 2650 2661 2651 2662 def select_param(self, event): 2652 2663 """
Note: See TracChangeset
for help on using the changeset viewer.