Changeset e6b9723 in sasview for sansview/perspectives
- Timestamp:
- Jan 20, 2010 3:50:37 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:
- 6d20b46
- Parents:
- d68c655
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/invariant_panel.py
r2db1d66 re6b9723 37 37 FONT_VARIANT = 1 38 38 39 class InvariantPanel(wx. Panel):39 class InvariantPanel(wx.ScrolledWindow): 40 40 """ 41 41 Provides the Invariant GUI. … … 48 48 CENTER_PANE = True 49 49 def __init__(self, parent, data=None, base=None): 50 wx. Panel.__init__(self, parent)50 wx.ScrolledWindow.__init__(self, parent, style= wx.FULL_REPAINT_ON_RESIZE ) 51 51 #Font size 52 52 self.SetWindowVariant(variant=FONT_VARIANT) … … 61 61 #Draw the panel 62 62 self._do_layout() 63 self.SetScrollbars(20,20,25,65) 63 64 self.SetAutoLayout(True) 64 65 self.Layout() … … 281 282 data_range_value_txt = wx.StaticText(self, -1, str(data_range)) 282 283 283 background_txt = wx.StaticText(self, -1, 'Background ')284 background_txt = wx.StaticText(self, -1, 'Background (Optional)') 284 285 self.background_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 285 286 self.background_ctl.SetValue(str(BACKGROUND)) 286 287 self.background_ctl.SetToolTipString("Background to subtract to data.") 287 scale_txt = wx.StaticText(self, -1, 'Scale ')288 scale_txt = wx.StaticText(self, -1, 'Scale (Optional)') 288 289 self.scale_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 289 290 self.scale_ctl.SetValue(str(SCALE)) 290 291 self.scale_ctl.SetToolTipString("Scale to apply to data.") 291 contrast_txt = wx.StaticText(self, -1, 'Contrast ')292 contrast_txt = wx.StaticText(self, -1, 'Contrast (Optional)') 292 293 self.contrast_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 293 self.contrast_ctl.SetToolTipString("Contrast in q range.") 294 porod_const_txt = wx.StaticText(self, -1, 'Porod Constant') 294 msg_hint = "Enter a value for the contrast to get the volume fraction" 295 self.contrast_ctl.SetToolTipString(str(msg_hint)) 296 porod_const_txt = wx.StaticText(self, -1, 'Porod Constant(Optional)') 295 297 self.porod_const_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 296 self.porod_const_ctl.SetToolTipString("Invariant in q range.") 298 msg_hint ="Need both the contrast and surface to get the surface" 299 self.porod_const_ctl.SetToolTipString(str(msg_hint)) 297 300 298 301 sizer_input.Add(data_txt, 0, wx.LEFT, 5) … … 335 338 self.npts_low_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/3, -1)) 336 339 self.npts_low_ctl.SetValue(str(NPTS)) 340 msg_hint = "the number of first q points to consider" 341 msg_hint +="during the fit for extrapolation at low Q" 342 self.npts_low_ctl.SetToolTipString(msg_hint) 337 343 self.power_low_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/3, -1)) 338 344 self.power_low_ctl.SetValue(str(self.power_law_exponant)) … … 363 369 self.power_law_high = wx.RadioButton(self, -1, 'Power_law', 364 370 (10, 10), style=wx.RB_GROUP) 365 #self.Bind(wx.EVT_RADIOBUTTON, self._set_dipers_Param, 366 # id=self.power_law_high.GetId()) 371 msg_hint ="Check it to extrapolate data to high Q" 372 self.power_law_high.SetToolTipString(msg_hint) 373 367 374 #MAC needs SetValue 368 375 self.power_law_high.SetValue(True) 369 376 npts_high_txt = wx.StaticText(self, -1, 'Npts') 370 377 self.npts_high_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/3, -1)) 378 msg_hint = "the number of last q points to consider" 379 msg_hint += "during the fit for extrapolation high Q" 380 self.npts_high_ctl.SetToolTipString(msg_hint) 371 381 self.npts_high_ctl.SetValue(str(NPTS)) 372 382 self.power_high_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/3, -1)) … … 404 414 extra_hint = "Extrapolation Maximum Range: " 405 415 extra_hint_txt= wx.StaticText(self, -1,extra_hint ) 406 enable_sizer = wx.BoxSizer(wx.HORIZONTAL)407 416 extra_range = "[%s - %s]"%(str(Q_MINIMUM), str(Q_MAXIMUM)) 408 417 extra_range_value_txt = wx.StaticText(self, -1, str(extra_range)) 409 enable_sizer.Add(extra_hint_txt, 0, wx.ALL, 5) 410 enable_sizer.Add(extra_range_value_txt, 0, wx.ALL, 5) 418 extra_enable_hint = "Hint: Check any box to enable a specific extrapolation !" 419 extra_enable_hint_txt= wx.StaticText(self, -1, extra_enable_hint ) 420 #enable_sizer = wx.BoxSizer(wx.HORIZONTAL) 421 enable_sizer = wx.GridBagSizer(5,5) 422 #enable_sizer.Add(extra_hint_txt, 0, wx.ALL, 5) 423 #enable_sizer.Add(extra_range_value_txt, 0, wx.ALL, 5) 424 425 iy = 0 426 ix = 0 427 enable_sizer.Add(extra_hint_txt,(iy, ix),(1,1), 428 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 429 ix += 1 430 enable_sizer.Add(extra_range_value_txt, (iy, ix), (1,1), 431 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 432 ix = 0 433 iy += 1 434 enable_sizer.Add(extra_enable_hint_txt,(iy, ix),(1,1), 435 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 411 436 412 437 type_extrapolation_sizer = wx.BoxSizer(wx.HORIZONTAL) … … 442 467 self.invariant_total_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 443 468 self.invariant_total_ctl.SetEditable(False) 444 self.invariant_total_ctl.SetToolTipString("Invariant in q range and extra\445 polated range.")469 msg_hint = "Invariant in q range and extra polated range." 470 self.invariant_total_ctl.SetToolTipString(msg_hint) 446 471 self.invariant_total_err_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 447 472 self.invariant_total_err_ctl.SetEditable(False) … … 595 620 596 621 class InvariantWindow(wx.Frame): 597 def __init__(self, parent=None, id=1,data=None, title=" SLD Calculator",base=None):622 def __init__(self, parent=None, id=1,data=None, title="Invariant",base=None): 598 623 wx.Frame.__init__(self, parent, id, title, size=( PANEL_WIDTH, 599 624 PANEL_HEIGHT))
Note: See TracChangeset
for help on using the changeset viewer.