Index: fittingview/src/sans/perspectives/fitting/models.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/models.py	(revision 61184df27f4701c4da06ddab23d962c2c0767480)
+++ fittingview/src/sans/perspectives/fitting/models.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -484,5 +484,4 @@
         self.model_name_list.append(DebyeModel.__name__)
         
-        #FractalModel (a c-model)is now being used instead of FractalAbsModel.
         from sans.models.FractalModel import FractalModel
         self.shape_indep_list.append(FractalModel )
Index: sansmodels/src/sans/models/BEPolyelectrolyte.py
===================================================================
--- sansmodels/src/sans/models/BEPolyelectrolyte.py	(revision 27972c1dfdd57a50946a99914051e1713c997e78)
+++ sansmodels/src/sans/models/BEPolyelectrolyte.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -1,8 +1,6 @@
-#!/usr/bin/env python
-""" 
-    
-    Provide F(x) = K*1/(4*pi*Lb*(alpha)^(2))*(q^(2)+k2)/(1+(r02)^(2))*(q^(2)+k2)\
+"""    
+ Provide F(x) = K*1/(4*pi*Lb*(alpha)^(2))*(q^(2)+k2)/(1+(r02)^(2))*(q^(2)+k2)\
                        *(q^(2)-(12*h*C/b^(2)))
-    BEPolyelectrolyte as a BaseComponent model
+ BEPolyelectrolyte as a BaseComponent model
 """
 
@@ -11,5 +9,4 @@
 
 class BEPolyelectrolyte(BaseComponent):
-   
     """
         Class that evaluates a BEPolyelectrolyte.
@@ -37,5 +34,5 @@
         ## Name of the model
         self.name = "BEPolyelectrolyte"
-        self.description="""
+        self.description = """
         F(x) = K*1/(4*pi*Lb*(alpha)^(2))*(q^(2)+k^(2))/(1+(r02)^(2))
             *(q^(2)+k^(2))*(q^(2)-(12*h*C/b^(2)))+bkd
@@ -53,26 +50,25 @@
         ## Define parameters
         self.params = {}
-        self.params['k']    = 10
-        self.params['lb']   = 7.1
-        self.params['h']    = 12
-        self.params['b']    = 10
-        self.params['cs']   = 0.0
-        self.params['alpha']= 0.05
-        self.params['c']    = 0.7
+        self.params['k']     = 10
+        self.params['lb']    = 7.1
+        self.params['h']     = 12
+        self.params['b']     = 10
+        self.params['cs']    = 0.0
+        self.params['alpha'] = 0.05
+        self.params['c']     = 0.7
         self.params['background']  = 0.0
-        
 
         ## Parameter details [units, min, max]
         self.details = {}
-        self.details['k']    = ['[barns]', None, None]
-        self.details['lb'] = ['[A]', None, None]
-        self.details['h']   = ['[1/A^(2)]', None, None]
-        self.details['b']    = ['[A]', None, None]
-        self.details['cs'] = ['[mol/L]', None, None]
-        self.details['alpha']   = ['', None, None]
-        self.details['c']    = ['[mol/L]', None, None]
+        self.details['k']     = ['[barns]', None, None]
+        self.details['lb']    = ['[A]', None, None]
+        self.details['h']     = ['[1/A^(2)]', None, None]
+        self.details['b']     = ['[A]', None, None]
+        self.details['cs']    = ['[mol/L]', None, None]
+        self.details['alpha'] = ['', None, None]
+        self.details['c']     = ['[mol/L]', None, None]
         self.details['background'] = ['[1/cm]', None, None]
         #list of parameter that cannot be fitted
-        self.fixed= []
+        self.fixed = []
                
     def _BEPoly(self, x):
@@ -89,5 +85,6 @@
         Ca = self.params['c'] * 6.022136e-4
         #remove singulars
-        if self.params['alpha']<=0 or self.params['c']<=0 or self.params['b']==0 or self.params['lb']<=0:
+        if self.params['alpha']<=0 or self.params['c']<=0\
+            or self.params['b']==0 or self.params['lb']<=0:
             return 0
         else:
@@ -97,12 +94,13 @@
             
             r02 = 1.0/self.params['alpha']/math.sqrt(Ca) * \
-                    (self.params['b']/math.sqrt((48.0*math.pi *self.params['lb'])))
+                    (self.params['b']/\
+                     math.sqrt((48.0*math.pi*self.params['lb'])))
             
-            return self.params['k']/( 4.0 * math.pi * self.params['lb'] * self.params['alpha']**2 ) \
+            return self.params['k']/( 4.0 * math.pi * self.params['lb'] \
+                                      * self.params['alpha']**2 ) \
                    * ( x**2 + K2 ) / ( 1.0 + r02**2 * ( x**2 + K2 ) \
                         * (x**2 - ( 12.0 * self.params['h'] \
                         * Ca/(self.params['b']**2) ))) \
                         + self.params['background']
-            
    
     def run(self, x = 0.0):
Index: sansmodels/src/sans/models/BroadPeakModel.py
===================================================================
--- sansmodels/src/sans/models/BroadPeakModel.py	(revision 411d8bf82b9bbebc0c79b53d1b4c99783b1eb020)
+++ sansmodels/src/sans/models/BroadPeakModel.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
 """ 
-BroadPeakModel function as a BaseComponent model
+    BroadPeakModel function as a BaseComponent model
 """
 
@@ -61,5 +60,6 @@
         inten = self.params['scale_p']/pow(x,self.params['exponent_p'])
         inten += self.params['scale_l']/(1.0 + \
-                power((math.fabs(x-self.params['q_peak'])*self.params['length_l']),\
+                power((math.fabs(x-self.params['q_peak'])\
+                       *self.params['length_l']),\
                     self.params['exponent_l']))
 
@@ -78,5 +78,5 @@
             return self._broadpeak(x[0])
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return self._broadpeak(x)
@@ -93,5 +93,5 @@
             return self._broadpeak(q)
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return self._broadpeak(x)
Index: sansmodels/src/sans/models/Constant.py
===================================================================
--- sansmodels/src/sans/models/Constant.py	(revision 988130c6c44dbbe2fa0a64fe25885c9c67a14480)
+++ sansmodels/src/sans/models/Constant.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
-""" Provide constant function as a BaseComponent model
+""" 
+    Provide constant function as a BaseComponent model
 """
 
@@ -20,5 +20,5 @@
         ## Name of the model
         self.name = "Constant"
-        self.description='F(c)= c where c is a constant'
+        self.description = 'F(c)= c where c is a constant'
         ## Parameter details [units, min, max]
         self.details = {}
@@ -26,5 +26,5 @@
         self.params['value'] = 1.0
         #list of parameter that cannot be fitted
-        self.fixed= []
+        self.fixed = []
     def clone(self):
         """ Return a identical copy of self """
Index: sansmodels/src/sans/models/CoreMultiShellModel.py
===================================================================
--- sansmodels/src/sans/models/CoreMultiShellModel.py	(revision 339ce675656e3ab89eff7b84d8292a2e0ffe6109)
+++ sansmodels/src/sans/models/CoreMultiShellModel.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -1,3 +1,5 @@
-   
+"""
+    Core-Multi-Shell model
+"""
 from sans.models.BaseComponent import BaseComponent
 from sans.models.CoreFourShellModel import CoreFourShellModel
@@ -11,14 +13,10 @@
     def __init__(self, multfactor=1):
         BaseComponent.__init__(self)
-        """
-        :param n_shells: number of shells in the model, assumes 1<= n_shells <=4.
-        """
 
         ## Setting  model name model description
-        self.description=""
         model = CoreFourShellModel()
         self.model = model
         self.name = "CoreMultiShellModel"
-        self.description=""
+        self.description = ""
         self.n_shells = multfactor
         ## Define parameters
@@ -45,10 +43,9 @@
         # [int(maximum no. of functionality),"str(Titl),
         # [str(name of function0),...], [str(x-asix name of sld),...]]
-        self.multiplicity_info = [max_nshells,"No. of Shells:",[],['Radius']]
-
-        ## parameters with orientation: can be removed since there is no orientational params
+        self.multiplicity_info = [max_nshells, "No. of Shells:", [], ['Radius']]
+
+        ## parameters with orientation:
         for item in self.model.orientation_params:
             self.orientation_params.append(item)
-                
         
     def _clone(self, obj):
@@ -57,12 +54,11 @@
         data members to a fresh copy.
         """
-        obj.params     = copy.deepcopy(self.params)
-        obj.description     = copy.deepcopy(self.description)
-        obj.details    = copy.deepcopy(self.details)
+        obj.params = copy.deepcopy(self.params)
+        obj.description = copy.deepcopy(self.description)
+        obj.details = copy.deepcopy(self.details)
         obj.dispersion = copy.deepcopy(self.dispersion)
-        obj.model  = self.model.clone()
+        obj.model = self.model.clone()
 
         return obj
-    
     
     def _set_dispersion(self):
@@ -75,12 +71,12 @@
             nshell = 0
             if name.split('_')[0] == 'thick':
-                while nshell<self.n_shells:
+                while nshell < self.n_shells:
                     nshell += 1
                     if name.split('_')[1] == 'shell%s' % str(nshell):
-                        self.dispersion[name]= value
+                        self.dispersion[name] = value
                     else: 
                         continue
             else:
-                self.dispersion[name]= value
+                self.dispersion[name] = value
                               
 
@@ -94,14 +90,15 @@
             nshell = 0
             if name.split('_')[0] == 'thick' or name.split('_')[0] == 'sld':
-                if name.split('_')[1] == 'solv' or name.split('_')[1] == 'core0':
-                    self.params[name]= value
+                if name.split('_')[1] == 'solv' \
+                    or name.split('_')[1] == 'core0':
+                    self.params[name] = value
                     continue
-                while nshell<self.n_shells:
+                while nshell < self.n_shells:
                     nshell += 1
                     if name.split('_')[1] == 'shell%s' % str(nshell):
-                        self.params[name]= value
+                        self.params[name] = value
                         continue
             else:
-                self.params[name]= value
+                self.params[name] = value
             
             
@@ -116,5 +113,5 @@
         for name ,detail in self.model.details.iteritems():
             if name in self.params.iterkeys():
-                self.details[name]= detail
+                self.details[name] = detail
             
     
@@ -131,9 +128,12 @@
 
                 for nshell in range(self.n_shells,max_nshells):
-                    if key.split('_')[0] == 'sld' and key.split('_')[1] == 'shell%s' % str(nshell+1):
+                    if key.split('_')[0] == 'sld' and \
+                        key.split('_')[1] == 'shell%s' % str(nshell+1):
                         try:
                             value = self.model.params['sld_solv']
                             self.model.setParam(key, value)
-                        except: pass
+                        except:
+                            message = "CoreMultiShellModel evaluation problem"
+                            raise RuntimeError, message
 
     def getProfile(self):
@@ -155,5 +155,5 @@
         
         # for shells
-        for n in range(1,self.n_shells+1):
+        for n in range(1, self.n_shells+1):
             # Left side of each shells
             r0 = r[len(r)-1]            
@@ -186,9 +186,10 @@
         self._setParamHelper( name, value)
         ## setParam to model 
-        if name=='sld_solv':
-            # the sld_*** model.params not in params must set to value of sld_solv
+        if name == 'sld_solv':
+            # the sld_*** model.params not in params 
+            # must set to value of sld_solv
             for key in self.model.params.iterkeys():
                 if key not in self.params.keys()and key.split('_')[0] == 'sld':
-                        self.model.setParam(key, value)
+                    self.model.setParam(key, value)
         self.model.setParam( name, value)
 
@@ -199,5 +200,5 @@
         #look for dispersion parameters
         toks = name.split('.')
-        if len(toks)==2:
+        if len(toks) == 2:
             for item in self.dispersion.keys():
                 if item.lower()==toks[0].lower():
@@ -224,5 +225,4 @@
 
         self.fixed.sort()
-        pass         
                 
     def run(self, x = 0.0):
@@ -250,5 +250,5 @@
     ## Now (May27,10) directly uses the model eval function 
     ## instead of the for-loop in Base Component.
-    def evalDistribution(self, x = []):
+    def evalDistribution(self, x):
         """ 
         Evaluate the model in cartesian coordinates
@@ -267,8 +267,8 @@
         :dispersion: dispersion object of type DispersionModel
         """
-        value= None
+        value = None
         try:
             if parameter in self.model.dispersion.keys():
-                value= self.model.set_dispersion(parameter, dispersion)
+                value = self.model.set_dispersion(parameter, dispersion)
             self._set_dispersion()
             return value
Index: sansmodels/src/sans/models/CorrLengthModel.py
===================================================================
--- sansmodels/src/sans/models/CorrLengthModel.py	(revision 411d8bf82b9bbebc0c79b53d1b4c99783b1eb020)
+++ sansmodels/src/sans/models/CorrLengthModel.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -56,7 +56,7 @@
         Model definition
         """
-        inten = self.params['scale_p']/pow(x,self.params['exponent_p'])
+        inten = self.params['scale_p']/pow(x, self.params['exponent_p'])
         inten += self.params['scale_l']/(1.0 + \
-                power((x*self.params['length_l']),self.params['exponent_l']))
+                power((x*self.params['length_l']), self.params['exponent_l']))
         inten += self.params['background']
 
@@ -73,5 +73,5 @@
             return self._corrlength(x[0])
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return self._corrlength(x)
@@ -88,5 +88,5 @@
             return self._corrlength(q)
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return self._corrlength(x)
Index: sansmodels/src/sans/models/Cos.py
===================================================================
--- sansmodels/src/sans/models/Cos.py	(revision 96672c05d2a444bfc0ce599c2ae50b1825f6e049)
+++ sansmodels/src/sans/models/Cos.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
-""" Provide cos(x) function as a BaseComponent model
+""" 
+    Provide cos(x) function as a BaseComponent model
 """
 
@@ -7,5 +7,6 @@
  
 class Cos(BaseComponent):
-    """ Class that evaluates a cos(x) model. 
+    """ 
+        Class that evaluates a cos(x) model. 
     """
         
@@ -18,5 +19,5 @@
         ## Name of the model
         self.name = "Cos"
-        self.description='F(x)=cos(x)'
+        self.description = 'F(x)=cos(x)'
         ## Parameter details [units, min, max]
         self.details = {}
@@ -34,5 +35,5 @@
             return math.cos(x[0]*math.cos(x[1]))*math.cos(x[0]*math.sin(x[1]))
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return math.cos(x)
@@ -46,7 +47,6 @@
             return math.cos(x[0])*math.cos(x[1])
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return math.cos(x)
-   
-# End of file
+
Index: sansmodels/src/sans/models/DebyeModel.py
===================================================================
--- sansmodels/src/sans/models/DebyeModel.py	(revision 26e4a247fb629283560bcebfc702766d91e89b16)
+++ sansmodels/src/sans/models/DebyeModel.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -1,3 +1,2 @@
-#!/usr/bin/env python
 """ 
     Provide F(x) = 2( exp(-x) + x - 1 )/x**2
@@ -6,10 +5,8 @@
     Debye function as a BaseComponent model
 """
-
 from sans.models.BaseComponent import BaseComponent
 import math
 
 class DebyeModel(BaseComponent):
-   
     """
         Class that evaluates a Debye model.
@@ -32,5 +29,5 @@
         ## Name of the model
         self.name = "Debye"
-        self.description=""" 
+        self.description = """ 
         F(x) = 2( exp(-x) + x - 1 )/x**2
         with x = (q*R_g)**2
@@ -53,5 +50,6 @@
         self.details['background'] = ['[1/cm]', None, None]
         #list of parameter that cannot be fitted
-        self.fixed= []      
+        self.fixed = [] 
+             
     def _debye(self, x):
         """
@@ -65,8 +63,8 @@
         y = (x * self.params['rg'])**2.0
         if x == 0:
-            D=1
+            D = 1
         else:
-           D = 2.0*( math.exp(-y) + y -1.0 )/y**2.0
-        return self.params['scale']* D + self.params['background']
+            D = 2.0*( math.exp(-y) + y -1.0 )/y**2.0
+        return self.params['scale'] * D + self.params['background']
    
     def run(self, x = 0.0):
@@ -78,5 +76,5 @@
             return self._debye(x[0])
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return self._debye(x)
@@ -91,5 +89,5 @@
             return self._debye(q)
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return self._debye(x)
Index: sansmodels/src/sans/models/DisperseModel.py
===================================================================
--- sansmodels/src/sans/models/DisperseModel.py	(revision 0abf7bf37070c95d946c2656a2e3ef5d902d0027)
+++ sansmodels/src/sans/models/DisperseModel.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -1,12 +1,5 @@
-#!/usr/bin/env python
 """ 
-Wrapper for the Disperser class extension
-
-:author: Mathieu Doucet / UTK
-
-:contact: mathieu.doucet@nist.gov
-
+    Wrapper for the Disperser class extension
 """
-
 from sans.models.BaseComponent import BaseComponent
 from sans_extension.c_models import Disperser
@@ -14,18 +7,18 @@
 class DisperseModel(Disperser, BaseComponent):
     """ 
-	Wrapper class for the Disperser extension
-	Python class that takes a model and averages its output
-	for a distribution of its parameters.
-	  
-	The parameters to be varied are specified at instantiation time.
-	The distributions are Gaussian, with std deviations specified for
-	each parameter at instantiation time.
-	
-	Example: ::
-	
-		cyl = CylinderModel()
-		disp = DisperseModel(cyl, ['cyl_phi'], [0.3])
-		disp.run([0.01, 1.57])
-		
+    Wrapper class for the Disperser extension
+    Python class that takes a model and averages its output
+    for a distribution of its parameters.
+      
+    The parameters to be varied are specified at instantiation time.
+    The distributions are Gaussian, with std deviations specified for
+    each parameter at instantiation time.
+    
+    Example: ::
+    
+        cyl = CylinderModel()
+        disp = DisperseModel(cyl, ['cyl_phi'], [0.3])
+        disp.run([0.01, 1.57])
+        
     """
         
@@ -34,8 +27,8 @@
         Initialization 
         
-    	:param model: Model to disperse [BaseComponent]
-    	:param paramList: list of parameters to disperse [List of strings]
-    	:param sigmaList: list of std deviations for Gaussian dispersion
-					[List of floats]
+        :param model: Model to disperse [BaseComponent]
+        :param paramList: list of parameters to disperse [List of strings]
+        :param sigmaList: list of std deviations for Gaussian dispersion
+                    [List of floats]
         
         """
@@ -48,37 +41,38 @@
         ## Keep track of the underlying model
         self.model = model
-        self.description=''
+        self.description =''
         #list of parameter that cannot be fitted
-        self.fixed= []
+        self.fixed = []
         
     def clone(self):
         """ Return a identical copy of self """
-        obj = DisperseModel(self.model, self.params['paramList'], self.params['sigmaList'])
-        return obj   
+        return DisperseModel(self.model, self.params['paramList'], 
+                             self.params['sigmaList']) 
    
     def setParam(self, name, value):
-    	"""
-    	"""
-    	if name.lower() in self.params:
-    		BaseComponent.setParam(self, name, value)
-    	else:
-    		self.model.setParam(name, value)
+        """
+            Set a parameter value
+            :param name: parameter name
+        """
+        if name.lower() in self.params:
+            BaseComponent.setParam(self, name, value)
+        else:
+            self.model.setParam(name, value)
    
     def getParam(self, name):
-    	"""
-    	"""
-    	if name.lower() in self.params:
-    		return BaseComponent.getParam(self, name)
-    	else:
-    		return self.model.getParam(name)
+        """
+            Get the value of the given parameter
+            :param name: parameter name
+        """
+        if name.lower() in self.params:
+            return BaseComponent.getParam(self, name)
+        else:
+            return self.model.getParam(name)
    
     def run(self, x = 0.0):
         """ 
-        Evaluate the model
-            
-        :param x: input q, or [q,phi]
-        
-        :return: scattering function P(q)
-        
+            Evaluate the model
+            :param x: input q, or [q,phi]
+            :return: scattering function P(q)
         """
         return Disperser.run(self, x)
@@ -86,10 +80,7 @@
     def runXY(self, x = 0.0):
         """ 
-        Evaluate the model
-        
-        :param x: input q, or [q,phi]
-        
-      	:return: scattering function P(q)
-      	
+            Evaluate the model
+            :param x: input q, or [q,phi]
+            :return: scattering function P(q)
         """
         return Disperser.runXY(self, x)
Index: nsmodels/src/sans/models/FractalAbsModel.py
===================================================================
--- sansmodels/src/sans/models/FractalAbsModel.py	(revision 79ac6f8cbc71c9a7e133d2e2e0ef6f2ffe0427eb)
+++ 	(revision )
@@ -1,52 +1,0 @@
-#!/usr/bin/env python
-""" 
-Provide F(x)= P(|x|)*S(|x|) + bkd
-Fractal as a BaseComponent model
-"""
-
-from sans.models.FractalModel import FractalModel
-import math
-
-class FractalAbsModel(FractalModel):
-    """
-    Class that evaluates a Fractal function.
-    
-    F(|x|)= P(|x|)*S(|x|) + bkd
-    The model has Seven parameters: 
-        scale        =  Volume fraction
-        radius       =  Block radius
-        fractal_dim  =  Fractal dimension
-        corr_length  =  correlation Length
-        block_sld    =  SDL block
-        solvent_sld  =  SDL solvent
-        background   =  background
-       
-    """
-    def __init__(self):
-        """Initialization """
-        # Initialize FractalModel 
-
-        FractalModel.__init__(self)
-        ## Name of the model
-        self.name = "Absolute Number Density Fractal"
-        self.description="""
-        I(x)= P(|x|)*S(|x|) + bkd
-        
-        p(x)= scale* V^(2)*delta^(2)* F(x*radius)^(2)
-        F(x) = 3*[sin(x)-x cos(x)]/x**3
-        
-        The model has Seven parameters: 
-        scale        =  Volume fraction
-        radius       =  Block radius
-        fractal_dim  =  Fractal dimension
-        corr_length  =  correlation Length
-        block_sld    =  SDL block
-        solvent_sld  =  SDL solvent
-        background   =  background
-        """
-    def _Fractal(self, x):
-        """
-        """
-        return FractalModel._Fractal(self, math.fabs(x))
-    
-    
Index: sansmodels/src/sans/models/FractalCoreShellModel.py
===================================================================
--- sansmodels/src/sans/models/FractalCoreShellModel.py	(revision 31f9d0c2d89fa5bb1498e539b085083a621cea43)
+++ sansmodels/src/sans/models/FractalCoreShellModel.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -131,5 +131,5 @@
             if name  == 'scale':
                 name = 'volfraction'
-            self.params[name]= value
+            self.params[name] = value
         self.params['frac_dim'] = 2.0
         self.params['cor_length'] = 100.0  
@@ -206,5 +206,5 @@
                 +self._fractalcore(x[0])*self.model.run(x)
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return self.params['background']\
@@ -222,10 +222,11 @@
         if x.__class__.__name__ == 'list':
             q = math.sqrt(x[0]**2 + x[1]**2)
-            return self.params['background']+self._fractalcore(q)*self.model.runXY(x)
+            return self.params['background']\
+                +self._fractalcore(q)*self.model.runXY(x)
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
-            return self.params['background']+self._fractalcore(x)*self.model.runXY(x)
-
+            return self.params['background']\
+                +self._fractalcore(x)*self.model.runXY(x)
 
     def set_dispersion(self, parameter, dispersion):
Index: nsmodels/src/sans/models/FractalMode_pymodell.py
===================================================================
--- sansmodels/src/sans/models/FractalMode_pymodell.py	(revision 96656e3ad6cdb9f8256e2118c60bac29635136af)
+++ 	(revision )
@@ -1,168 +1,0 @@
-#!/usr/bin/env python
-""" 
-    
-    Provide F(x)= P(x)*S(x) + bkd
-    Fractal as a BaseComponent model
-"""
-
-from sans.models.BaseComponent import BaseComponent
-import math
-from scipy.special import gamma
-
-class FractalModel(BaseComponent):
-   
-    """
-        Class that evaluates a Fractal function.
-        
-        F(x)= P(x)*S(x) + bkd
-        The model has Seven parameters: 
-            scale        =  Volume fraction
-            radius       =  Block radius
-            fractal_dim  =  Fractal dimension
-            corr_length  =  correlation Length
-            block_sld    =  SDL block
-            solvent_sld  =  SDL solvent
-            background   =  background
-           
-    """
-        
-    def __init__(self):
-        """ Initialization """
-        
-        # Initialize BaseComponent first, then fractal
-        BaseComponent.__init__(self)
-        
-        ## Name of the model
-        self.name = "Number Density Fractal"
-        self.description="""
-        I(x)= P(x)*S(x) + bkd
-        
-        p(x)= scale* V^(2)*delta^(2)* F(x*radius)^(2)
-        F(x) = 3*[sin(x)-x cos(x)]/x**3
-        
-        The model has Seven parameters: 
-        scale        =  Volume fraction
-        radius       =  Block radius
-        fractal_dim  =  Fractal dimension
-        corr_length  =  correlation Length
-        block_sld    =  SDL block
-        solvent_sld  =  SDL solvent
-        background   =  background
-        """
-        ## Define parameters
-        self.params = {}
-        self.params['scale']       = 0.05
-        self.params['radius']      = 5.0
-        self.params['fractal_dim'] = 2.0
-        self.params['corr_length'] = 100.0
-        self.params['block_sld']   = 2.0e-6
-        self.params['solvent_sld'] = 6.0e-6
-        self.params['background']  = 0.0
-        
-
-        ## Parameter details [units, min, max]
-        self.details = {}
-        self.details['scale']       = ['',     None, None]
-        self.details['radius']      = ['[A]',    None, None]
-        self.details['fractal_dim'] = ['',       0,  None]
-        self.details['corr_length'] = ['[A]',    None, None]
-        self.details['block_sld']   = ['[1/A^(2)]',  None, None]
-        self.details['solvent_sld'] = ['[1/A^(2)]',  None, None]
-        self.details['background']  = ['[1/cm]', None, None]
-       
-               
-    def _Fractal(self, x):
-        """
-            Evaluate  
-            F(x) = p(x) * s(x) + bkd  
-        """
-        #if x<0 and self.params['fractal_dim']>0:
-         #   raise ValueError, "negative number cannot be raised to a fractional power"
-        #if x==0 and self.params['fractal_dim']==0:
-         #   return 1+self.params['background']
-        #elif x<0 and self.params['fractal_dim']==0:
-        #    return 1e+32
-        #else:
-        return self.params['background']+ self._scatterRanDom(x)* self._Block(x)
-
-    
-    def _Block(self,x):
-        #if self.params['fractal_dim']<0:
-        #    self.params['fractal_dim']=-self.params['fractal_dim']
-        try:
-            if x<0:
-                x=-x
-            if self.params['radius']<0:
-                self.params['radius']=-self.params['radius']
-                
-            if x==0 or self.params['radius']==0 :
-                 return 1e+32
-            elif self.params['fractal_dim']==0:
-                return 1.0 + (math.sin((self.params['fractal_dim']-1.0) * math.atan(x * self.params['corr_length']))\
-                              * self.params['fractal_dim'] * gamma(self.params['fractal_dim']-1.0))\
-                              *( math.pow( 1.0 + 1.0/((x**2)*(self.params['corr_length']**2)),1/2.0)) 
-            elif self.params['corr_length']==0 or self.params['fractal_dim']==1:
-                return 1.0 + (math.sin((self.params['fractal_dim']-1.0) * math.atan(x * self.params['corr_length']))\
-                              * self.params['fractal_dim'] * gamma(self.params['fractal_dim']-1.0))\
-                              /( math.pow( (x*self.params['radius']), self.params['fractal_dim']))   
-                
-            elif self.params['fractal_dim']<1:
-                return 1.0 + (math.sin((self.params['fractal_dim']-1.0) * math.atan(x * self.params['corr_length']))\
-                              * self.params['fractal_dim'] * gamma(self.params['fractal_dim']-1.0))\
-                              /( math.pow( (x*self.params['radius']), self.params['fractal_dim']))*\
-                                 math.pow( 1.0 + 1.0/((x**2)*(self.params['corr_length']**2)),(1-self.params['fractal_dim'])/2.0)   
-            else:
-                return 1.0 + (math.sin((self.params['fractal_dim']-1.0) * math.atan(x * self.params['corr_length']))\
-                              * self.params['fractal_dim'] * gamma(self.params['fractal_dim']-1.0))\
-                              / math.pow( (x*self.params['radius']), self.params['fractal_dim'])\
-                                 /math.pow( 1.0 + 1.0/((x**2)*(self.params['corr_length']**2)),(self.params['fractal_dim']-1.0)/2.0)   
-        except:
-            return 1 # Need a real fix. 
-    def _Spherical(self,x):
-        """
-            F(x) = 3*[sin(x)-xcos(x)]/x**3
-        """
-        if x==0:
-            return 0
-        else:
-            return 3.0*(math.sin(x)-x*math.cos(x))/(math.pow(x,3.0))
-        
-    def _scatterRanDom(self,x):
-        """
-             calculate p(x)= scale* V^(2)*delta^(2)* F(x*Radius)^(2)
-        """
-        V =(4.0/3.0)*math.pi* math.pow(self.params['radius'],3.0) 
-        delta = self.params['block_sld']-self.params['solvent_sld']
-        
-        return 1.0e8*self.params['scale']* V *(delta**2)*\
-                (self._Spherical(x*self.params['radius'])**2)
-        
-    def run(self, x = 0.0):
-        """ Evaluate the model
-            @param x: input q-value (float or [float, float] as [r, theta])
-            @return: (Fractal value)
-        """
-        if x.__class__.__name__ == 'list':
-            # Take absolute value of Q, since this model is really meant to
-            # be defined in 1D for a given length of Q
-            #qx = math.fabs(x[0]*math.cos(x[1]))
-            #qy = math.fabs(x[0]*math.sin(x[1]))
-            
-            return self._Fractal(math.fabs(x[0]))
-        elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
-        else:
-            return self._Fractal(x)
-   
-    def runXY(self, x = 0.0):
-        """ Evaluate the model
-            @param x: input q-value (float or [float, float] as [qx, qy])
-            @return: Fractal value
-        """
-        if x.__class__.__name__ == 'list':
-            q = math.sqrt(x[0]**2 + x[1]**2)
-            return self._Fractal(q)
-        elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
-        else:
-            return self._Fractal(x)
Index: sansmodels/src/sans/models/GaussLorentzGelModel.py
===================================================================
--- sansmodels/src/sans/models/GaussLorentzGelModel.py	(revision 79411b26462e477636b67db8c44839e2b4d3f3f7)
+++ sansmodels/src/sans/models/GaussLorentzGelModel.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -1,8 +1,6 @@
-#!/usr/bin/env python
 """ 
-Provide I(q) = I_0 exp ( - R_g^2 q^2 / 3.0)
-GaussLorentzGel function as a BaseComponent model
+    Provide I(q) = I_0 exp ( - R_g^2 q^2 / 3.0)
+    GaussLorentzGel function as a BaseComponent model
 """
-
 from sans.models.BaseComponent import BaseComponent
 import math
@@ -56,9 +54,11 @@
         #list of parameter that cannot be fitted
         self.fixed = []  
+        
     def _gausslorentzgel(self, x):
         """
         Model definition
         """
-        inten = self.params['scale_g']*math.exp(-1.0*x*x*self.params['stat_colength']* \
+        inten = self.params['scale_g'] \
+                *math.exp(-1.0*x*x*self.params['stat_colength']* \
                 self.params['stat_colength']/2.0) + self.params['scale_l']/ \
                 (1.0 + (x*self.params['dyn_colength'])* \
@@ -74,5 +74,5 @@
             return self._gausslorentzgel(x[0])
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return self._gausslorentzgel(x)
@@ -87,5 +87,5 @@
             return self._gausslorentzgel(q)
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return self._gausslorentzgel(x)
Index: sansmodels/src/sans/models/GuinierModel.py
===================================================================
--- sansmodels/src/sans/models/GuinierModel.py	(revision 1ed3834d2e968f8ff632d0b368f55ac28174df7a)
+++ sansmodels/src/sans/models/GuinierModel.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -1,8 +1,6 @@
-#!/usr/bin/env python
 """ 
     Provide I(q) = I_0 exp ( - R_g^2 q^2 / 3.0)
     Guinier function as a BaseComponent model
 """
-
 from sans.models.BaseComponent import BaseComponent
 import math
@@ -28,5 +26,5 @@
         ## Name of the model
         self.name = "Guinier"
-        self.description=""" I(q) = I_0 exp ( - R_g^2 q^2 / 3.0 )
+        self.description = """ I(q) = I_0 exp ( - R_g^2 q^2 / 3.0 )
         
                         List of default parameters:
@@ -43,10 +41,16 @@
         self.details['rg']    = ['[A]', None, None]
         #list of parameter that cannot be fitted
-        self.fixed= []  
+        self.fixed = []  
+        
     def _guinier(self, x):
-        return self.params['scale'] * math.exp( -(self.params['rg']*x)**2 / 3.0 )  
+        """
+            Evaluate guinier function
+            :param x: q-value
+        """
+        return self.params['scale']*math.exp( -(self.params['rg']*x)**2/3.0 )  
    
     def run(self, x = 0.0):
-        """ Evaluate the model
+        """ 
+            Evaluate the model
             @param x: input q-value (float or [float, float] as [r, theta])
             @return: (guinier value)
@@ -55,5 +59,5 @@
             return self._guinier(x[0])
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return self._guinier(x)
@@ -68,5 +72,5 @@
             return self._guinier(q)
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return self._guinier(x)
Index: sansmodels/src/sans/models/GuinierPorodModel.py
===================================================================
--- sansmodels/src/sans/models/GuinierPorodModel.py	(revision 8f20419d5be1d467bd17c7dfade28c96f90656ca)
+++ sansmodels/src/sans/models/GuinierPorodModel.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -1,9 +1,7 @@
-#!/usr/bin/env python
 """ 
-I(q) = scale/q^s* exp ( - R_g^2 q^2 / (3-s) ) for q<= ql
-    = scale/q^m*exp((-ql^2*Rg^2)/(3-s))*ql^(m-s) for q>=ql
-Guinier function as a BaseComponent model
+    I(q) = scale/q^s* exp ( - R_g^2 q^2 / (3-s) ) for q<= ql
+        = scale/q^m*exp((-ql^2*Rg^2)/(3-s))*ql^(m-s) for q>=ql
+    Guinier function as a BaseComponent model
 """
-
 from sans.models.BaseComponent import BaseComponent
 from math import sqrt,exp
@@ -24,5 +22,6 @@
         ## Name of the model
         self.name = "GuinierPorod"
-        self.description=""" I(q) = scale/q^s* exp ( - R_g^2 q^2 / (3-s) ) for q<= ql
+        self.description = """
+         I(q) = scale/q^s* exp ( - R_g^2 q^2 / (3-s) ) for q<= ql
          = scale/q^m*exp((-ql^2*Rg^2)/(3-s))*ql^(m-s) for q>=ql
                         where ql = sqrt((m-s)(3-s)/2)/Rg.
@@ -49,5 +48,5 @@
 
         #list of parameter that cannot be fitted
-        self.fixed= []  
+        self.fixed = []  
         
     def _guinier_porod(self, x):
@@ -65,9 +64,9 @@
         
         #do the calculation and return the function value
-        q1=sqrt((n-3.0+m)*n/2.0)/Rg
+        q1 = sqrt((n-3.0+m)*n/2.0)/Rg
         if qval < q1:
             F = (G/pow(qval,(3.0-n)))*exp((-qval*qval*Rg*Rg)/n) 
         else:
-            F = (G/pow(qval,m))*exp(-(n-3.0+m)/2.0)*pow(((n-3.0+m)*n/2.0),
+            F = (G/pow(qval, m))*exp(-(n-3.0+m)/2.0)*pow(((n-3.0+m)*n/2.0),
                                         ((n-3.0+m)/2.0))/pow(Rg,(n-3.0+m))
         inten = F + bgd
@@ -83,5 +82,5 @@
             return self._guinier_porod(x[0])
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return self._guinier_porod(x)
@@ -96,5 +95,5 @@
             return self._guinier_porod(q)
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError, "Tuples are not allowed as input to models"
         else:
             return self._guinier_porod(x)
Index: sansmodels/test/utest_other_models.py
===================================================================
--- sansmodels/test/utest_other_models.py	(revision 6e2d708f39b6fa1f29d8474345605de7aea88502)
+++ sansmodels/test/utest_other_models.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
@@ -1447,52 +1447,5 @@
         self.comp.setParam('B', 0.0)
         self.assertRaises(ZeroDivisionError, self.comp.run, 10)
-        #self.assert_(numpy.isfinite(self.comp.run(0.0)))  
-        
-       
-class TestFractalAbsModel(unittest.TestCase):
-    """ Unit tests for FractalAbsModel"""
-    
-    def setUp(self):
-        from sans.models.FractalAbsModel import FractalAbsModel
-        self.comp = FractalAbsModel()
-        self.comp.setParam('scale', 0.05)
-        self.comp.setParam('radius', 5.0)
-        self.comp.setParam('fractal_dim', 2.0)
-        self.comp.setParam('cor_length',100.0)
-        self.comp.setParam('sldBlock', 2.0e-6)
-        self.comp.setParam('sldSolv', 6.35e-6)
-        self.comp.setParam('background',0.0)
-        
-        self.x = numpy.array([0.4, 1.3])
-        self.y = numpy.array([0.5, 1.57])
-        
-        self.x_array = self.comp.evalDistribution(self.x)
-        self.y_array = self.comp.evalDistribution(self.y)
-        qx_prime = numpy.reshape(self.x, [1,len(self.x)])
-        qy_prime = numpy.reshape(self.y, [len(self.y),1])
-        self.xy_matrix = self.comp.evalDistribution([self.x, self.y])
-        
-    def test1D(self):
-        """ Test 1D model for a Fractal Abs Model"""
-        self.assertAlmostEqual(self.comp.run(0.001), 39.2881, 3)
-        
-    def test1D_2(self):
-        """ Test 2D model for a Fractal Abs Model"""
-        self.assertAlmostEqual(self.comp.run([0.001, 1.3]), 39.2881, 3)
-        
-    def testEval_1D(self):
-        """ Test 1D model for a Fractal Abs Model with evalDistribution"""
-        self.assertEquals(self.comp.run(0.4),self.x_array[0])
-        self.assertEquals(self.comp.run(1.3),self.x_array[1])
-        
-    def testEval_2D(self):
-        """ Test 2D model for a Fractal Abs Model with evalDistribution"""
-        self.assertAlmostEquals(self.comp.runXY([0.4, 0.5]),self.xy_matrix[0],8)
-        self.assertAlmostEquals(self.comp.runXY([1.3,1.57]),self.xy_matrix[1], 8)
-
-    # No more singular point
-    #def testCriticalPoint(self):
-    #    """ Test Fractal Abs at the critical point"""
-    #    self.assert_(numpy.isfinite(self.comp.run(0.0)))    
+        #self.assert_(numpy.isfinite(self.comp.run(0.0)))       
    
 class TestFractalModel(unittest.TestCase):
