Index: fittingview/src/sans/perspectives/fitting/fitpage.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/fitpage.py	(revision 7415cbee5e04e669e68308a36a47dc1c577fd68a)
+++ fittingview/src/sans/perspectives/fitting/fitpage.py	(revision 14cd6b92c3299513b031e0c74310cbd0706f58af)
@@ -1,4 +1,6 @@
-
-
+"""
+    FitPanel class contains fields allowing to display results when
+    fitting  a model and one data
+"""
 import sys
 import wx
@@ -8,6 +10,4 @@
 import math
 import time
-from sans.models.dispersion_models import ArrayDispersion, GaussianDispersion
-#from sans.dataloader.data_info import Data1D
 from sans.guiframe.events import StatusEvent 
 from sans.guiframe.events import NewPlotEvent  
@@ -22,5 +22,4 @@
 SMEAR_SIZE_H = 0.00
 
-import basepage
 from basepage import BasicPage
 from basepage import PageInfoEvent
@@ -36,5 +35,5 @@
     """
     
-    def __init__(self,parent, color='rand'):
+    def __init__(self, parent, color='rand'):
         """ 
         Initialization of the Panel
@@ -93,7 +92,7 @@
         sizer_data.Add(wx.StaticText(self, -1, 'Name : '))
         sizer_data.Add(self.dataSource)
-        sizer_data.Add( (0,5) )
-        boxsizer1.Add(sizer_data,0, wx.ALL, 10)
-        self.sizer0.Add(boxsizer1,0, wx.EXPAND | wx.ALL, 10)
+        sizer_data.Add( (0, 5) )
+        boxsizer1.Add(sizer_data, 0, wx.ALL, 10)
+        self.sizer0.Add(boxsizer1, 0, wx.EXPAND | wx.ALL, 10)
         self.sizer0.Layout()
         
@@ -218,5 +217,5 @@
         
         #Sizers
-        box_description_range = wx.StaticBox(self, -1,str(title))
+        box_description_range = wx.StaticBox(self, -1, str(title))
         box_description_range.SetForegroundColour(wx.BLUE)
         boxsizer_range = wx.StaticBoxSizer(box_description_range, wx.VERTICAL)      
@@ -251,12 +250,12 @@
         self.dI_didata.SetValue(True)
         # add 4 types of weighting to the sizer
-        sizer_weighting.Add( self.dI_noweight,0, wx.LEFT, 10)
-        sizer_weighting.Add((14,10))
+        sizer_weighting.Add( self.dI_noweight, 0, wx.LEFT, 10)
+        sizer_weighting.Add((14, 10))
         sizer_weighting.Add( self.dI_didata)
-        sizer_weighting.Add((14,10))
+        sizer_weighting.Add((14, 10))
         sizer_weighting.Add( self.dI_sqrdata) 
-        sizer_weighting.Add((14,10))
+        sizer_weighting.Add((14, 10))
         sizer_weighting.Add( self.dI_idata) 
-        sizer_weighting.Add((10,10))  
+        sizer_weighting.Add((10, 10))  
         self.dI_noweight.Enable(False)
         self.dI_didata.Enable(False)
@@ -268,5 +267,5 @@
         
         # combobox for smear2d accuracy selection
-        self.smear_accuracy = wx.ComboBox(self, -1,size=(50,-1),
+        self.smear_accuracy = wx.ComboBox(self, -1, size=(50, -1),
                                           style=wx.CB_READONLY)
         self._set_accuracy_list()
@@ -279,7 +278,7 @@
 
         #Fit button
-        self.btFit = wx.Button(self,wx.NewId(),'Fit', size=(88,25))
+        self.btFit = wx.Button(self, wx.NewId(),'Fit', size=(88, 25))
         self.default_bt_colour =  self.btFit.GetDefaultAttributes()
-        self.btFit.Bind(wx.EVT_BUTTON, self._onFit,id= self.btFit.GetId())
+        self.btFit.Bind(wx.EVT_BUTTON, self._onFit, id= self.btFit.GetId())
         self.btFit.SetToolTipString("Start fitting.")
         
@@ -300,8 +299,8 @@
         ## smear
         self.smear_data_left= BGTextCtrl(self, -1, 
-                                        size=(_BOX_WIDTH-25,20), style=0)
+                                        size=(_BOX_WIDTH-25, 20), style=0)
         self.smear_data_left.SetValue(str(self.dq_l))
         self.smear_data_right = BGTextCtrl(self, -1, 
-                                        size=(_BOX_WIDTH-25,20), style=0)
+                                        size=(_BOX_WIDTH-25, 20), style=0)
         self.smear_data_right.SetValue(str(self.dq_r))
 
@@ -337,17 +336,17 @@
         
         # add 4 types of smearing to the sizer
-        sizer_smearer.Add( self.disable_smearer,0, wx.LEFT, 10)
-        sizer_smearer.Add((10,10))
+        sizer_smearer.Add( self.disable_smearer, 0, wx.LEFT, 10)
+        sizer_smearer.Add((10, 10))
         sizer_smearer.Add( self.enable_smearer)
-        sizer_smearer.Add((10,10))
+        sizer_smearer.Add((10, 10))
         sizer_smearer.Add( self.pinhole_smearer ) 
-        sizer_smearer.Add((10,10))
+        sizer_smearer.Add((10, 10))
         sizer_smearer.Add( self.slit_smearer ) 
-        sizer_smearer.Add((10,10))       
+        sizer_smearer.Add((10, 10))       
         
         # StaticText for chi2, N(for fitting), Npts
-        self.tcChi    =  BGTextCtrl(self, -1, "-", size=(75,20), style=0)
+        self.tcChi    =  BGTextCtrl(self, -1, "-", size=(75, 20), style=0)
         self.tcChi.SetToolTipString("Chi2/Npts(Fit)")
-        self.Npts_fit    =  BGTextCtrl(self, -1, "-", size=(75,20), style=0)
+        self.Npts_fit    =  BGTextCtrl(self, -1, "-", size=(75, 20), style=0)
         self.Npts_fit.SetToolTipString(\
                             " Npts : number of points selected for fitting")
@@ -361,12 +360,12 @@
         
         # Update and Draw button
-        self.draw_button = wx.Button(self,wx.NewId(),'Compute', size=(88,24))
+        self.draw_button = wx.Button(self,wx.NewId(), 'Compute', size=(88,24))
         self.draw_button.Bind(wx.EVT_BUTTON, \
-                              self._onDraw,id= self.draw_button.GetId())
+                              self._onDraw,id = self.draw_button.GetId())
         self.draw_button.SetToolTipString("Compute and Draw.")
         
-        box_description_1= wx.StaticText(self, -1,'   Chi2/Npts')
-        box_description_2= wx.StaticText(self, -1,'Npts(Fit)')
-        box_description_3= wx.StaticText(self, -1,'Total Npts')
+        box_description_1= wx.StaticText(self, -1, '   Chi2/Npts')
+        box_description_2= wx.StaticText(self, -1, 'Npts(Fit)')
+        box_description_3= wx.StaticText(self, -1, 'Total Npts')
         box_description_3.SetToolTipString( \
                                 " Total Npts : total number of data points")
@@ -374,12 +373,12 @@
         
         
-        sizer_fit.Add(box_description_1,0,0)
-        sizer_fit.Add(box_description_2,0,0)
-        sizer_fit.Add(box_description_3,0,0)       
-        sizer_fit.Add(self.draw_button,0,0)
-        sizer_fit.Add(self.tcChi,0,0)
-        sizer_fit.Add(self.Npts_fit ,0,0)
-        sizer_fit.Add(self.Npts_total,0,0)
-        sizer_fit.Add(self.btFit,0,0) 
+        sizer_fit.Add(box_description_1, 0, 0)
+        sizer_fit.Add(box_description_2, 0, 0)
+        sizer_fit.Add(box_description_3, 0, 0)       
+        sizer_fit.Add(self.draw_button, 0, 0)
+        sizer_fit.Add(self.tcChi, 0, 0)
+        sizer_fit.Add(self.Npts_fit, 0, 0)
+        sizer_fit.Add(self.Npts_total, 0, 0)
+        sizer_fit.Add(self.btFit, 0, 0) 
 
         # StaticText for smear
@@ -1192,5 +1191,5 @@
         else:
             msg = "FitPage: fit button has unknown label"
-            raise ValuerError, msg
+            raise RuntimeError, msg
         self._manager._reset_schedule_problem(value=0)
           
