- Timestamp:
- Apr 16, 2009 8:34:39 AM (16 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:
- 997131a
- Parents:
- 06b59fe
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
r298b762 rd1e0473 1 2 1 3 import sys 2 4 import wx … … 107 109 108 110 #Display Chi^2/dof 109 sizer_smearer.Add(( 70,10))111 sizer_smearer.Add((68,10)) 110 112 box_description= wx.StaticBox(self, -1,'Chi2/dof') 111 113 boxsizer1 = wx.StaticBoxSizer(box_description, wx.VERTICAL) … … 170 172 #data_max = str(format_number(radius_max)) 171 173 data_max = str((radius_max)) 172 text4_3 = wx.StaticText(self, -1, 'Total Q Range (1/A)',174 text4_3 = wx.StaticText(self, -1, "Total Q Range (1/A)", 173 175 style=wx.ALIGN_LEFT) 174 176 sizer_data.Add( text4_3 ) … … 714 716 """ 715 717 set to true or false all checkBox given the main checkbox value cb1 716 """ 718 """ 719 717 720 self.param_toFit=[] 718 721 … … 812 815 sizer.Add(self.cb1,(iy, ix),(1,1),\ 813 816 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 817 ix += 1 818 self.text2_4 = wx.StaticText(self, -1, '[Units]') 819 sizer.Add(self.text2_4,(iy, ix),(1,1),\ 820 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 821 #self.text2_4.Hide() 814 822 ix +=1 815 823 self.text2_2 = wx.StaticText(self, -1, 'Values') … … 831 839 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 832 840 self.text2_max.Hide() 833 ix += 1834 self.text2_4 = wx.StaticText(self, -1, '[Units]')835 sizer.Add(self.text2_4,(iy, ix),(1,1),\836 wx.EXPAND|wx.ADJUST_MINSIZE, 0)837 self.text2_4.Hide()838 841 if self.engine_type=="park": 839 842 self.text2_max.Show(True) … … 850 853 sizer.Add( cb,( iy, ix),(1,1), 851 854 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 855 ix +=1 856 # Units 857 try: 858 units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT) 859 except: 860 units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT) 861 sizer.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 862 852 863 ## add parameter value 853 864 ix += 1 … … 902 913 ctl4.Show(True) 903 914 904 ix +=1905 # Units906 try:907 units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT)908 except:909 units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT)910 sizer.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)911 912 915 ##[cb state, name, value, "+/-", error of fit, min, max , units] 913 916 self.parameters.append([cb,item, ctl1, … … 930 933 sizer.Add( cb,( iy, ix),(1,1), 931 934 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 935 ix +=1 936 # Units 937 try: 938 units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT) 939 except: 940 units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT) 941 if self.data.__class__.__name__ =="Data2D": 942 units.Enable() 943 else: 944 units.Disable() 945 sizer.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 946 932 947 ## add parameter value 933 948 ix += 1 … … 992 1007 ctl4.Show(True) 993 1008 994 ix +=1995 # Units996 try:997 units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT)998 except:999 units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT)1000 sizer.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)1001 1009 1002 1010 ##[cb state, name, value, "+/-", error of fit, min, max , units] -
sansview/perspectives/fitting/modelpage.py
r60132ef rd1e0473 446 446 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 447 447 ix +=1 448 self.text2_4 = wx.StaticText(self, -1, '[Units]') 449 sizer.Add(self.text2_4,(iy, ix),(1,1),\ 450 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 451 #self.text2_4.Hide() 452 ix +=1 448 453 self.text2_2 = wx.StaticText(self, -1, 'Values') 449 454 sizer.Add(self.text2_2,(iy, ix),(1,1),\ 450 455 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 451 ix +=1452 self.text2_4 = wx.StaticText(self, -1, '[Units]')453 sizer.Add(self.text2_4,(iy, ix),(1,1),\454 wx.EXPAND|wx.ADJUST_MINSIZE, 0)455 self.text2_4.Hide()456 456 457 457 for item in keys: … … 462 462 sizer.Add( name,( iy, ix),(1,1), 463 463 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 464 ix += 1465 value= self.model.getParam(item)466 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20),467 style=wx.TE_PROCESS_ENTER)468 469 ctl1.SetValue(str (format_number(value)))470 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)471 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)472 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)473 474 sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND)475 464 ix +=1 476 465 # Units … … 480 469 units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT) 481 470 sizer.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 471 472 ix += 1 473 value= self.model.getParam(item) 474 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), 475 style=wx.TE_PROCESS_ENTER) 476 477 ctl1.SetValue(str (format_number(value))) 478 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 479 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 480 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 481 482 sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND) 482 483 ##[cb state, name, value, "+/-", error of fit, min, max , units] 483 484 self.parameters.append([None,item, ctl1, … … 492 493 sizer.Add( name,( iy, ix),(1,1), 493 494 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 494 ix += 1495 value= self.model.getParam(item)496 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20),497 style=wx.TE_PROCESS_ENTER)498 499 ctl1.SetValue(str (format_number(value)))500 ctl1.Disable()501 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)502 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)503 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)504 505 sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND)506 495 ix +=1 507 496 # Units … … 511 500 units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT) 512 501 sizer.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 502 503 ix += 1 504 value= self.model.getParam(item) 505 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), 506 style=wx.TE_PROCESS_ENTER) 507 508 ctl1.SetValue(str (format_number(value))) 509 ctl1.Disable() 510 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 511 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 512 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 513 514 sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND) 515 513 516 ##[cb state, name, value, "+/-", error of fit, min, max , units] 514 517 self.parameters.append([None,item, ctl1,
Note: See TracChangeset
for help on using the changeset viewer.