Ignore:
Timestamp:
Mar 3, 2009 4:12:26 PM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
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
Message:

add comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/local_perspectives/plotting/detector_dialog.py

    r9a585d0 reba08f1a  
    88from sans.guiframe.utils import format_number 
    99from sans.guicomm.events import StatusEvent ,NewPlotEvent,SlicerEvent 
     10 
     11 
    1012class DetectorDialog(wx.Dialog): 
    1113    """ 
     
    1719        kwds["style"] = wx.DEFAULT_DIALOG_STYLE 
    1820        wx.Dialog.__init__(self,parent,id=1, *args, **kwds) 
     21     
    1922        self.parent=base 
    2023        self.label_xnpts = wx.StaticText(self, -1, "Detector width in pixels") 
     
    2427        self.label_zmax = wx.StaticText(self, -1, "Max amplitude for color map (optional)") 
    2528        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         
    3230        self.xnpts_ctl = wx.StaticText(self, -1, "") 
    3331        self.ynpts_ctl = wx.StaticText(self, -1, "") 
     
    3735        self.zmin_ctl = wx.TextCtrl(self, -1, size=(60,20)) 
    3836        self.zmax_ctl = wx.TextCtrl(self, -1, size=(60,20)) 
    39         #self.chk_sym  = wx.CheckBox(self, -1, '') 
    40  
     37     
    4138        self.static_line_3 = wx.StaticLine(self, -1) 
    4239         
     
    6158         
    6259    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        """ 
    6364        flag = True 
    6465        try: 
     
    9798     
    9899    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        """ 
    99110        self.xnpts_ctl.SetLabel(str(format_number(xnpts))) 
    100111        self.ynpts_ctl.SetLabel(str(format_number(ynpts))) 
    101112        self.qmax_ctl.SetLabel(str(format_number(qmax))) 
    102113        self.beam_ctl.SetLabel(str(format_number(beam))) 
    103         #self.chk_sym.SetValue(sym) 
     114        
    104115        if zmin !=None: 
    105116            self.zmin_ctl.SetValue(str(format_number(zmin))) 
     
    108119 
    109120    def getContent(self): 
     121        """ 
     122            @return event containing value to reset the detector of a given data 
     123        """ 
    110124        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        
    116126        t_min = self.zmin_ctl.GetValue() 
    117127        t_max = self.zmax_ctl.GetValue() 
     
    137147 
    138148    def __set_properties(self): 
     149        """ 
     150            set proprieties of the dialog window 
     151        """ 
    139152        self.SetTitle("Detector parameters") 
    140153        self.SetSize((600, 595)) 
    141154 
     155 
    142156    def __do_layout(self): 
     157        """ 
     158            fill the dialog window . 
     159        """ 
    143160        sizer_main = wx.BoxSizer(wx.VERTICAL) 
    144161        sizer_button = wx.BoxSizer(wx.HORIZONTAL) 
     
    164181        sizer_params.Add(self.zmax_ctl,   (iy,1), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    165182        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        
    169184        sizer_main.Add(sizer_params, 0, wx.EXPAND|wx.ALL, 10) 
    170185        sizer_main.Add(self.static_line_3, 0, wx.EXPAND, 0) 
Note: See TracChangeset for help on using the changeset viewer.