Changeset 277fad8 in sasview for invariantview/perspectives
- Timestamp:
- Mar 29, 2010 5:26:25 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:
- c52f66f
- Parents:
- 0bf2c6f
- Location:
- invariantview/perspectives/invariant
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
invariantview/perspectives/invariant/invariant_details.py
rda87bce r277fad8 91 91 """ 92 92 uncertainty = "+/-" 93 unit_invariant = '[1/cm ][1/A]'93 unit_invariant = '[1/cm 1/A]' 94 94 95 95 invariant_txt = wx.StaticText(self, -1, 'Invariant') … … 173 173 self.warning_msg_txt = wx.StaticText(self, -1,self.warning_msg) 174 174 self.warning_msg_txt.SetForegroundColour('red') 175 self.warning_sizer.AddMany([(self.warning_msg_txt, 0, wx.EXPAND)]) 175 self.warning_sizer.AddMany([(self.warning_msg_txt, 0, 176 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 10)]) 176 177 177 178 def _layout_button(self): -
invariantview/perspectives/invariant/invariant_panel.py
ra0a4486 r277fad8 122 122 self.data_min_tcl.SetLabel(str(data_qmin)) 123 123 self.data_max_tcl.SetLabel(str(data_qmax)) 124 self.hint_msg_txt.SetLabel('') 124 125 125 126 def set_manager(self, manager): … … 314 315 @return float value necessary to compute invariant a high q 315 316 """ 317 power_high = None 318 #if self.power_law_high.GetValue(): 316 319 function_high = "power_law" 317 power_high = None 318 if self.power_law_high.GetValue(): 319 function_high = "power_law" 320 if self.fit_enable_high.GetValue(): 321 #set value of power_high to none to allow fitting 322 power_high = None 320 if self.fit_enable_high.GetValue(): 321 #set value of power_high to none to allow fitting 322 power_high = None 323 else: 324 power_high = self.power_high_tcl.GetValue().lstrip().rstrip() 325 if check_float(self.power_high_tcl): 326 power_high = float(power_high) 323 327 else: 324 power_high = self.power_high_tcl.GetValue().lstrip().rstrip() 325 if check_float(self.power_high_tcl): 326 power_high = float(power_high) 327 else: 328 if high_q : 329 #Raise error only when qstar at high q is requested 330 msg = "Expect float for power at high q , got %s"%(power_high) 331 raise ValueError, msg 328 if high_q : 329 #Raise error only when qstar at high q is requested 330 msg = "Expect float for power at high q , got %s"%(power_high) 331 raise ValueError, msg 332 332 333 333 npts_high = self.npts_high_tcl.GetValue().lstrip().rstrip() … … 478 478 self.volume_surface_sizer = wx.GridBagSizer(5,5) 479 479 #Sizer related to invariant output 480 self.invariant_sizer = wx.GridBagSizer( 4, 4)480 self.invariant_sizer = wx.GridBagSizer(5, 5) 481 481 #Sizer related to button 482 482 self.button_sizer = wx.BoxSizer(wx.HORIZONTAL) … … 488 488 #Sizer hint 489 489 hint_msg = "Load Data then right click to add the data on this panel! " 490 hint_msg_txt = wx.StaticText(self, -1, hint_msg)491 hint_msg_txt.SetForegroundColour("red")492 self.hint_msg_sizer.Add( hint_msg_txt)490 self.hint_msg_txt = wx.StaticText(self, -1, hint_msg) 491 self.hint_msg_txt.SetForegroundColour("red") 492 self.hint_msg_sizer.Add(self.hint_msg_txt) 493 493 #Data name [string] 494 494 data_name_txt = wx.StaticText(self, -1, 'Data : ') … … 525 525 self.background_tcl.SetToolTipString(background_hint_txt) 526 526 background_unit_txt = wx.StaticText(self, -1, '[1/cm]') 527 self.background_sizer.AddMany([(background_txt, 0, wx.LEFT |wx.RIGHT, 10),528 (self.background_tcl, 0, wx. RIGHT, 10),529 (background_unit_txt )])527 self.background_sizer.AddMany([(background_txt, 0, wx.LEFT, 10), 528 (self.background_tcl, 0, wx.LEFT, 15), 529 (background_unit_txt, 0, wx.LEFT, 10)]) 530 530 def _layout_scale(self): 531 531 """ … … 538 538 self.scale_tcl.SetValue(str(SCALE)) 539 539 self.scale_sizer.AddMany([(scale_txt, 0, wx.LEFT|wx.RIGHT, 10), 540 (self.scale_tcl, 0, wx.LEFT, 3 0)])540 (self.scale_tcl, 0, wx.LEFT, 35)]) 541 541 542 542 def _layout_contrast(self): … … 551 551 contrast_unit_txt = wx.StaticText(self, -1, '[1/A^(2)]') 552 552 self.contrast_sizer.AddMany([(contrast_txt, 0, wx.LEFT|wx.RIGHT, 10), 553 (self.contrast_tcl, 0, wx.LEFT, 1 5),553 (self.contrast_tcl, 0, wx.LEFT, 18), 554 554 (contrast_unit_txt, 0, wx.LEFT, 10)]) 555 555 … … 617 617 """ 618 618 self.enable_low_cbox = wx.CheckBox(self, -1, "Enable Extrapolate Low Q") 619 self.enable_low_cbox.SetForegroundColour('red')620 619 self.enable_low_cbox.SetValue(False) 621 620 wx.EVT_CHECKBOX(self, self.enable_low_cbox.GetId(), … … 722 721 """ 723 722 self.enable_high_cbox = wx.CheckBox(self, -1, "Enable Extrapolate high-Q") 724 self.enable_high_cbox.SetForegroundColour('red')725 723 self.enable_high_cbox.SetValue(False) 726 724 wx.EVT_CHECKBOX(self, self.enable_high_cbox.GetId(), … … 736 734 id=self.fit_enable_high.GetId()) 737 735 738 self.power_law_high = wx.RadioButton(self, -1, 'Power Law', 739 (10, 10), style=wx.RB_GROUP) 740 msg_hint ="Check to extrapolate data at high-Q" 741 self.power_law_high.SetToolTipString(msg_hint) 742 self.power_law_high.SetValue(True) 736 self.power_law_high = wx.StaticText(self, -1, 'Power Law') 737 #msg_hint ="Check to extrapolate data at high-Q" 738 #self.power_law_high.SetToolTipString(msg_hint) 743 739 npts_high_txt = wx.StaticText(self, -1, 'Npts') 744 740 self.npts_high_tcl = InvTextCtrl(self, -1, size=(_BOX_WIDTH*2/3, -1)) … … 843 839 volume_units_txt = wx.StaticText(self, -1, unit_volume) 844 840 845 surface_txt = wx.StaticText(self, -1, 'Specific surface')841 surface_txt = wx.StaticText(self, -1, 'Specific Surface') 846 842 self.surface_tcl = OutputTextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 847 843 self.surface_tcl.SetToolTipString("Specific surface value.") … … 887 883 """ 888 884 uncertainty = "+/-" 889 unit_invariant = '[1/ cm][1/A]'885 unit_invariant = '[1/(cm * A)]' 890 886 invariant_total_txt = wx.StaticText(self, -1, 'Invariant Total') 891 887 self.invariant_total_tcl = OutputTextCtrl(self, -1, size=(_BOX_WIDTH,-1)) … … 903 899 ix += 1 904 900 self.invariant_sizer.Add(self.invariant_total_tcl, (iy, ix), (1,1), 905 wx.EXPAND|wx.ADJUST_MINSIZE, 0)901 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 5) 906 902 ix += 1 907 903 self.invariant_sizer.Add( wx.StaticText(self, -1, uncertainty), 908 (iy, ix),(1,1),wx.EXPAND|wx.ADJUST_MINSIZE, 0)904 (iy, ix),(1,1),wx.EXPAND|wx.ADJUST_MINSIZE, 10) 909 905 ix += 1 910 906 self.invariant_sizer.Add(self.invariant_total_err_tcl, (iy, ix), (1,1), 911 wx.EXPAND|wx.ADJUST_MINSIZE, 0)912 ix += 1 913 self.invariant_sizer.Add(invariant_total_units_txt 914 ,(iy, ix),(1,1),wx.EXPAND|wx.ADJUST_MINSIZE, 0)907 wx.EXPAND|wx.ADJUST_MINSIZE, 10) 908 ix += 1 909 self.invariant_sizer.Add(invariant_total_units_txt,(iy, ix), (1,1), 910 wx.EXPAND|wx.ADJUST_MINSIZE, 10) 915 911 916 912 def _layout_outputs_sizer(self):
Note: See TracChangeset
for help on using the changeset viewer.