Index: theoryview/perspectives/theory/basepage.py
===================================================================
--- theoryview/perspectives/theory/basepage.py	(revision e071b1c606176d61776b71469db1ade3eb45caa8)
+++ theoryview/perspectives/theory/basepage.py	(revision 74755ffa1ce766f8db2e7443abc981f716782e5c)
@@ -30,5 +30,6 @@
 class BasicPage(wx.ScrolledWindow):
     """
-        This class provide general structure of  fitpanel page
+    This class provide general structure of  fitpanel page
+    
     """
      ## Internal name for the AUI manager
@@ -154,12 +155,13 @@
     class ModelTextCtrl(wx.TextCtrl):
         """
-            Text control for model and fit parameters.
-            Binds the appropriate events for user interactions.
-            Default callback methods can be overwritten on initialization
-            
-            @param kill_focus_callback: callback method for EVT_KILL_FOCUS event
-            @param set_focus_callback:  callback method for EVT_SET_FOCUS event
-            @param mouse_up_callback:   callback method for EVT_LEFT_UP event
-            @param text_enter_callback: callback method for EVT_TEXT_ENTER event
+        Text control for model and fit parameters.
+        Binds the appropriate events for user interactions.
+        Default callback methods can be overwritten on initialization
+        
+        :param kill_focus_callback: callback method for EVT_KILL_FOCUS event
+        :param set_focus_callback:  callback method for EVT_SET_FOCUS event
+        :param mouse_up_callback:   callback method for EVT_LEFT_UP event
+        :param text_enter_callback: callback method for EVT_TEXT_ENTER event
+        
         """
         ## Set to True when the mouse is clicked while the whole string is selected
@@ -189,7 +191,8 @@
         def _on_set_focus(self, event):
             """
-                Catch when the text control is set in focus to highlight the whole
-                text if necessary
-                @param event: mouse event
+            Catch when the text control is set in focus to highlight the whole
+            text if necessary
+            
+            :param event: mouse event
             """
             
@@ -202,6 +205,8 @@
         def _highlight_text(self, event):
             """
-                Highlight text of a TextCtrl only of no text has be selected
-                @param event: mouse event
+            Highlight text of a TextCtrl only of no text has be selected
+            
+            :param event: mouse event
+            
             """
             # Make sure the mouse event is available to other listeners
@@ -218,39 +223,33 @@
                         control.SetSelection(-1,-1)
                  
-       
     def onContextMenu(self, event): 
         """
-            Retrieve the state selected state
-        """
-        # Skipping the save state functionality for release 0.9.0
-        #return
-    
+        Retrieve the state selected state
+        
+        """
         pos = event.GetPosition()
         pos = self.ScreenToClient(pos)
-       
         self.PopupMenu(self.popUpMenu, pos) 
       
-        
     def onUndo(self, event):
         """
-            Cancel the previous action
-        """
-        #print "enable undo"
+        Cancel the previous action
+        
+        """
         event = PreviousStateEvent(page = self)
         wx.PostEvent(self.parent, event)
-        
-        
+    
     def onRedo(self, event):
         """
-            Restore the previous action cancelled 
-        """
-        #print "enable redo"
+        Restore the previous action canceled 
+        
+        """
         event = NextStateEvent(page= self)
         wx.PostEvent(self.parent, event)
-        
-        
+    
     def define_page_structure(self):
         """
-            Create empty sizer for a panel
+        Create empty sizer for a panel
+        
         """
         self.vbox  = wx.BoxSizer(wx.VERTICAL)
@@ -282,24 +281,24 @@
     def set_layout(self):
         """
-             layout
+         layout
+         
         """
         self.vbox.Layout()
         self.vbox.Fit(self) 
         self.SetSizer(self.vbox)
-       
         self.set_scroll()
         self.Centre()
         
-        
     def set_scroll(self):
+        """
+        """
         self.SetScrollbars(20,20,25,65)
         self.Layout()   
         self.SetAutoLayout(True)
          
-         
-    def set_owner(self,owner):
+    def set_owner(self, owner):
         """ 
-            set owner of fitpage
-            @param owner: the class responsible of plotting
+        set owner of fitpage
+        @param owner: the class responsible of plotting
         """
         self.event_owner = owner    
@@ -308,6 +307,7 @@
     def set_manager(self, manager):
         """
-             set panel manager
-             @param manager: instance of plugin fitting
+        set panel manager
+        
+        :param manager: instance of plugin fitting
         """
         self.manager = manager  
@@ -316,18 +316,19 @@
     def populate_box(self, dict):
         """
-             Store list of model
-             @param dict: dictionary containing list of models
+        Store list of model
+        
+        :param dict: dictionary containing list of models
+        
         """
         self.model_list_box = dict
         self.state.model_list_box = self.model_list_box
             
-    
-        
     def set_dispers_sizer(self):
         """
-            fill sizer containing dispersity info
+        fill sizer containing dispersity info
+        
         """
         self.sizer4.Clear(True)
-        name="Polydispersity and Orientational Distribution"
+        name = "Polydispersity and Orientational Distribution"
         box_description= wx.StaticBox(self, -1,name)
         boxsizer1 = wx.StaticBoxSizer(box_description, wx.VERTICAL)
@@ -336,5 +337,4 @@
         self.enable_disp = wx.RadioButton(self, -1, 'On', (10, 30))
        
-        
         self.Bind(wx.EVT_RADIOBUTTON, self._set_dipers_Param, id=self.disable_disp.GetId())
         self.Bind(wx.EVT_RADIOBUTTON, self._set_dipers_Param, id=self.enable_disp.GetId())
@@ -392,6 +392,7 @@
     def select_disp_angle(self, event): 
         """
-            Event for when a user select a parameter to average over.
-            @param event: radiobutton event
+        Event for when a user select a parameter to average over.
+        
+        :param event: radiobutton event
         """
         self.values=[]
@@ -479,8 +480,8 @@
         wx.PostEvent(self.parent, event)
        
-    
     def onResetModel(self, event):
         """
-            Reset model state
+        Reset model state
+        
         """
         ## post help message for the selected model 
@@ -499,5 +500,6 @@
     def onSave(self, event):
         """
-            save history of the data and model
+        save history of the data and model
+        
         """
         if self.model==None:
@@ -536,7 +538,7 @@
     def onSetFocus(self, evt):
         """
-            highlight the current textcrtl and hide the error text control shown 
-            after fitting
-            :Not implemented.
+        highlight the current textcrtl and hide the error text control shown 
+        after fitting
+        :Not implemented.
         """
         return
@@ -544,6 +546,7 @@
     def read_file(self, path):
         """
-            Read two columns file
-            @param path: the path to the file to read
+        Read two columns file
+        
+        :param path: the path to the file to read
         """
         try:
@@ -575,5 +578,5 @@
     def createMemento(self):
         """
-            return the current state of the page
+        return the current state of the page
         """
         return self.state.clone()
@@ -582,5 +585,6 @@
     def save_current_state(self):
         """
-            Store current state
+        Store current state
+        
         """
         ## save model option
@@ -656,84 +660,12 @@
         self._copy_parameters_state(self.fittable_param, self.state.fittable_param)
         self._copy_parameters_state(self.fixed_param, self.state.fixed_param)
-    
-
-    def save_current_state_fit(self):
-        """
-            Store current state for fit_page
-        """
-        ## save model option
-        if self.model!= None:
-            self.disp_list= self.model.getDispParamList()
-            self.state.disp_list= copy.deepcopy(self.disp_list)
-            self.state.model = self.model.clone()
-        #if hasattr(self,self.engine_type)> 0:
-            #self.state.engine_type = self.engine_type.clone() 
-        self.state.enable2D = copy.deepcopy(self.enable2D)
-        self.state.values= copy.deepcopy(self.values)
-        self.state.weights = copy.deepcopy( self.weights)
-        ## save data    
-        self.state.data= copy.deepcopy(self.data)
-        try:
-            n = self.disp_box.GetCurrentSelection()
-            dispersity= self.disp_box.GetClientData(n)
-            name= dispersity.__name__
-            self.disp_name = name
-            if name == "GaussianDispersion" :
-               if hasattr(self,"cb1"):
-                   self.state.cb1= self.cb1.GetValue()
-
-        except:
-            pass
-        
-        if hasattr(self,"enable_disp"):
-            self.state.enable_disp= self.enable_disp.GetValue()
-            self.state.disable_disp = self.disable_disp.GetValue()
-            
-        self.state.smearer = copy.deepcopy(self.smearer)
-        if hasattr(self,"enable_smearer"):
-            self.state.enable_smearer = copy.deepcopy(self.enable_smearer.GetValue())
-            self.state.disable_smearer = copy.deepcopy(self.disable_smearer.GetValue())
-            
-        if hasattr(self,"disp_box"):
-            self.state.disp_box = self.disp_box.GetCurrentSelection()
-
-            if len(self.disp_cb_dict)>0:
-                for k , v in self.disp_cb_dict.iteritems():
-         
-                    if v ==None :
-                        self.state.disp_cb_dict[k]= v
-                    else:
-                        try:
-                            self.state.disp_cb_dict[k]=v.GetValue()
-                        except:
-                            self.state.disp_cb_dict[k]= None
-           
-            if len(self._disp_obj_dict)>0:
-                for k , v in self._disp_obj_dict.iteritems():
-      
-                    self.state._disp_obj_dict[k]= v
-                        
-            
-            self.state.values = copy.deepcopy(self.values)
-            self.state.weights = copy.deepcopy(self.weights)
-           
-        ## save plotting range
-        self._save_plotting_range()
-        
-        ## save checkbutton state and txtcrtl values
-        self._copy_parameters_state(self.orientation_params,
-                                     self.state.orientation_params)
-        self._copy_parameters_state(self.orientation_params_disp,
-                                     self.state.orientation_params_disp)
-        self._copy_parameters_state(self.parameters, self.state.parameters)
-        self._copy_parameters_state(self.fittable_param, self.state.fittable_param)
-        self._copy_parameters_state(self.fixed_param, self.state.fixed_param)
-    
-               
+  
     def reset_page_helper(self, state):
         """
-            Use page_state and change the state of existing page
-            @precondition: the page is already drawn or created
-            @postcondition: the state of the underlying data change as well as the
+        Use page_state and change the state of existing page
+        
+        :precondition: the page is already drawn or created
+        
+        :postcondition: the state of the underlying data change as well as the
             state of the graphic interface
         """
@@ -765,5 +697,4 @@
         self.structurebox.SetSelection(state.structurecombobox )
         self.formfactorbox.SetSelection(state.formfactorcombobox)
-        
         
         ## enable the view 2d button if this is a modelpage type
@@ -848,5 +779,4 @@
         ## reset context menu items
         self._reset_context_menu()
-    
         ## set the value of the current state to the state given as parameter
         self.state = state.clone() 
@@ -855,5 +785,6 @@
     def _selectDlg(self):
         """
-            open a dialog file to selected the customized dispersity 
+        open a dialog file to selected the customized dispersity 
+        
         """
         import os
@@ -866,8 +797,8 @@
         return path
     
-    
     def _reset_context_menu(self):
         """
-            reset the context menu
+        reset the context menu
+        
         """
         for name, state in self.state.saved_states.iteritems():
@@ -881,5 +812,6 @@
     def _reset_plotting_range(self, state):
         """
-            Reset the plotting range to a given state
+        Reset the plotting range to a given state
+        
         """
         self.qmin.SetValue(str(state.qmin))
@@ -891,5 +823,6 @@
     def _save_typeOfmodel(self):
         """
-            save radiobutton containing the type model that can be selected
+        save radiobutton containing the type model that can be selected
+        
         """
         self.state.shape_rbutton = self.shape_rbutton.GetValue()
@@ -908,5 +841,6 @@
     def _save_plotting_range(self ):
         """
-            save the state of plotting range 
+        save the state of plotting range 
+        
         """
         self.state.qmin = self.qmin_x
@@ -918,7 +852,8 @@
     def _onparamEnter_helper(self):
         """
-             check if values entered by the user are changed and valid to replot 
-             model
-             use : _check_value_enter 
+        check if values entered by the user are changed and valid to replot 
+        model
+        use : _check_value_enter 
+        
         """
         # Flag to register when a parameter has changed.      
@@ -969,5 +904,6 @@
     def _is_modified(self, is_modified):
         """
-            return to self._is_modified
+        return to self._is_modified
+        
         """
         return is_modified
@@ -975,5 +911,6 @@
     def _reset_parameters_state(self, listtorestore,statelist):
         """
-            Reset the parameters at the given state
+        Reset the parameters at the given state
+        
         """
         if len(statelist)==0 or  len(listtorestore)==0 :
@@ -1020,11 +957,12 @@
                 else:
                     item_page[6].Hide()
-                            
-                            
+                                  
     def _copy_parameters_state(self, listtocopy, statelist):
         """
-            copy the state of button 
-            @param listtocopy: the list of check button to copy
-            @param statelist: list of state object to store the current state
+        copy the state of button 
+        
+        :param listtocopy: the list of widgets 's state to copy
+        :param statelist: container for the state of widgets that must be copied
+        
         """
         if len(listtocopy)==0:
@@ -1068,9 +1006,8 @@
                                 [min_state,min_value],[max_state , max_value],unit])
            
-        
-   
     def _set_model_sizer_selection(self, model):
         """
-            Display the sizer according to the type of the current model
+        Display the sizer according to the type of the current model
+        
         """
         if model ==None:
@@ -1181,12 +1118,12 @@
                     break
     
-    
     def _draw_model(self):
         """
-            Method to draw or refresh a plotted model.
-            The method will use the data member from the model page
-            to build a call to the fitting perspective manager.
-            
-            [Note to coder: This way future changes will be done in only one place.] 
+        Method to draw or refresh a plotted model.
+        The method will use the data member from the model page
+        to build a call to the fitting perspective manager.
+        
+        :Note to coder: This way future changes will be done in only one place.
+         
         """
         if self.model !=None:
@@ -1203,8 +1140,8 @@
                                     enable2D=self.enable2D) 
         
-        
     def _set_model_sizer(self,sizer, box_sizer, title="", object=None):
         """
-            Use lists to fill a sizer for model info
+        Use lists to fill a sizer for model info
+        
         """
        
@@ -1304,5 +1241,6 @@
     def _show_combox(self, event):
         """
-            Show combox box associate with type of model selected
+        Show combox box associate with type of model selected
+        
         """
         ## Don't want to populate combo box again if the event comes from check box
@@ -1352,6 +1290,7 @@
     def _populate_box(self, combobox, list):
         """
-            fill combox box with dict item
-            @param list: contains item to fill the combox
+        fill combox box with dict item
+        
+        :param list: contains item to fill the combox
             item must model class
         """
@@ -1368,5 +1307,6 @@
     def _onparamEnter(self,event):
         """ 
-            when enter value on panel redraw model according to changed
+        when enter value on panel redraw model according to changed
+        
         """
         tcrtl= event.GetEventObject()
@@ -1395,5 +1335,6 @@
     def _onQrangeEnter(self, event):
         """
-            Check validity of value enter in the Q range field
+        Check validity of value enter in the Q range field
+        
         """
         
@@ -1454,5 +1395,6 @@
     def _on_select_model_helper(self): 
         """
-             call back for model selection
+        call back for model selection
+        
         """
         ## reset dictionary containing reference to dispersion
@@ -1501,10 +1443,12 @@
     def _validate_qrange(self, qmin_ctrl, qmax_ctrl):
         """
-            Verify that the Q range controls have valid values
-            and that Qmin < Qmax.
-            
-            @param qmin_ctrl: text control for Qmin
-            @param qmax_ctrl: text control for Qmax
-            @return: True is the Q range is value, False otherwise 
+        Verify that the Q range controls have valid values
+        and that Qmin < Qmax.
+        
+        :param qmin_ctrl: text control for Qmin
+        :param qmax_ctrl: text control for Qmax
+        
+        :return: True is the Q range is value, False otherwise 
+        
         """
         qmin_validity = check_float(qmin_ctrl)
@@ -1533,7 +1477,9 @@
     def _check_value_enter(self, list, modified):
         """
-            @param list: model parameter and panel info
-            each item of the list should be as follow:
-            item=[cb state, name, value, "+/-", error of fit, min, max , units]
+        :param list: model parameter and panel info
+        each item of the list should be as follow: ::
+        
+         item = [cb state, name, value, "+/-", error of fit, min, max , units]
+         
         """  
         is_modified =  modified
@@ -1560,13 +1506,13 @@
                 
         return is_modified 
-        
- 
+    
     def _set_dipers_Param(self, event):
         """
-            respond to self.enable_disp and self.disable_disp radio box.
-            The dispersity object is reset inside the model into Gaussian. 
-            When the user select yes , this method display a combo box for more selection
-            when the user selects No,the combo box disappears.
-            Redraw the model with the default dispersity (Gaussian)
+        respond to self.enable_disp and self.disable_disp radio box.
+        The dispersity object is reset inside the model into Gaussian. 
+        When the user select yes , this method display a combo box for more selection
+        when the user selects No,the combo box disappears.
+        Redraw the model with the default dispersity (Gaussian)
+        
         """
         
@@ -1613,5 +1559,6 @@
     def _layout_sizer_noDipers(self):
         """
-            Draw a sizer with no dispersity info
+        Draw a sizer with no dispersity info
+        
         """
         ix=0
@@ -1633,5 +1580,6 @@
     def _reset_dispersity(self):
         """
-             put gaussian dispersity into current model
+         put gaussian dispersity into current model
+         
         """
         if len(self.param_toFit)>0:
@@ -1678,6 +1626,7 @@
     def _on_select_Disp(self,event):
         """
-             allow selecting different dispersion
-             self.disp_list should change type later .now only gaussian
+        allow selecting different dispersion
+        self.disp_list should change type later .now only gaussian
+        
         """
         n = self.disp_box.GetCurrentSelection()
@@ -1704,5 +1653,6 @@
     def _set_sizer_arraydispersion(self):
         """
-            draw sizer with array dispersity  parameters
+        draw sizer with array dispersity  parameters
+        
         """
         
@@ -1772,5 +1722,4 @@
         
         ## save checkbutton state and txtcrtl values
-        
         self._copy_parameters_state(self.orientation_params,
                                      self.state.orientation_params)
@@ -1782,17 +1731,13 @@
         self._copy_parameters_state(self.fittable_param, self.state.fittable_param)
         self._copy_parameters_state(self.fixed_param, self.state.fixed_param)
-        
-        
+    
         ## post state to fit panel
         event = PageInfoEvent(page = self)
         wx.PostEvent(self.parent, event)
         
-                
-        
-       
-
     def _set_range_sizer(self, title, box_sizer=None, object1=None,object=None):
         """
-            Fill the Q range sizer
+        Fill the Q range sizer
+        
         """
         self.sizer5.Clear(True)
@@ -1847,8 +1792,8 @@
         self.sizer5.Layout()
 
-    
     def _fill_save_sizer(self):
         """
-            Draw the layout for saving option
+        Draw the layout for saving option
+        
         """
         # Skipping save state functionality for release 0.9.0
@@ -1877,6 +1822,9 @@
     def _lay_out(self):
         """
-            returns self.Layout
-            Note: Mac seems to like this better when self.Layout is called after fitting.
+        returns self.Layout
+        
+        :Note: Mac seems to like this better when self.Layout 
+            is called after fitting.
+            
         """
         self._sleep4sec()
@@ -1887,6 +1835,9 @@
     def _sleep4sec(self):
         """
-            sleep for 1 sec only applied on Mac
-            Note: This 1sec helps for Mac not to crash on self.:ayout after self._draw_model
+        sleep for 1 sec only applied on Mac
+        
+        :Note: This 1sec helps for Mac not to crash on 
+            self.layout after self._draw_model
+            
         """
         if ON_MAC == True:
@@ -1895,5 +1846,6 @@
     def on_reset_clicked(self,event):
         """
-        #On 'Reset' button  for Q range clicked
+        On 'Reset' button  for Q range clicked
+        
         """
         ##For 3 different cases: Data2D, Data1D, and theory
@@ -1913,5 +1865,4 @@
             self.state.npts = self.num_points
             
-
         self.state.qmin = self.qmin_x
         self.state.qmax = self.qmax_x
@@ -1921,4 +1872,2 @@
         #Re draw plot
         self._draw_model()
-
-  
Index: theoryview/perspectives/theory/help_panel.py
===================================================================
--- theoryview/perspectives/theory/help_panel.py	(revision 82789f170e784aff2fb123322b53e72a4316760d)
+++ theoryview/perspectives/theory/help_panel.py	(revision 74755ffa1ce766f8db2e7443abc981f716782e5c)
@@ -4,58 +4,5 @@
 from wx.lib.splitter import MultiSplitterWindow
 import os
-def help():
-    """
-        Provide general online help text
-        Future work: extend this function to allow topic selection
-    """
-    info_txt  = "The inversion approach is based on Moore, J. Appl. Cryst. (1980) 13, 168-175.\n\n"
-    info_txt += "P(r) is set to be equal to an expansion of base functions of the type "
-    info_txt += "phi_n(r) = 2*r*sin(pi*n*r/D_max). The coefficient of each base functions "
-    info_txt += "in the expansion is found by performing a least square fit with the "
-    info_txt += "following fit function:\n\n"
-    info_txt += "chi**2 = sum_i[ I_meas(q_i) - I_th(q_i) ]**2/error**2 + Reg_term\n\n"
-    info_txt += "where I_meas(q) is the measured scattering intensity and I_th(q) is "
-    info_txt += "the prediction from the Fourier transform of the P(r) expansion. "
-    info_txt += "The Reg_term term is a regularization term set to the second derivative "
-    info_txt += "d**2P(r)/dr**2 integrated over r. It is used to produce a smooth P(r) output.\n\n"
-    info_txt += "The following are user inputs:\n\n"
-    info_txt += "   - Number of terms: the number of base functions in the P(r) expansion.\n\n"
-    info_txt += "   - Regularization constant: a multiplicative constant to set the size of "
-    info_txt += "the regularization term.\n\n"
-    info_txt += "   - Maximum distance: the maximum distance between any two points in the system.\n"
-     
-    return info_txt
-    
-class HelpDialog(wx.Dialog):
-    def __init__(self, parent, id):
-      
-        wx.Dialog.__init__(self, parent, id, size=(400, 420))
-        self.SetTitle("P(r) help") 
-        
 
-        vbox = wx.BoxSizer(wx.VERTICAL)
-
-        explanation = help()
-           
-        label_explain = wx.StaticText(self, -1, explanation, size=(350,320))
-            
-        vbox.Add(label_explain, 0, wx.ALL|wx.EXPAND, 15)
-
-
-        static_line = wx.StaticLine(self, -1)
-        vbox.Add(static_line, 0, wx.EXPAND, 0)
-        
-        button_OK = wx.Button(self, wx.ID_OK, "OK")
-
-        sizer_button = wx.BoxSizer(wx.HORIZONTAL)
-        sizer_button.Add((20, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        sizer_button.Add(button_OK, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)       
-        vbox.Add(sizer_button, 0, wx.EXPAND|wx.BOTTOM|wx.TOP, 10)
-
-        self.SetSizer(vbox)
-        self.SetAutoLayout(True)
-        
-        self.Layout()
-        self.Centre()
 
 class HelpWindow(wx.Frame):
@@ -63,5 +10,6 @@
         wx.Frame.__init__(self, parent, id, title, size=(850, 500))
         """
-             contains help info
+        Windows containing html documentation for theory application
+        
         """
       
@@ -135,5 +83,6 @@
     def OnButtonClicked(self, event):
         """
-            Function to diplay html page related to the hyperlinktext selected
+        Function to diplay html page related to the hyperlinktext selected
+        
         """
         self.rhelp.LoadPage("media/modelfunction.html")
@@ -141,8 +90,10 @@
     def OnLinkClicked(self, event):
         """
-            Function to diplay html page related to the hyperlinktext selected
+        Function to diplay html page related to the hyperlinktext selected
+        
         """
         link= event.GetLinkInfo().GetHref()
         self.rhelp.LoadPage(link)
+
 
 class ViewApp(wx.App):
Index: theoryview/perspectives/theory/model_panel.py
===================================================================
--- theoryview/perspectives/theory/model_panel.py	(revision 1a94c368c91eb002ecfa6293953b1bab337b0db4)
+++ theoryview/perspectives/theory/model_panel.py	(revision 74755ffa1ce766f8db2e7443abc981f716782e5c)
@@ -18,7 +18,8 @@
 class ModelPanel(BasicPage):
     """
-        FitPanel class contains fields allowing to display results when
-        fitting  a model and one data
-        @note: For Fit to be performed the user should check at least 
+    FitPanel class contains fields allowing to display results when
+    fitting  a model and one data
+    
+    :note: For Fit to be performed the user should check at least 
         one parameter on fit Panel window.
     """
@@ -32,5 +33,5 @@
         BasicPage.__init__(self, parent, page_info , model_list_box)
         """ 
-            Initialization of the Panel
+        Initialization of the Panel
         """
         self._fill_model_sizer( self.sizer1)  
@@ -48,6 +49,8 @@
     def _on_display_description(self, event):
         """
-            Show or Hide description
-            @param event: wx.EVT_RADIOBUTTON
+        Show or Hide description
+        
+        :param event: wx.EVT_RADIOBUTTON
+        
         """
         self._on_display_description_helper()
@@ -58,6 +61,8 @@
     def _on_display_description_helper(self):
         """
-            Show or Hide description
-            @param event: wx.EVT_RADIOBUTTON
+        Show or Hide description
+        
+        :param event: wx.EVT_RADIOBUTTON
+        
         """
         ## Show description
@@ -79,6 +84,7 @@
     def _fill_range_sizer(self):
         """
-            Fill the sizer containing the plotting range
-            add  access to npts
+        Fill the sizer containing the plotting range
+        add  access to npts
+        
         """
         ##The following 3 lines are for Mac. Let JHC know before modifying..
@@ -100,5 +106,6 @@
     def _on_select_model(self, event): 
         """
-             call back for model selection
+        call back for model selection
+        
         """    
         self._on_select_model_helper() 
@@ -110,5 +117,6 @@
     def _fill_model_sizer(self, sizer):
         """
-            fill sizer containing model info
+        fill sizer containing model info
+        
         """
         ##The following 3 lines are for Mac. Let JHC know before modifying..
@@ -129,5 +137,6 @@
     def _set_sizer_dispersion(self, dispersity):
         """
-            draw sizer with gaussian, log or schulz dispersity parameters
+        draw sizer with gaussian, log or schulz dispersity parameters
+        
         """
         self.fittable_param=[]
@@ -308,5 +317,6 @@
     def _onModel2D(self, event):
         """
-         call manager to plot model in 2D
+        call manager to plot model in 2D
+        
         """
         # If the 2D display is not currently enabled, plot the model in 2D 
@@ -356,5 +366,6 @@
     def reset_page(self, state):
         """
-            reset the state
+        reset the state
+        
         """
         self.reset_page_helper(state)
@@ -363,6 +374,8 @@
     def select_model(self, model):
         """
-            Select a new model
-            @param model: model object 
+        Select a new model
+        
+        :param model: model object 
+        
         """
         self.model = model
@@ -390,7 +403,9 @@
     def set_model_description(self,description,sizer):
         """
-            fill a sizer with description
-            @param description: of type string
-            @param sizer: wx.BoxSizer()
+        fill a sizer with description
+        
+        :param description: of type string
+        :param sizer: wx.BoxSizer()
+        
         """
     
@@ -442,5 +457,5 @@
     def on_button_clicked(self,event):
         """
-        #On 'More details' button
+        On 'More details' button
         """
         from help_panel import  HelpWindow
@@ -459,12 +474,12 @@
            wx.PostEvent(self.parent, StatusEvent(status = msg ))
                      
-            
-            
     def set_range(self, qmin_x, qmax_x, npts):
         """
-            Set the range for the plotted models
-            @param qmin: minimum Q
-            @param qmax: maximum Q
-            @param npts: number of Q bins
+        Set the range for the plotted models
+        
+        :param qmin: minimum Q
+        :param qmax: maximum Q
+        :param npts: number of Q bins
+        
         """
         # Set the data members
@@ -472,17 +487,16 @@
         self.qmax_x = qmax_x
         self.num_points = npts
-        
         # Set the controls
         #For qmin and qmax, do not use format_number.(If do, qmin and max could be different from what is in the data.)
-       
         self.qmin.SetValue(str(self.qmin_x))
         self.qmax.SetValue(str(self.qmax_x))
         self.npts.SetValue(format_number(self.num_points))
         
-        
     def set_model_param_sizer(self, model):
         """
-            Build the panel from the model content
-            @param model: the model selected in combo box for fitting purpose
+        Build the panel from the model content
+        
+        :param model: the model selected in combo box for fitting purpose
+        
         """
         self.sizer3.Clear(True)
Index: theoryview/perspectives/theory/model_thread.py
===================================================================
--- theoryview/perspectives/theory/model_thread.py	(revision 64017a8c94a1fcc7b7f6c7799d54bc7ff750e6e5)
+++ theoryview/perspectives/theory/model_thread.py	(revision 74755ffa1ce766f8db2e7443abc981f716782e5c)
@@ -6,8 +6,9 @@
 class Calc2D(CalcThread):
     """
-        Compute 2D model
-        This calculation assumes a 2-fold symmetry of the model
-        where points are computed for one half of the detector
-        and I(qx, qy) = I(-qx, -qy) is assumed.
+    Compute 2D model
+    This calculation assumes a 2-fold symmetry of the model
+    where points are computed for one half of the detector
+    and I(qx, qy) = I(-qx, -qy) is assumed.
+    
     """
     
@@ -34,5 +35,6 @@
     def compute(self):
         """
-            Compute the data given a model function
+        Compute the data given a model function
+        
         """
         self.starttime = time.time()
@@ -105,9 +107,9 @@
                        qstep = self.qstep )
         
-   
-    
-
 class Calc1D(CalcThread):
-    """Compute 1D data"""
+    """
+    Compute 1D data
+    
+    """
     
     def __init__(self, x, model,
@@ -135,5 +137,6 @@
     def compute(self):
         """
-            Compute model 1d value given qmin , qmax , x value 
+        Compute model 1d value given qmin , qmax , x value 
+        
         """
         
@@ -154,8 +157,9 @@
         self.complete(x= self.x[index], y= output[index], 
                       elapsed=elapsed, model= self.model, data=self.data)
-        
- 
-                
+"""
+Example of use of Calc2D ::
+
 class CalcCommandline:
+    
     def __init__(self, n=20000):
         #print thread.get_ident()
@@ -163,6 +167,4 @@
         
         model = CylinderModel()
-        
-         
         print model.runXY([0.01, 0.02])
         
@@ -173,5 +175,4 @@
         x = numpy.arange(-qmax, qmax+qstep*0.01, qstep)
         y = numpy.arange(-qmax, qmax+qstep*0.01, qstep)
-    
     
         calc_thread_2D = Calc2D(x, y, None, model.clone(),-qmax, qmax,qstep,
@@ -196,2 +197,4 @@
     CalcCommandline()
    
+"""  
+
Index: theoryview/perspectives/theory/models.py
===================================================================
--- theoryview/perspectives/theory/models.py	(revision ce07fa83075c34e079a22b934793691e09a226fe)
+++ theoryview/perspectives/theory/models.py	(revision 74755ffa1ce766f8db2e7443abc981f716782e5c)
@@ -1,9 +1,8 @@
-#TODO: add comments to document this module
-#TODO: clean-up the exception handling.
-
-#TODO: clean-up the FractalAbsModel and PowerLawAbsModel menu items. Those
-#      model definitions do not belong here. They belong with the rest of the
-#      models.
-
+
+"""
+This module collects models from sans.models packages and orders theses models 
+by categories that GUI application understands and uses.
+
+"""
 import wx
 import wx.lib.newevent
@@ -23,4 +22,6 @@
     
 def log(message):
+    """
+    """
     out = open("plugins.log", 'a')
     out.write("%10g:  %s\n" % (time.clock(), message))
@@ -28,4 +29,6 @@
 
 def findModels():
+    """
+    """
     log("looking for models in: %s/plugins" % os.getcwd())
     if os.path.isdir('plugins'):
@@ -35,8 +38,11 @@
 def _check_plugin(model, name):
     """
-        Do some checking before model adding plugins in the list
-        @param model: class model to add into the plugin list
-        @param name:name of the module plugin
-        @return model: model if valid model or None if not valid
+    Do some checking before model adding plugins in the list
+    
+    :param model: class model to add into the plugin list
+    :param name: name of the module plugin
+    
+    :return model: model if valid model or None if not valid
+    
     """
     #Check is the plugin is of type Model1DPlugin
@@ -74,4 +80,6 @@
   
 def _findModels(dir):
+    """
+    """
     # List of plugin objects
     plugins = []
@@ -114,5 +122,6 @@
 class ModelList(object):
     """
-        Contains dictionary of model and their type
+    Contains dictionary of model and their type
+    
     """
     def __init__(self):
@@ -121,6 +130,8 @@
     def set_list(self, name, mylist):
         """
-            @param name: the type of the list
-            @param mylist: the list to add
+        
+        :param name: the type of the list
+        :param mylist: the list to add
+        
         """
         if name not in self.mydict.keys():
@@ -130,9 +141,14 @@
     def get_list(self):
         """
-         return all the list stored in a dictionary object
+        return all the list stored in a dictionary object
         """
         return self.mydict
         
 class ModelManager:
+    """
+    ModelManager collected model classes object of available into a 
+    dictionary of models' names and models' classes.
+    
+    """
     ## external dict for models
     model_combobox = ModelList()
@@ -156,8 +172,9 @@
     def _getModelList(self):
         """
-            List of models we want to make available by default
-            for this application
-        
-            @return: the next free event ID following the new menu events
+        Fill up lists of models available by default
+        for the current application
+    
+        :return: the next free event ID following the new menu events
+        
         """
         ## form factor
@@ -293,5 +310,4 @@
         self.shape_indep_list.append(PorodModel )
         
-        
         #FractalModel (a c-model)will be used.
         #from sans.models.FractalAbsModel import FractalAbsModel
@@ -309,7 +325,9 @@
         return 0
 
-  
     def get_model_list(self):    
-        """ @ return dictionary of models for fitpanel use """
+        """ 
+        :return: dictionary of models for fitpanel use 
+        
+        """
         self._getModelList()
         self.model_combobox.set_list("Shapes", self.shape_list)
@@ -319,10 +337,4 @@
         self.model_combobox.set_list("P(Q)*S(Q)", self.multiplication_factor)
         self.model_combobox.set_list("multiplication", self.multiplication_factor)
-       
         return self.model_combobox
-    
-  
-        
-    
-    
-  
+ 
Index: theoryview/perspectives/theory/pagestate.py
===================================================================
--- theoryview/perspectives/theory/pagestate.py	(revision 0277d084dedd5afcedd8dd067ab01cf0fee53b12)
+++ theoryview/perspectives/theory/pagestate.py	(revision 74755ffa1ce766f8db2e7443abc981f716782e5c)
@@ -5,10 +5,12 @@
 class PageState(object):
     """
-        Contains info to reconstruct a page
+    Contains info to reconstruct a page
+    
     """
     def __init__(self, parent,model=None, data=None):
         
         """ 
-            Initialization of the Panel
+        Initialization of the Panel
+        
         """
         #TODO: remove this once the inheritence is cleaned up
@@ -96,4 +98,6 @@
     
     def clone(self):
+        """
+        """
         model=None
         if self.model !=None:
@@ -154,5 +158,8 @@
       
     def old__repr__(self):
-        """ output string for printing"""
+        """
+        output string for printing
+        
+        """
         rep = "\n\nState name: %s\n"%self.name
         rep +="data : %s\n"% str(self.data)
@@ -198,8 +205,4 @@
             rep += "maximum value : %s \n"%str(item[6][1])
             rep += "parameter unit: %s\n\n"%str(item[7])
-        
         return rep
-
-        
-       
-       
+  
Index: theoryview/perspectives/theory/theory.py
===================================================================
--- theoryview/perspectives/theory/theory.py	(revision 2882fb55a8ff7c6d71006464b88680a023a46381)
+++ theoryview/perspectives/theory/theory.py	(revision 74755ffa1ce766f8db2e7443abc981f716782e5c)
@@ -20,5 +20,6 @@
 class PlotInfo:
     """
-        store some plotting field
+    store some plotting field
+    
     """
     _xunit = 'A^{-1}'
@@ -33,11 +34,13 @@
 class Plugin:
     """
-        This class defines the interface for a Plugin class
-        for calculator perspective
+    This class defines the interface for a Plugin class
+    for calculator perspective
+    
     """
     
     def __init__(self, standalone=True):
         """
-            Abstract class for gui_manager Plugins.
+        Abstract class for gui_manager Plugins.
+        
         """
         ## Plug-in name. It will appear on the application menu.
@@ -61,10 +64,11 @@
     def populate_menu(self, id, owner):
         """
-            Create and return the list of application menu
-            items for the plug-in. 
-            
-            @param id: deprecated. Un-used.
-            @param parent: parent window
-            @return: plug-in menu
+        Create and return the list of application menu
+        items for the plug-in. 
+        
+        :param id: deprecated. Un-used.
+        :param parent: parent window
+        
+        :return: plug-in menu
         """
         return []
@@ -72,13 +76,14 @@
     def get_panels(self, parent):
         """
-            Create and return the list of wx.Panels for your plug-in.
-            Define the plug-in perspective.
-            
-            Panels should inherit from DefaultPanel defined below,
-            or should present the same interface. They must define
-            "window_caption" and "window_name".
-            
-            @param parent: parent window
-            @return: list of panels
+        Create and return the list of wx.Panels for your plug-in.
+        Define the plug-in perspective.
+        
+        Panels should inherit from DefaultPanel defined below,
+        or should present the same interface. They must define
+        "window_caption" and "window_name".
+        
+        :param parent: parent window
+        
+        :return: list of panels
         """
         ## Save a reference to the parent
@@ -88,5 +93,4 @@
                 model_list_box= self.menu_mng.get_model_list().get_list())
         self.model_panel.set_manager(self)
-       
         # If needed, add its name to the perspective list
         self.perspective.append(self.model_panel.window_name)
@@ -97,21 +101,23 @@
     def get_context_menu(self, graph=None):
         """
-            This method is optional.
-        
-            When the context menu of a plot is rendered, the 
-            get_context_menu method will be called to give you a 
-            chance to add a menu item to the context menu.
-            
-            A ref to a Graph object is passed so that you can
-            investigate the plot content and decide whether you
-            need to add items to the context menu.  
-            
-            This method returns a list of menu items.
-            Each item is itself a list defining the text to 
-            appear in the menu, a tool-tip help text, and a
-            call-back method.
-            
-            @param graph: the Graph object to which we attach the context menu
-            @return: a list of menu items with call-back function
+        This method is optional.
+    
+        When the context menu of a plot is rendered, the 
+        get_context_menu method will be called to give you a 
+        chance to add a menu item to the context menu.
+        
+        A ref to a Graph object is passed so that you can
+        investigate the plot content and decide whether you
+        need to add items to the context menu.  
+        
+        This method returns a list of menu items.
+        Each item is itself a list defining the text to 
+        appear in the menu, a tool-tip help text, and a
+        call-back method.
+        
+        :param graph: the Graph object to which we attach the context menu
+        
+        :return: a list of menu items with call-back function
+        
         """
         return []    
@@ -119,5 +125,6 @@
     def get_perspective(self):
         """
-            Get the list of panel names for this perspective
+        Get the list of panel names for this perspective
+        
         """
         return self.perspective
@@ -125,8 +132,10 @@
     def on_perspective(self, event):
         """
-            Call back function for the perspective menu item.
-            We notify the parent window that the perspective
-            has changed.
-            @param event: menu event
+        Call back function for the perspective menu item.
+        We notify the parent window that the perspective
+        has changed.
+        
+        :param event: menu event
+        
         """
         self.parent.set_perspective(self.perspective)
@@ -134,5 +143,6 @@
     def post_init(self):
         """
-            Post initialization call back to close the loose ends
+        Post initialization call back to close the loose ends
+        
         """
         pass
@@ -142,14 +152,15 @@
                    qmin= DEFAULT_QMIN, qmax= DEFAULT_QMAX, qstep= DEFAULT_NPTS):
         """
-             Draw model.
-             @param model: the model to draw
-             @param name: the name of the model to draw
-             @param data: the data on which the model is based to be drawn
-             @param description: model's description
-             @param enable1D: if true enable drawing model 1D
-             @param enable2D: if true enable drawing model 2D
-             @param qmin:  Range's minimum value to draw model
-             @param qmax:  Range's maximum value to draw model
-             @param qstep: number of step to divide the x and y-axis
+        Draw model.
+         
+        :param model: the model to draw
+        :param name: the name of the model to draw
+        :param data: the data on which the model is based to be drawn
+        :param description: model's description
+        :param enable1D: if true enable drawing model 1D
+        :param enable2D: if true enable drawing model 2D
+        :param qmin:  Range's minimum value to draw model
+        :param qmax:  Range's maximum value to draw model
+        :param qstep: number of step to divide the x and y-axis
              
         """
@@ -167,6 +178,8 @@
     def _on_model_panel(self, evt):
         """
-            react to model selection on any combo box or model menu.plot the model  
-            @param evt: wx.combobox event
+        react to model selection on any combo box or model menu.plot the model 
+         
+        :param evt: wx.combobox event
+        
         """
         model = evt.model
@@ -182,11 +195,12 @@
                       qmin=DEFAULT_QMIN, qmax=DEFAULT_QMAX, qstep=DEFAULT_NPTS):
         """
-            draw model in 2D
-            @param model: instance of the model to draw
-            @param enable2D: when True allows to draw model 2D
-            @param qmin: the minimum value to  draw model 2D
-            @param qmax: the maximum value to draw model 2D
-            @param qstep: the number of division of Qx and Qy of the model to draw
-            
+        draw model in 2D
+        
+        :param model: instance of the model to draw
+        :param enable2D: when True allows to draw model 2D
+        :param qmin: the minimum value to  draw model 2D
+        :param qmax: the maximum value to draw model 2D
+        :param qstep: the number of division of Qx and Qy of the model to draw
+        
         """
         x=  numpy.linspace(start= -1*qmax,
@@ -236,7 +250,9 @@
                 enable1D= True):
         """
-            Draw model 1D from loaded data1D
-            @param data: loaded data
-            @param model: the model to plot
+        Draw model 1D from loaded data1D
+        
+        :param data: loaded data
+        :param model: the model to plot
+        
         """
         x=  numpy.linspace(start= qmin,
@@ -281,5 +297,6 @@
     def _update1D(self,x, output):
         """
-            Update the output of plotting model 1D
+        Update the output of plotting model 1D
+        
         """
         wx.PostEvent(self.parent, StatusEvent(status="Plot \
@@ -287,10 +304,11 @@
         self.ready_fit()
         #self.calc_thread.ready(0.01)
-    
-    
+
     def _fill_default_model2D(self, theory, qmax,qstep, qmin=None):
         """
-            fill Data2D with default value 
-            @param theory: Data2D to fill
+        fill Data2D with default value 
+        
+        :param theory: Data2D to fill
+        
         """
         from DataLoader.data_info import Detector, Source
@@ -369,12 +387,12 @@
         theory.ymin= ymin
         theory.ymax= ymax 
-        theory.group_id ="Model"
-        theory.id ="Model"
-        
+        theory.group_id = "Model"
+        theory.id = "Model"
         
     def _get_plotting_info(self, data=None):
         """
-            get plotting info from data if data !=None
-            else use some default
+        get plotting info from data if data !=None
+        else use some default
+        
         """
         my_info = PlotInfo()
@@ -397,8 +415,8 @@
         return my_info
                 
-                
     def _complete1D(self, x,y, elapsed,model,data=None):
         """
-            Complete plotting 1D data
+        Complete plotting 1D data
+        
         """ 
        
@@ -435,9 +453,8 @@
             return  
                   
-    
-        
     def _update2D(self, output,time=None):
         """
-            Update the output of plotting model
+        Update the output of plotting model
+        
         """
         wx.PostEvent(self.parent, StatusEvent(status="Plot \
@@ -446,9 +463,9 @@
         #self.calc_thread.ready(0.01)
         
-        
     def _complete2D(self, image,data, model,  elapsed,qmin, qmax,qstep=DEFAULT_NPTS):
         """
-            Complete get the result of modelthread and create model 2D
-            that can be plot.
+        Complete get the result of modelthread and create model 2D
+        that can be plot.
+        
         """
         err_image = numpy.zeros(numpy.shape(image))
@@ -484,4 +501,3 @@
         msg = "Plot 2D complete !"
         wx.PostEvent( self.parent, StatusEvent( status= msg , type="stop" ))
-         
-            
+     
