Index: sansguiframe/src/sans/guiframe/data_panel.py
===================================================================
--- sansguiframe/src/sans/guiframe/data_panel.py	(revision dc0cfa47259ca12e3f8b372f1b6d97e00f4ce6fc)
+++ sansguiframe/src/sans/guiframe/data_panel.py	(revision 6605880563040af4b4dbe8084f4e9bad68ebd285)
@@ -69,5 +69,5 @@
     Check list control to be used for Data Panel
     """
-    def __init__(self, parent,*args, **kwds):
+    def __init__(self, parent, *args, **kwds):
         #agwstyle is introduced in wx.2.8.11 but is not working for mac
         if IS_MAC and wx_version < 812:
@@ -79,5 +79,6 @@
                 CT.CustomTreeCtrl.__init__(self, parent, *args, **kwds)
         else:
-            #agwstyle is introduced in wx.2.8.11 .argument working only for windows
+            # agwstyle is introduced in wx.2.8.11
+            # argument working only for windows
             try:
                 kwds['agwStyle'] = STYLE_FLAG
@@ -127,5 +128,5 @@
                  size=(PANEL_WIDTH, PANEL_HEIGHT),
                  list_of_perspective=None, manager=None, *args, **kwds):
-        kwds['size']= size
+        kwds['size'] = size
         kwds['style'] = STYLE_FLAG
         ScrolledPanel.__init__(self, parent=parent, *args, **kwds)
@@ -146,5 +147,5 @@
             list_of_perspective = []
         self.list_of_perspective = list_of_perspective
-        self.list_rb_perspectives= []
+        self.list_rb_perspectives = []
         self.list_cb_data = {}
         self.list_cb_theory = {}
@@ -165,4 +166,5 @@
     def do_layout(self):
         """
+            Create the panel layout
         """
         self.define_panel_structure()
@@ -171,5 +173,4 @@
         self.layout_batch()
         self.layout_button()
-        
    
     def define_panel_structure(self):
@@ -187,8 +188,8 @@
         self.sizer5 = wx.BoxSizer(wx.VERTICAL)
        
-        self.vbox.Add(self.sizer5, 0, wx.EXPAND|wx.ALL,1)
-        self.vbox.Add(self.sizer1, 1, wx.EXPAND|wx.ALL,0)
-        self.vbox.Add(self.sizer2, 0, wx.EXPAND|wx.ALL,1)
-        self.vbox.Add(self.sizer3, 0, wx.EXPAND|wx.ALL,10)
+        self.vbox.Add(self.sizer5, 0, wx.EXPAND|wx.ALL, 1)
+        self.vbox.Add(self.sizer1, 1, wx.EXPAND|wx.ALL, 0)
+        self.vbox.Add(self.sizer2, 0, wx.EXPAND|wx.ALL, 1)
+        self.vbox.Add(self.sizer3, 0, wx.EXPAND|wx.ALL, 10)
         #self.vbox.Add(self.sizer4, 0, wx.EXPAND|wx.ALL,5)
         
@@ -197,4 +198,5 @@
     def layout_selection(self):
         """
+            Create selection option combo box
         """
         select_txt = wx.StaticText(self, -1, 'Selection Options')
@@ -218,13 +220,7 @@
     def _on_selection_type(self, event):
         """
-        Select data according to patterns
-        """
-        
-        list_of_options = ['Select all Data',
-                            'Unselect all Data',
-                           'Select all Data 1D',
-                           'Unselect all Data 1D',
-                           'Select all Data 2D',
-                           'Unselect all Data 2D' ]
+            Select data according to patterns
+            :param event: UI event
+        """
         option = self.selection_cbox.GetValue()
         
@@ -234,5 +230,5 @@
         option = self.selection_cbox.GetString(pos)
         for item in self.list_cb_data.values():
-            data_ctrl, _, _, _,_, _,_,_= item
+            data_ctrl, _, _, _, _, _, _, _= item
             data_id, data_class, _ = self.tree_ctrl.GetItemPyData(data_ctrl) 
             if option == 'Select all Data':
@@ -283,5 +279,5 @@
         if not IS_MAC:
             self.perspective_cbox.SetMinSize((BUTTON_WIDTH*1.6, -1))
-        wx.EVT_COMBOBOX(self.perspective_cbox,-1, 
+        wx.EVT_COMBOBOX(self.perspective_cbox, -1, 
                         self._on_perspective_selection)
     
@@ -303,9 +299,4 @@
         self.bt_freeze.SetToolTipString(freeze_tip)
         wx.EVT_BUTTON(self, self.bt_freeze.GetId(), self.on_freeze)
-        #hide plot
-        #self.bt_close_plot = wx.Button(self, wx.NewId(), "Delete Plot", 
-        #                           size=(BUTTON_WIDTH, -1))
-        #self.bt_close_plot.SetToolTipString("Delete the plot panel on focus")
-        #wx.EVT_BUTTON(self, self.bt_close_plot.GetId(), self.on_close_plot)
        
         if sys.platform == 'darwin' and build_options.WXPORT == 'osx_cocoa':
@@ -315,5 +306,4 @@
             self.cb_plotpanel = wx.ComboBox(self, -1, 
                                             style=wx.CB_READONLY|wx.CB_SORT)
-        #self.cb_plotpanel.SetMinSize((BUTTON_WIDTH*2, -1))
         wx.EVT_COMBOBOX(self.cb_plotpanel,-1, self._on_plot_selection)
         self.cb_plotpanel.Disable()
@@ -349,4 +339,5 @@
     def layout_batch(self):
         """
+            Set up batch mode options
         """
         self.rb_single_mode = wx.RadioButton(self, -1, 'Single Mode',
@@ -360,10 +351,11 @@
         self.rb_single_mode.SetValue(not self.parent.batch_on)
         self.rb_batch_mode.SetValue(self.parent.batch_on)
-        self.sizer4.AddMany([(self.rb_single_mode,0, wx.ALL, 4),
-                             (self.rb_batch_mode,0, wx.ALL, 4)])
+        self.sizer4.AddMany([(self.rb_single_mode, 0, wx.ALL, 4),
+                             (self.rb_batch_mode, 0, wx.ALL, 4)])
         
     def on_single_mode(self, event):
         """
-        change guiframe to its single mode
+            Change to single mode
+            :param event: UI event
         """
         if self.parent is not None:
@@ -373,13 +365,15 @@
     def on_batch_mode(self, event):
         """
-        change guiframe to its batch mode
+            Change to batch mode
+            :param event: UI event
         """
         if self.parent is not None:
-                wx.PostEvent(self.parent, 
-                             NewBatchEvent(enable=True))
+            wx.PostEvent(self.parent, 
+                         NewBatchEvent(enable=True))
     
     def _get_data_selection(self, event):  
         """
-        Get data selection from the right click
+            Get data selection from the right click
+            :param event: UI event
         """
         data = None
@@ -404,5 +398,4 @@
         panel = MaskDialog(parent=self.parent, base=self, 
                            data=data, id=wx.NewId())
-        #self.panel.Bind(wx.EVT_CLOSE, self._draw_masked_model)
         panel.ShowModal()
     
