Index: sansmodels/src/sans/models/CoreFourShellModel.py
===================================================================
--- sansmodels/src/sans/models/CoreFourShellModel.py	(revision ec658c856bb1b403622acc98b5528f12702b6f5b)
+++ sansmodels/src/sans/models/CoreFourShellModel.py	(revision ec658c856bb1b403622acc98b5528f12702b6f5b)
@@ -0,0 +1,148 @@
+#!/usr/bin/env python
+"""
+	This software was developed by the University of Tennessee as part of the
+	Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
+	project funded by the US National Science Foundation.
+
+	If you use DANSE applications to do scientific research that leads to
+	publication, we ask that you acknowledge the use of the software with the
+	following sentence:
+
+	"This work benefited from DANSE software developed under NSF award DMR-0520547."
+
+	copyright 2008, University of Tennessee
+"""
+
+""" Provide functionality for a C extension model
+
+	WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
+ 	         DO NOT MODIFY THIS FILE, MODIFY ..\c_extensions\corefourshell.h
+ 	         AND RE-RUN THE GENERATOR SCRIPT
+
+"""
+
+from sans.models.BaseComponent import BaseComponent
+from sans_extension.c_models import CCoreFourShellModel
+import copy    
+    
+class CoreFourShellModel(CCoreFourShellModel, BaseComponent):
+    """ Class that evaluates a CoreFourShellModel model. 
+        This file was auto-generated from ..\c_extensions\corefourshell.h.
+        Refer to that file and the structure it contains
+        for details of the model.
+        List of default parameters:
+         scale           = 1.0 
+         rad_core        = 60.0 [A]
+         sld_core        = 6.4e-006 [1/A^(2)]
+         thick_shell1    = 10.0 [A]
+         sld_shell1      = 1e-006 [1/A^(2)]
+         thick_shell2    = 10.0 [A]
+         sld_shell2      = 2e-006 [1/A^(2)]
+         thick_shell3    = 10.0 [A]
+         sld_shell3      = 3e-006 [1/A^(2)]
+         thick_shell4    = 10.0 [A]
+         sld_shell4      = 4e-006 [1/A^(2)]
+         sld_solv        = 6.4e-006 [1/A^(2)]
+         background      = 0.001 [1/cm]
+
+    """
+        
+    def __init__(self):
+        """ Initialization """
+        
+        # Initialize BaseComponent first, then sphere
+        BaseComponent.__init__(self)
+        CCoreFourShellModel.__init__(self)
+        
+        ## Name of the model
+        self.name = "CoreFourShellModel"
+        ## Model description
+        self.description =""" Calculates the scattering intensity from a core-4 shell structure.
+		scale = scale factor * volume fraction
+		rad_core: the radius of the core
+		sld_core: the SLD of the core
+		thick_shelli: the thickness of the i'th shell from the core
+		sld_shelli: the SLD of the i'th shell from the core
+		sld_solv: the SLD of the solvent
+		background: incoherent background"""
+       
+        ## Parameter details [units, min, max]
+        self.details = {}
+        self.details['scale'] = ['', None, None]
+        self.details['rad_core'] = ['[A]', None, None]
+        self.details['sld_core'] = ['[1/A^(2)]', None, None]
+        self.details['thick_shell1'] = ['[A]', None, None]
+        self.details['sld_shell1'] = ['[1/A^(2)]', None, None]
+        self.details['thick_shell2'] = ['[A]', None, None]
+        self.details['sld_shell2'] = ['[1/A^(2)]', None, None]
+        self.details['thick_shell3'] = ['[A]', None, None]
+        self.details['sld_shell3'] = ['[1/A^(2)]', None, None]
+        self.details['thick_shell4'] = ['[A]', None, None]
+        self.details['sld_shell4'] = ['[1/A^(2)]', None, None]
+        self.details['sld_solv'] = ['[1/A^(2)]', None, None]
+        self.details['background'] = ['[1/cm]', None, None]
+
+        ## fittable parameters
+        self.fixed=['thick_shell4.width', 'thick_shell1.width', 'thick_shell2.width', 'thick_shell3.width', 'rad_core.width']
+        
+        ## parameters with orientation
+        self.orientation_params =[]
+   
+    def clone(self):
+        """ Return a identical copy of self """
+        return self._clone(CoreFourShellModel())   
+        
+    def __getstate__(self):
+        """ return object state for pickling and copying """
+        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log}
+        
+        return self.__dict__, model_state
+        
+    def __setstate__(self, state):
+        """ create object from pickled state """
+        
+        self.__dict__, model_state = state
+        self.params = model_state['params']
+        self.dispersion = model_state['dispersion']
+        self.log = model_state['log']
+       	
+   
+    def run(self, x = 0.0):
+        """ Evaluate the model
+            @param x: input q, or [q,phi]
+            @return: scattering function P(q)
+        """
+        
+        return CCoreFourShellModel.run(self, x)
+   
+    def runXY(self, x = 0.0):
+        """ Evaluate the model in cartesian coordinates
+            @param x: input q, or [qx, qy]
+            @return: scattering function P(q)
+        """
+        
+        return CCoreFourShellModel.runXY(self, x)
+        
+    def evalDistribution(self, x = []):
+        """ Evaluate the model in cartesian coordinates
+            @param x: input q[], or [qx[], qy[]]
+            @return: scattering function P(q[])
+        """
+        return CCoreFourShellModel.evalDistribution(self, x)
+        
+    def calculate_ER(self):
+        """ Calculate the effective radius for P(q)*S(q)
+            @return: the value of the effective radius
+        """       
+        return CCoreFourShellModel.calculate_ER(self)
+        
+    def set_dispersion(self, parameter, dispersion):
+        """
+            Set the dispersion object for a model parameter
+            @param parameter: name of the parameter [string]
+            @dispersion: dispersion object of type DispersionModel
+        """
+        return CCoreFourShellModel.set_dispersion(self, parameter, dispersion.cdisp)
+        
+   
+# End of file
Index: sansmodels/src/sans/models/FlexCylEllipXModel.py
===================================================================
--- sansmodels/src/sans/models/FlexCylEllipXModel.py	(revision ec658c856bb1b403622acc98b5528f12702b6f5b)
+++ sansmodels/src/sans/models/FlexCylEllipXModel.py	(revision ec658c856bb1b403622acc98b5528f12702b6f5b)
@@ -0,0 +1,134 @@
+#!/usr/bin/env python
+"""
+	This software was developed by the University of Tennessee as part of the
+	Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
+	project funded by the US National Science Foundation.
+
+	If you use DANSE applications to do scientific research that leads to
+	publication, we ask that you acknowledge the use of the software with the
+	following sentence:
+
+	"This work benefited from DANSE software developed under NSF award DMR-0520547."
+
+	copyright 2008, University of Tennessee
+"""
+
+""" Provide functionality for a C extension model
+
+	WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
+ 	         DO NOT MODIFY THIS FILE, MODIFY ..\c_extensions\flexcyl_ellipX.h
+ 	         AND RE-RUN THE GENERATOR SCRIPT
+
+"""
+
+from sans.models.BaseComponent import BaseComponent
+from sans_extension.c_models import CFlexCylEllipXModel
+import copy    
+    
+class FlexCylEllipXModel(CFlexCylEllipXModel, BaseComponent):
+    """ Class that evaluates a FlexCylEllipXModel model. 
+        This file was auto-generated from ..\c_extensions\flexcyl_ellipX.h.
+        Refer to that file and the structure it contains
+        for details of the model.
+        List of default parameters:
+         scale           = 1.0 
+         length          = 1000.0 [A]
+         kuhn_length     = 100.0 [A]
+         radius          = 20.0 [A]
+         axis_ratio      = 1.5 
+         sldCyl          = 1e-006 [1/A^(2)]
+         sldSolv         = 6.3e-006 [1/A^(2)]
+         background      = 0.0001 [1/cm]
+
+    """
+        
+    def __init__(self):
+        """ Initialization """
+        
+        # Initialize BaseComponent first, then sphere
+        BaseComponent.__init__(self)
+        CFlexCylEllipXModel.__init__(self)
+        
+        ## Name of the model
+        self.name = "FlexCylEllipXModel"
+        ## Model description
+        self.description =""" Note : scale and contrast=sldCyl-sldSolv are both multiplicative factors in the
+		model and are perfectly correlated. One or
+		both of these parameters must be held fixed
+		during model fitting."""
+       
+        ## Parameter details [units, min, max]
+        self.details = {}
+        self.details['scale'] = ['', None, None]
+        self.details['length'] = ['[A]', None, None]
+        self.details['kuhn_length'] = ['[A]', None, None]
+        self.details['radius'] = ['[A]', None, None]
+        self.details['axis_ratio'] = ['', None, None]
+        self.details['sldCyl'] = ['[1/A^(2)]', None, None]
+        self.details['sldSolv'] = ['[1/A^(2)]', None, None]
+        self.details['background'] = ['[1/cm]', None, None]
+
+        ## fittable parameters
+        self.fixed=['length.width', 'kuhn_length.width', 'radius.width', 'axis_ratio.width']
+        
+        ## parameters with orientation
+        self.orientation_params =[]
+   
+    def clone(self):
+        """ Return a identical copy of self """
+        return self._clone(FlexCylEllipXModel())   
+        
+    def __getstate__(self):
+        """ return object state for pickling and copying """
+        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log}
+        
+        return self.__dict__, model_state
+        
+    def __setstate__(self, state):
+        """ create object from pickled state """
+        
+        self.__dict__, model_state = state
+        self.params = model_state['params']
+        self.dispersion = model_state['dispersion']
+        self.log = model_state['log']
+       	
+   
+    def run(self, x = 0.0):
+        """ Evaluate the model
+            @param x: input q, or [q,phi]
+            @return: scattering function P(q)
+        """
+        
+        return CFlexCylEllipXModel.run(self, x)
+   
+    def runXY(self, x = 0.0):
+        """ Evaluate the model in cartesian coordinates
+            @param x: input q, or [qx, qy]
+            @return: scattering function P(q)
+        """
+        
+        return CFlexCylEllipXModel.runXY(self, x)
+        
+    def evalDistribution(self, x = []):
+        """ Evaluate the model in cartesian coordinates
+            @param x: input q[], or [qx[], qy[]]
+            @return: scattering function P(q[])
+        """
+        return CFlexCylEllipXModel.evalDistribution(self, x)
+        
+    def calculate_ER(self):
+        """ Calculate the effective radius for P(q)*S(q)
+            @return: the value of the effective radius
+        """       
+        return CFlexCylEllipXModel.calculate_ER(self)
+        
+    def set_dispersion(self, parameter, dispersion):
+        """
+            Set the dispersion object for a model parameter
+            @param parameter: name of the parameter [string]
+            @dispersion: dispersion object of type DispersionModel
+        """
+        return CFlexCylEllipXModel.set_dispersion(self, parameter, dispersion.cdisp)
+        
+   
+# End of file
Index: sansmodels/src/sans/models/FlexibleCylinderModel.py
===================================================================
--- sansmodels/src/sans/models/FlexibleCylinderModel.py	(revision f10063e8f3c53d2be93abaea9c0d3d4f3061d444)
+++ sansmodels/src/sans/models/FlexibleCylinderModel.py	(revision ec658c856bb1b403622acc98b5528f12702b6f5b)
@@ -36,6 +36,6 @@
          kuhn_length     = 100.0 [A]
          radius          = 20.0 [A]
-         sldCyl          = 6.3e-006 [1/A^(2)]
-         sldSolv         = 1e-006 [1/A^(2)]
+         sldCyl          = 1e-006 [1/A^(2)]
+         sldSolv         = 6.3e-006 [1/A^(2)]
          background      = 0.0001 [1/cm]
 
@@ -52,5 +52,5 @@
         self.name = "FlexibleCylinderModel"
         ## Model description
-        self.description =""" Note : 'scale' and 'contrast' are both multiplicative factors in the
+        self.description =""" Note : scale and contrast=sldCyl-sldSolv are both multiplicative factors in the
 		model and are perfectly correlated. One or
 		both of these parameters must be held fixed
Index: sansmodels/src/sans/models/FractalModel.py
===================================================================
--- sansmodels/src/sans/models/FractalModel.py	(revision 27972c1dfdd57a50946a99914051e1713c997e78)
+++ sansmodels/src/sans/models/FractalModel.py	(revision ec658c856bb1b403622acc98b5528f12702b6f5b)
@@ -1,28 +1,43 @@
 #!/usr/bin/env python
-""" 
-    
-    Provide F(x)= P(x)*S(x) + bkd
-    Fractal as a BaseComponent model
+"""
+	This software was developed by the University of Tennessee as part of the
+	Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
+	project funded by the US National Science Foundation.
+
+	If you use DANSE applications to do scientific research that leads to
+	publication, we ask that you acknowledge the use of the software with the
+	following sentence:
+
+	"This work benefited from DANSE software developed under NSF award DMR-0520547."
+
+	copyright 2008, University of Tennessee
+"""
+
+""" Provide functionality for a C extension model
+
+	WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
+ 	         DO NOT MODIFY THIS FILE, MODIFY ..\c_extensions\fractal.h
+ 	         AND RE-RUN THE GENERATOR SCRIPT
+
 """
 
 from sans.models.BaseComponent import BaseComponent
-import math
-from scipy.special import gamma
+from sans_extension.c_models import CFractalModel
+import copy    
+    
+class FractalModel(CFractalModel, BaseComponent):
+    """ Class that evaluates a FractalModel model. 
+        This file was auto-generated from ..\c_extensions\fractal.h.
+        Refer to that file and the structure it contains
+        for details of the model.
+        List of default parameters:
+         scale           = 0.05 
+         radius          = 5.0 [A]
+         fractal_dim     = 2.0 
+         cor_length      = 100.0 [A]
+         sldBlock        = 2e-006 [1/A^(2)]
+         sldSolv         = 6.35e-006 [1/A^(2)]
+         background      = 0.0 [1/cm]
 
-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
-           
     """
         
@@ -30,139 +45,95 @@
         """ Initialization """
         
-        # Initialize BaseComponent first, then fractal
+        # Initialize BaseComponent first, then sphere
         BaseComponent.__init__(self)
+        CFractalModel.__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
-        
-
+        self.name = "FractalModel"
+        ## Model description
+        self.description =""" The scattering intensity  I(x) = P(|x|)*S(|x|) + background, where
+		p(x)= scale * V * delta^(2)* F(x*radius)^(2)
+		F(x) = 3*[sin(x)-x cos(x)]/x**3
+		where delta = sldBlock -sldSolv.
+		scale        =  scale factor * Volume fraction
+		radius       =  Block radius
+		fractal_dim  =  Fractal dimension
+		cor_length  =  Correlation Length
+		sldBlock    =  SDL block
+		sldSolv  =  SDL solvent
+		background   =  background"""
+       
         ## 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)
+        self.details['scale'] = ['', None, None]
+        self.details['radius'] = ['[A]', None, None]
+        self.details['fractal_dim'] = ['', None, None]
+        self.details['cor_length'] = ['[A]', None, None]
+        self.details['sldBlock'] = ['[1/A^(2)]', None, None]
+        self.details['sldSolv'] = ['[1/A^(2)]', None, None]
+        self.details['background'] = ['[1/cm]', None, None]
 
-    
-    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))
+        ## fittable parameters
+        self.fixed=[]
         
-    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']
+        ## parameters with orientation
+        self.orientation_params =[]
+   
+    def clone(self):
+        """ Return a identical copy of self """
+        return self._clone(FractalModel())   
         
-        return 1.0e8*self.params['scale']* V *(delta**2)*\
-                (self._Spherical(x*self.params['radius'])**2)
+    def __getstate__(self):
+        """ return object state for pickling and copying """
+        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log}
         
+        return self.__dict__, model_state
+        
+    def __setstate__(self, state):
+        """ create object from pickled state """
+        
+        self.__dict__, model_state = state
+        self.params = model_state['params']
+        self.dispersion = model_state['dispersion']
+        self.log = model_state['log']
+       	
+   
     def run(self, x = 0.0):
         """ Evaluate the model
-            @param x: input q-value (float or [float, float] as [r, theta])
-            @return: (Fractal value)
+            @param x: input q, or [q,phi]
+            @return: scattering function P(q)
         """
-        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)
+        
+        return CFractalModel.run(self, 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
+        """ Evaluate the model in cartesian coordinates
+            @param x: input q, or [qx, qy]
+            @return: scattering function P(q)
         """
-        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)
+        
+        return CFractalModel.runXY(self, x)
+        
+    def evalDistribution(self, x = []):
+        """ Evaluate the model in cartesian coordinates
+            @param x: input q[], or [qx[], qy[]]
+            @return: scattering function P(q[])
+        """
+        return CFractalModel.evalDistribution(self, x)
+        
+    def calculate_ER(self):
+        """ Calculate the effective radius for P(q)*S(q)
+            @return: the value of the effective radius
+        """       
+        return CFractalModel.calculate_ER(self)
+        
+    def set_dispersion(self, parameter, dispersion):
+        """
+            Set the dispersion object for a model parameter
+            @param parameter: name of the parameter [string]
+            @dispersion: dispersion object of type DispersionModel
+        """
+        return CFractalModel.set_dispersion(self, parameter, dispersion.cdisp)
+        
+   
+# End of file
Index: sansmodels/src/sans/models/FuzzySphereModel.py
===================================================================
--- sansmodels/src/sans/models/FuzzySphereModel.py	(revision ec658c856bb1b403622acc98b5528f12702b6f5b)
+++ sansmodels/src/sans/models/FuzzySphereModel.py	(revision ec658c856bb1b403622acc98b5528f12702b6f5b)
@@ -0,0 +1,136 @@
+#!/usr/bin/env python
+"""
+	This software was developed by the University of Tennessee as part of the
+	Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
+	project funded by the US National Science Foundation.
+
+	If you use DANSE applications to do scientific research that leads to
+	publication, we ask that you acknowledge the use of the software with the
+	following sentence:
+
+	"This work benefited from DANSE software developed under NSF award DMR-0520547."
+
+	copyright 2008, University of Tennessee
+"""
+
+""" Provide functionality for a C extension model
+
+	WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
+ 	         DO NOT MODIFY THIS FILE, MODIFY ..\c_extensions\fuzzysphere.h
+ 	         AND RE-RUN THE GENERATOR SCRIPT
+
+"""
+
+from sans.models.BaseComponent import BaseComponent
+from sans_extension.c_models import CFuzzySphereModel
+import copy    
+    
+class FuzzySphereModel(CFuzzySphereModel, BaseComponent):
+    """ Class that evaluates a FuzzySphereModel model. 
+        This file was auto-generated from ..\c_extensions\fuzzysphere.h.
+        Refer to that file and the structure it contains
+        for details of the model.
+        List of default parameters:
+         scale           = 0.01 
+         radius          = 60.0 [A]
+         fuzziness       = 10.0 [A]
+         sldSph          = 1e-006 [1/A^(2)]
+         sldSolv         = 3e-006 [1/A^(2)]
+         background      = 0.001 [1/cm]
+
+    """
+        
+    def __init__(self):
+        """ Initialization """
+        
+        # Initialize BaseComponent first, then sphere
+        BaseComponent.__init__(self)
+        CFuzzySphereModel.__init__(self)
+        
+        ## Name of the model
+        self.name = "FuzzySphereModel"
+        ## Model description
+        self.description ="""
+		scale: scale factor times volume fraction,
+		or just volume fraction for absolute scale data
+		radius: radius of the solid sphere
+		fuzziness = the STD of the height of fuzzy interfacial
+		thickness (ie., so-called interfacial roughness)
+		sldSph: the SLD of the sphere
+		sldSolv: the SLD of the solvent
+		background: incoherent background
+		Note: By definition, this function works only when fuzziness << radius."""
+       
+        ## Parameter details [units, min, max]
+        self.details = {}
+        self.details['scale'] = ['', None, None]
+        self.details['radius'] = ['[A]', None, None]
+        self.details['fuzziness'] = ['[A]', None, None]
+        self.details['sldSph'] = ['[1/A^(2)]', None, None]
+        self.details['sldSolv'] = ['[1/A^(2)]', None, None]
+        self.details['background'] = ['[1/cm]', None, None]
+
+        ## fittable parameters
+        self.fixed=['radius.width', 'fuzziness.width']
+        
+        ## parameters with orientation
+        self.orientation_params =[]
+   
+    def clone(self):
+        """ Return a identical copy of self """
+        return self._clone(FuzzySphereModel())   
+        
+    def __getstate__(self):
+        """ return object state for pickling and copying """
+        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log}
+        
+        return self.__dict__, model_state
+        
+    def __setstate__(self, state):
+        """ create object from pickled state """
+        
+        self.__dict__, model_state = state
+        self.params = model_state['params']
+        self.dispersion = model_state['dispersion']
+        self.log = model_state['log']
+       	
+   
+    def run(self, x = 0.0):
+        """ Evaluate the model
+            @param x: input q, or [q,phi]
+            @return: scattering function P(q)
+        """
+        
+        return CFuzzySphereModel.run(self, x)
+   
+    def runXY(self, x = 0.0):
+        """ Evaluate the model in cartesian coordinates
+            @param x: input q, or [qx, qy]
+            @return: scattering function P(q)
+        """
+        
+        return CFuzzySphereModel.runXY(self, x)
+        
+    def evalDistribution(self, x = []):
+        """ Evaluate the model in cartesian coordinates
+            @param x: input q[], or [qx[], qy[]]
+            @return: scattering function P(q[])
+        """
+        return CFuzzySphereModel.evalDistribution(self, x)
+        
+    def calculate_ER(self):
+        """ Calculate the effective radius for P(q)*S(q)
+            @return: the value of the effective radius
+        """       
+        return CFuzzySphereModel.calculate_ER(self)
+        
+    def set_dispersion(self, parameter, dispersion):
+        """
+            Set the dispersion object for a model parameter
+            @param parameter: name of the parameter [string]
+            @dispersion: dispersion object of type DispersionModel
+        """
+        return CFuzzySphereModel.set_dispersion(self, parameter, dispersion.cdisp)
+        
+   
+# End of file
Index: sansmodels/src/sans/models/Poly_GaussCoil.py
===================================================================
--- sansmodels/src/sans/models/Poly_GaussCoil.py	(revision ec658c856bb1b403622acc98b5528f12702b6f5b)
+++ sansmodels/src/sans/models/Poly_GaussCoil.py	(revision ec658c856bb1b403622acc98b5528f12702b6f5b)
@@ -0,0 +1,130 @@
+#!/usr/bin/env python
+"""
+	This software was developed by the University of Tennessee as part of the
+	Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
+	project funded by the US National Science Foundation.
+
+	If you use DANSE applications to do scientific research that leads to
+	publication, we ask that you acknowledge the use of the software with the
+	following sentence:
+
+	"This work benefited from DANSE software developed under NSF award DMR-0520547."
+
+	copyright 2008, University of Tennessee
+"""
+
+""" Provide functionality for a C extension model
+
+	WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
+ 	         DO NOT MODIFY THIS FILE, MODIFY ..\c_extensions\polygausscoil.h
+ 	         AND RE-RUN THE GENERATOR SCRIPT
+
+"""
+
+from sans.models.BaseComponent import BaseComponent
+from sans_extension.c_models import CPoly_GaussCoil
+import copy    
+    
+class Poly_GaussCoil(CPoly_GaussCoil, BaseComponent):
+    """ Class that evaluates a Poly_GaussCoil model. 
+        This file was auto-generated from ..\c_extensions\polygausscoil.h.
+        Refer to that file and the structure it contains
+        for details of the model.
+        List of default parameters:
+         scale           = 1.0 
+         rg              = 60.0 [A]
+         poly_m          = 2.0 [Mw/Mn]
+         background      = 0.001 [1/cm]
+
+    """
+        
+    def __init__(self):
+        """ Initialization """
+        
+        # Initialize BaseComponent first, then sphere
+        BaseComponent.__init__(self)
+        CPoly_GaussCoil.__init__(self)
+        
+        ## Name of the model
+        self.name = "Poly_GaussCoil"
+        ## Model description
+        self.description ="""I(q)=(scale)*2*[(1+U*x)^(-1/U)+x-1]/[(1+U)*x^2]
+		+ background
+		where x = [rg^2*q^2] and the polydispersity is
+		U = [M_w/M_n]-1.
+		scale = scale factor * volume fraction
+		rg: radius of gyration
+		poly_m = polydispersity of molecular weight
+		background:incoherent background"""
+       
+        ## Parameter details [units, min, max]
+        self.details = {}
+        self.details['scale'] = ['', None, None]
+        self.details['rg'] = ['[A]', None, None]
+        self.details['poly_m'] = ['[Mw/Mn]', None, None]
+        self.details['background'] = ['[1/cm]', None, None]
+
+        ## fittable parameters
+        self.fixed=[]
+        
+        ## parameters with orientation
+        self.orientation_params =[]
+   
+    def clone(self):
+        """ Return a identical copy of self """
+        return self._clone(Poly_GaussCoil())   
+        
+    def __getstate__(self):
+        """ return object state for pickling and copying """
+        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log}
+        
+        return self.__dict__, model_state
+        
+    def __setstate__(self, state):
+        """ create object from pickled state """
+        
+        self.__dict__, model_state = state
+        self.params = model_state['params']
+        self.dispersion = model_state['dispersion']
+        self.log = model_state['log']
+       	
+   
+    def run(self, x = 0.0):
+        """ Evaluate the model
+            @param x: input q, or [q,phi]
+            @return: scattering function P(q)
+        """
+        
+        return CPoly_GaussCoil.run(self, x)
+   
+    def runXY(self, x = 0.0):
+        """ Evaluate the model in cartesian coordinates
+            @param x: input q, or [qx, qy]
+            @return: scattering function P(q)
+        """
+        
+        return CPoly_GaussCoil.runXY(self, x)
+        
+    def evalDistribution(self, x = []):
+        """ Evaluate the model in cartesian coordinates
+            @param x: input q[], or [qx[], qy[]]
+            @return: scattering function P(q[])
+        """
+        return CPoly_GaussCoil.evalDistribution(self, x)
+        
+    def calculate_ER(self):
+        """ Calculate the effective radius for P(q)*S(q)
+            @return: the value of the effective radius
+        """       
+        return CPoly_GaussCoil.calculate_ER(self)
+        
+    def set_dispersion(self, parameter, dispersion):
+        """
+            Set the dispersion object for a model parameter
+            @param parameter: name of the parameter [string]
+            @dispersion: dispersion object of type DispersionModel
+        """
+        return CPoly_GaussCoil.set_dispersion(self, parameter, dispersion.cdisp)
+        
+   
+# End of file
Index: sansmodels/src/sans/models/test/utest_models_new1_3.py
===================================================================
--- sansmodels/src/sans/models/test/utest_models_new1_3.py	(revision ec658c856bb1b403622acc98b5528f12702b6f5b)
+++ sansmodels/src/sans/models/test/utest_models_new1_3.py	(revision ec658c856bb1b403622acc98b5528f12702b6f5b)
@@ -0,0 +1,86 @@
+"""
+    Unit tests for specific models II
+"""
+
+import unittest, time, math
+     
+class TestFuzzySphere(unittest.TestCase):
+    """ Unit tests for fuzzysphere model """
+    
+    def setUp(self):
+        from sans.models.FuzzySphereModel import FuzzySphereModel
+        self.comp = FuzzySphereModel()
+        
+    def test1D(self):
+        """ Test 1D model for a fuzzysphere """
+        self.assertAlmostEqual(self.comp.run(1), 0.001, 3)
+        
+    def test1D_2(self):
+        """ Test 2D model for a fuzzysphere """
+        self.assertAlmostEqual(self.comp.run([1, 1.3]), 0.001, 3)
+        
+class TestPolyGaussCoil(unittest.TestCase):
+    """ Unit tests for PolyGaussCoil """
+    
+    def setUp(self):
+        from sans.models.Poly_GaussCoil import Poly_GaussCoil
+        self.comp = Poly_GaussCoil()
+        
+    def test1D(self):
+        """ Test 1D model for a PolyGaussCoil """
+        self.assertAlmostEqual(self.comp.run(0.107000453), 0.0688476, 4)
+        
+    def test1D_2(self):
+        """ Test 2D model for a PolyGaussCoil """
+        self.assertAlmostEqual(self.comp.run([0.107000453, 0.2]), 0.0688476, 4)
+                
+class TestCoreFourShellModel(unittest.TestCase):
+    """ Unit tests for CoreFourShellModel """
+    
+    def setUp(self):
+        from sans.models.CoreFourShellModel import CoreFourShellModel
+        self.comp = CoreFourShellModel()
+        
+    def test1D(self):
+        """ Test 1D model for a CoreFourShellModel """
+        print "sldsolv",self.comp.getParam("sld_solv")
+        self.assertAlmostEqual(self.comp.run(0.001), 3318.19548, 4)
+        
+    def test1D_2(self):
+        """ Test 2D model for a CoreFourShellModel """
+        self.assertAlmostEqual(self.comp.run([0.001, 0.2]), 3318.19548, 4)
+
+class TestFractal(unittest.TestCase):
+    """ Unit tests for Fractal model """
+    
+    def setUp(self):
+        from sans.models.FractalModel import FractalModel
+        self.comp = FractalModel()
+        
+    def test1D(self):
+        """ Test 1D model for a Fractal """
+        self.assertAlmostEqual(self.comp.run(0.001), 39.288146, 4)
+        
+    def test1D_2(self):
+        """ Test 2D model for a Fractal """
+        self.assertAlmostEqual(self.comp.run([0.001, 1]), 39.288146, 4)
+                                
+class TestLamella(unittest.TestCase):
+    """ Unit tests for Lamella model """
+    
+    def setUp(self):
+        from sans.models.LamellarModel import LamellarModel
+        self.comp = LamellarModel()
+        
+    def test1D(self):
+        """ Test 1D model for a Lamellar """
+        self.assertAlmostEqual(self.comp.run(1.0), 5.6387e-5, 4)
+        
+    def test1D_2(self):
+        """ Test 2D model for a Lamellar """
+        self.assertAlmostEqual(self.comp.run([1.0, 1.3]), 5.6387e-5, 4)
+                
+        
+
+if __name__ == '__main__':
+    unittest.main()
Index: sansmodels/src/sans/models/test/utest_nonshape.py
===================================================================
--- sansmodels/src/sans/models/test/utest_nonshape.py	(revision 8809e4829d357a9366a256b3595b75252de8b2c2)
+++ sansmodels/src/sans/models/test/utest_nonshape.py	(revision ec658c856bb1b403622acc98b5528f12702b6f5b)
@@ -474,9 +474,9 @@
         
         self.model.setParam('scale', self.phi) 
-        self.model.setParam('Radius', self.r0) 
+        self.model.setParam('radius', self.r0) 
         self.model.setParam('fractal_dim',self.Df)
-        self.model.setParam('corr_length', self.corr)
-        self.model.setParam('block_sld', self.sldp) 
-        self.model.setParam('solvent_sld', self.sldm) 
+        self.model.setParam('cor_length', self.corr)
+        self.model.setParam('sldBlock', self.sldp) 
+        self.model.setParam('sldSolv', self.sldm) 
         self.model.setParam('background', self.bck)
         
