Changeset eba08f1a in sasview for guiframe/local_perspectives/plotting/detector_dialog.py
- Timestamp:
- Mar 3, 2009 4:12:26 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:
- fe2ade9
- Parents:
- 18a3ee9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/detector_dialog.py
r9a585d0 reba08f1a 8 8 from sans.guiframe.utils import format_number 9 9 from sans.guicomm.events import StatusEvent ,NewPlotEvent,SlicerEvent 10 11 10 12 class DetectorDialog(wx.Dialog): 11 13 """ … … 17 19 kwds["style"] = wx.DEFAULT_DIALOG_STYLE 18 20 wx.Dialog.__init__(self,parent,id=1, *args, **kwds) 21 19 22 self.parent=base 20 23 self.label_xnpts = wx.StaticText(self, -1, "Detector width in pixels") … … 24 27 self.label_zmax = wx.StaticText(self, -1, "Max amplitude for color map (optional)") 25 28 self.label_beam = wx.StaticText(self, -1, "Beam stop radius in units of q") 26 #self.label_sym = wx.StaticText(self, -1, 'Use 4-fold symmetry') 27 28 # Npts, q max 29 #self.npts_ctl = wx.TextCtrl(self, -1, size=(60,20)) 30 #self.qmax_ctl = wx.TextCtrl(self, -1, size=(60,20)) 31 #self.beam_ctl = wx.TextCtrl(self, -1, size=(60,20)) 29 32 30 self.xnpts_ctl = wx.StaticText(self, -1, "") 33 31 self.ynpts_ctl = wx.StaticText(self, -1, "") … … 37 35 self.zmin_ctl = wx.TextCtrl(self, -1, size=(60,20)) 38 36 self.zmax_ctl = wx.TextCtrl(self, -1, size=(60,20)) 39 #self.chk_sym = wx.CheckBox(self, -1, '') 40 37 41 38 self.static_line_3 = wx.StaticLine(self, -1) 42 39 … … 61 58 62 59 def checkValues(self, event): 60 """ 61 Check the valitidity of zmin and zmax value 62 zmax should be a float and zmin less than zmax 63 """ 63 64 flag = True 64 65 try: … … 97 98 98 99 def setContent(self, xnpts,ynpts, qmax, beam,zmin=None,zmax=None, sym=False): 100 """ 101 received value and displayed them 102 @param xnpts: the number of point of the x_bins of data 103 @param ynpts: the number of point of the y_bins of data 104 @param qmax: the maxmimum value of data pixel 105 @param beam : the radius of the beam 106 @param zmin: the value to get the minimum color 107 @param zmax: the value to get the maximum color 108 @param sym: 109 """ 99 110 self.xnpts_ctl.SetLabel(str(format_number(xnpts))) 100 111 self.ynpts_ctl.SetLabel(str(format_number(ynpts))) 101 112 self.qmax_ctl.SetLabel(str(format_number(qmax))) 102 113 self.beam_ctl.SetLabel(str(format_number(beam))) 103 #self.chk_sym.SetValue(sym)114 104 115 if zmin !=None: 105 116 self.zmin_ctl.SetValue(str(format_number(zmin))) … … 108 119 109 120 def getContent(self): 121 """ 122 @return event containing value to reset the detector of a given data 123 """ 110 124 event = self.Event() 111 #event.npts = int(self.npts_ctl.GetValue()) 112 #event.qmax = float(self.qmax_ctl.GetValue()) 113 #event.beam = float(self.beam_ctl.GetValue()) 114 #event.sym4 = self.chk_sym.GetValue() 115 125 116 126 t_min = self.zmin_ctl.GetValue() 117 127 t_max = self.zmax_ctl.GetValue() … … 137 147 138 148 def __set_properties(self): 149 """ 150 set proprieties of the dialog window 151 """ 139 152 self.SetTitle("Detector parameters") 140 153 self.SetSize((600, 595)) 141 154 155 142 156 def __do_layout(self): 157 """ 158 fill the dialog window . 159 """ 143 160 sizer_main = wx.BoxSizer(wx.VERTICAL) 144 161 sizer_button = wx.BoxSizer(wx.HORIZONTAL) … … 164 181 sizer_params.Add(self.zmax_ctl, (iy,1), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 165 182 iy += 1 166 #sizer_params.Add(self.label_sym, (iy,0), (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 167 #sizer_params.Add(self.chk_sym, (iy,1), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 168 183 169 184 sizer_main.Add(sizer_params, 0, wx.EXPAND|wx.ALL, 10) 170 185 sizer_main.Add(self.static_line_3, 0, wx.EXPAND, 0)
Note: See TracChangeset
for help on using the changeset viewer.