Index: sansmodels/src/sans/models/BaseComponent.py
===================================================================
--- sansmodels/src/sans/models/BaseComponent.py	(revision 7fdb332db7da9478616e379581e7014dc9448a0e)
+++ sansmodels/src/sans/models/BaseComponent.py	(revision 318b5bbbcb046db18a8e953dccae04fc7b8a71e0)
@@ -39,4 +39,6 @@
         ## parameters with orientation
         self.orientation_params = []
+        ## magnetic parameters
+        self.magnetic_params = []
         ## store dispersity reference
         self._persistency_dict = {}
Index: sansmodels/src/sans/models/CoreMultiShellModel.py
===================================================================
--- sansmodels/src/sans/models/CoreMultiShellModel.py	(revision 279e37161048e12a618886d8865fcba5c0444dc2)
+++ sansmodels/src/sans/models/CoreMultiShellModel.py	(revision 318b5bbbcb046db18a8e953dccae04fc7b8a71e0)
@@ -13,10 +13,14 @@
     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
@@ -39,4 +43,6 @@
         #list of parameter that can be fitted
         self._set_fixed_params()  
+        self.orientation_params = []
+        self.magnetic_params = []
         
         ## functional multiplicity info of the model
@@ -45,7 +51,7 @@
         self.multiplicity_info = [max_nshells, "No. of Shells:", [], ['Radius']]
 
-        ## parameters with orientation:
-        for item in self.model.orientation_params:
-            self.orientation_params.append(item)
+        ## parameters with orientation: can be removed since there is no orientational params
+        self._set_orientation_params()
+                
         
     def _clone(self, obj):
@@ -62,4 +68,5 @@
         return obj
     
+    
     def _set_dispersion(self):
         """
@@ -70,8 +77,8 @@
         for name , value in self.model.dispersion.iteritems():      
             nshell = 0
-            if name.split('_')[0] == 'thick':
+            if name.split('_').count('thick') > 0:
                 while nshell < self.n_shells:
                     nshell += 1
-                    if name.split('_')[1] == 'shell%s' % str(nshell):
+                    if name.split('_')[-1] == 'shell%s' % str(nshell):
                         self.dispersion[name] = value
                     else: 
@@ -79,5 +86,23 @@
             else:
                 self.dispersion[name] = value
-                              
+                
+    def _set_orientation_params(self):
+        """
+        model orientation and magnetic parameters, same params for this model
+        """ 
+        ##set dispersion from model 
+        for param in self.model.orientation_params:     
+            nshell = 0
+            if param.split('_')[-1].count('shell') < 1:
+                #print "param", param, param.split('_')[-1].count('shell')
+                self.orientation_params.append(param)
+                self.magnetic_params.append(param)
+                continue
+            while nshell < self.n_shells:
+                nshell += 1
+                if param.split('_')[-1] == 'shell%s' % str(nshell):
+                    self.orientation_params.append(param)
+                    self.magnetic_params.append(param)
+                    continue                           
 
     def _set_params(self):
@@ -89,17 +114,18 @@
         for name , value in self.model.params.iteritems():
             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('_').count('thick') > 0 or \
+                        name.split('_').count('sld') > 0 or \
+                        name[0] == 'M':
+                if name.split('_')[-1] == 'solv' or \
+                        name.split('_')[-1] == 'core0':
+                    self.params[name]= value
                     continue
                 while nshell < self.n_shells:
                     nshell += 1
-                    if name.split('_')[1] == 'shell%s' % str(nshell):
-                        self.params[name] = value
+                    if name.split('_')[-1] == 'shell%s' % str(nshell):
+                        self.params[name]= value
                         continue
             else:
-                self.params[name] = value
-            
+                self.params[name]= value
             
         # set constrained values for the original model params
@@ -113,5 +139,5 @@
         for name ,detail in self.model.details.iteritems():
             if name in self.params.iterkeys():
-                self.details[name] = detail
+                self.details[name]= detail
             
     
@@ -123,17 +149,19 @@
         for key in self.model.params.iterkeys():
             if key not in self.params.keys():
-                if  key.split('_')[0] == 'thick':
+                if  key.split('_').count('thick') > 0:
                     self.model.setParam(key, 0)
                     continue
 
                 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('_').count('sld') > 0 and \
+                            key.split('_')[-1] == 'shell%s' % str(nshell+1):
                         try:
-                            value = self.model.params['sld_solv']
-                            self.model.setParam(key, value)
-                        except:
-                            message = "CoreMultiShellModel evaluation problem"
-                            raise RuntimeError, message
+                            if key[0] != 'M':
+                                value = self.model.params['sld_solv']
+                                self.model.setParam(key, value)
+                            else:
+                                self.model.setParam(key, 0.0)
+                        except: pass
+                     
 
     def getProfile(self):
@@ -187,9 +215,12 @@
         ## setParam to model 
         if name == 'sld_solv':
-            # the sld_*** model.params not in params 
-            # must set to value of 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)
+                if key not in self.params.keys():
+                    if key.split('_')[0] == 'sld':
+                        self.model.setParam(key, value)
+                    elif key.split('_')[1] == 'sld':
+                        # mag params
+                        self.model.setParam(key, 0.0)
         self.model.setParam( name, value)
 
@@ -213,5 +244,5 @@
                 return
         
-        raise ValueError, "Model does not contain parameter %s" % name
+        #raise ValueError, "Model does not contain parameter %s" % name
              
    
@@ -250,5 +281,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
@@ -259,5 +290,23 @@
         # set effective radius and scaling factor before run
         return self.model.evalDistribution(x)
-
+    
+    def calculate_ER(self):
+        """ 
+        Calculate the effective radius for P(q)*S(q)
+        
+        :return: the value of the effective radius
+        
+        """       
+        return self.model.calculate_ER() 
+    
+    def calculate_VR(self):
+        """ 
+        Calculate the volf ratio for P(q)*S(q)
+        
+        :return: the value of the volf ratio
+        
+        """       
+        return self.model.calculate_VR()
+    
     def set_dispersion(self, parameter, dispersion):
         """
Index: sansmodels/src/sans/models/MultiplicationModel.py
===================================================================
--- sansmodels/src/sans/models/MultiplicationModel.py	(revision ae4c139f6e3b933a4b1db5f05161d532a3b17650)
+++ sansmodels/src/sans/models/MultiplicationModel.py	(revision 318b5bbbcb046db18a8e953dccae04fc7b8a71e0)
@@ -36,5 +36,5 @@
         self.p_model = p_model
         self.s_model = s_model        
-       
+        self.magnetic_params = []
         ## dispersion
         self._set_dispersion()
@@ -53,5 +53,6 @@
         for item in self.p_model.orientation_params:
             self.orientation_params.append(item)
-            
+        for item in self.p_model.magnetic_params:  
+            self.magnetic_params.append(item) 
         for item in self.s_model.orientation_params:
             if not item in self.orientation_params:
Index: sansmodels/src/sans/models/media/model_functions.html
===================================================================
--- sansmodels/src/sans/models/media/model_functions.html	(revision 657e52c6e801e630d2fc6f1722a752b701d20771)
+++ sansmodels/src/sans/models/media/model_functions.html	(revision 318b5bbbcb046db18a8e953dccae04fc7b8a71e0)
@@ -7,6 +7,6 @@
 <ul style="margin-top: 0in;" type="disc">
 <li style="line-height: 115%;"><a href="#Introduction"><strong>Introduction</strong></a></li>
-<li style="line-height: 115%;"><a href="#Shapes"><strong>Shapes</strong></a>: <a href="#SphereModel">SphereModel</a>, <a href="#BinaryHSModel">BinaryHSModel</a>, <a href="#FuzzySphereModel">FuzzySphereModel</a>, <a href="#RaspBerryModel">RaspBerryModel</a>, <a href="#CoreShellModel">CoreShellModel</a>,&nbsp;<a href="#Core2ndMomentModel">Core2ndMomentModel</a>, <a href="#CoreMultiShellModel">CoreMultiShellModel</a>, <a href="#VesicleModel">VesicleModel</a>, <a href="#MultiShellModel">MultiShellModel</a>, &nbsp;<a href="#OnionExpShellModel">OnionExpShellModel</a>, <a href="#SphericalSLDModel">SphericalSLDModel</a>, <a href="#LinearPearlsModel">LinearPearlsModel</a>, <a href="#PearlNecklaceModel">PearlNecklaceModel</a> , <a href="#CylinderModel">CylinderModel</a>, <a href="#CoreShellCylinderModel">CoreShellCylinderModel</a>, <a href="#CoreShellBicelleModel">CoreShellBicelleModel</a>,<a href="#HollowCylinderModel">HollowCylinderModel</a>, <a href="#FlexibleCylinderModel">FlexibleCylinderModel</a>, <a href="#FlexibleCylinderModel">FlexCylEllipXModel</a>, <a href="#StackedDisksModel">StackedDisksModel</a>, <a href="#ParallelepipedModel">ParallelepipedModel</a>, <a href="#CSParallelepipedModel">CSParallelepipedModel</a>, <a href="#EllipticalCylinderModel">EllipticalCylinderModel</a>, <a href="#BarBellModel">BarBellModel</a>, <a href="#CappedCylinderModel">CappedCylinderModel</a>, <a href="#EllipsoidModel">EllipsoidModel</a>, <a href="#CoreShellEllipsoidModel">CoreShellEllipsoidModel</a>, <a href="#TriaxialEllipsoidModel">TriaxialEllipsoidModel</a>, <a href="#LamellarModel">LamellarModel</a>, <a href="#LamellarFFHGModel">LamellarFFHGModel</a>, <a href="#LamellarPSModel">LamellarPSModel</a>, <a href="#LamellarPSHGModel">LamellarPSHGModel</a>, <a href="#LamellarPCrystalModel">LamellarPCrystalModel</a>, <a href="#SCCrystalModel">SCCrystalModel</a>, <a href="#FCCrystalModel">FCCrystalModel</a>, <a href="#BCCrystalModel">BCCrystalModel</a>.</li>
-<li style="line-height: 115%;"><a href="#Shape-Independent"><strong>Shape-Independent</strong></a>: <a href="#Absolute%20Power_Law">AbsolutePower_Law</a>, <a href="#BEPolyelectrolyte">BEPolyelectrolyte</a>, <a href="#BroadPeakModel">BroadPeakModel,<span><span style="text-decoration: underline;"><span style="color: blue;">CorrLength</span></span></span><span>,</span></a> <a href="#DABModel">DAB_Model</a>, <a href="#Debye">Debye</a>, <a href="#Number_Density_Fractal">FractalModel</a>, <a href="#FractalCoreShell">FractalCoreShell</a>, <a href="#GaussLorentzGel">GaussLorentzGel</a>, <a href="#Guinier">Guinier</a>, <a href="#GuinierPorod">GuinierPorod</a>, <a href="#Lorentz">Lorentz</a>, <a href="#Mass_Fractal">MassFractalModel</a>, <a href="#MassSurface_Fractal">MassSurfaceFractal</a>, <a href="#Peak%20Gauss%20Model">PeakGaussModel</a>, <a href="#Peak%20Lorentz%20Model">PeakLorentzModel</a>, <a href="#Poly_GaussCoil">Poly_GaussCoil</a>, <a href="#PolymerExclVolume">PolyExclVolume</a>, <a href="#PorodModel">PorodModel</a>, <a href="#RPA10Model">RPA10Model</a>, <a href="#StarPolymer">StarPolymer</a>, <a href="#Surface_Fractal">SurfaceFractalModel</a>, <a href="#TeubnerStreyModel">Teubner Strey</a>, <a href="#TwoLorentzian">TwoLorentzian</a>, <a href="#TwoPowerLaw">TwoPowerLaw</a>, <a href="#UnifiedPowerRg">UnifiedPowerRg</a>, <a href="#LineModel">LineModel</a>, <a href="#ReflectivityModel">ReflectivityModel</a>, <a href="#ReflectivityIIModel">ReflectivityIIModel</a>, <a href="#GelFitModel">GelFitModel</a>.</li>
+<li style="line-height: 115%;"><a href="#Shapes"><strong>Shapes</strong></a>: <a href="#SphereModel">SphereModel (Magnetic 2D Model)</a>, <a href="#BinaryHSModel">BinaryHSModel</a>, <a href="#FuzzySphereModel">FuzzySphereModel</a>, <a href="#RaspBerryModel">RaspBerryModel</a>, <a href="#CoreShellModel">CoreShellModel (Magnetic 2D Model)</a>,&nbsp;<a href="#Core2ndMomentModel">Core2ndMomentModel</a>, <a href="#CoreMultiShellModel">CoreMultiShellModel (Magnetic 2D Model)</a>, <a href="#VesicleModel">VesicleModel</a>, <a href="#MultiShellModel">MultiShellModel</a>, &nbsp;<a href="#OnionExpShellModel">OnionExpShellModel</a>, <a href="#SphericalSLDModel">SphericalSLDModel</a>, <a href="#LinearPearlsModel">LinearPearlsModel</a>, <a href="#PearlNecklaceModel">PearlNecklaceModel</a> , <a href="#CylinderModel">CylinderModel (Magnetic 2D Model)</a>, <a href="#CoreShellCylinderModel">CoreShellCylinderModel</a>, <a href="#CoreShellBicelleModel">CoreShellBicelleModel</a>,<a href="#HollowCylinderModel">HollowCylinderModel</a>, <a href="#FlexibleCylinderModel">FlexibleCylinderModel</a>, <a href="#FlexibleCylinderModel">FlexCylEllipXModel</a>, <a href="#StackedDisksModel">StackedDisksModel</a>, <a href="#ParallelepipedModel">ParallelepipedModel (Magnetic 2D Model)</a>, <a href="#CSParallelepipedModel">CSParallelepipedModel</a>, <a href="#EllipticalCylinderModel">EllipticalCylinderModel</a>, <a href="#BarBellModel">BarBellModel</a>, <a href="#CappedCylinderModel">CappedCylinderModel</a>, <a href="#EllipsoidModel">EllipsoidModel</a>, <a href="#CoreShellEllipsoidModel">CoreShellEllipsoidModel</a>, <a href="#TriaxialEllipsoidModel">TriaxialEllipsoidModel</a>, <a href="#LamellarModel">LamellarModel</a>, <a href="#LamellarFFHGModel">LamellarFFHGModel</a>, <a href="#LamellarPSModel">LamellarPSModel</a>, <a href="#LamellarPSHGModel">LamellarPSHGModel</a>, <a href="#LamellarPCrystalModel">LamellarPCrystalModel</a>, <a href="#SCCrystalModel">SCCrystalModel</a>, <a href="#FCCrystalModel">FCCrystalModel</a>, <a href="#BCCrystalModel">BCCrystalModel</a>.</li>
+<li style="line-height: 115%;"><a href="#Shape-Independent"><strong>Shape-Independent</strong></a>: <a href="#Absolute%20Power_Law">AbsolutePower_Law</a>, <a href="#BEPolyelectrolyte">BEPolyelectrolyte</a>, <a href="#BroadPeakModel">BroadPeakModel,<span><span style="text-decoration: underline;"><span style="color: blue;">CorrLength</span></span></span><span>,</span></a> <a href="#DABModel">DABModel</a>, <a href="#Debye">Debye</a>, <a href="#Number_Density_Fractal">FractalModel</a>, <a href="#FractalCoreShell">FractalCoreShell</a>, <a href="#GaussLorentzGel">GaussLorentzGel</a>, <a href="#Guinier">Guinier</a>, <a href="#GuinierPorod">GuinierPorod</a>, <a href="#Lorentz">Lorentz</a>, <a href="#Mass_Fractal">MassFractalModel</a>, <a href="#MassSurface_Fractal">MassSurfaceFractal</a>, <a href="#Peak%20Gauss%20Model">PeakGaussModel</a>, <a href="#Peak%20Lorentz%20Model">PeakLorentzModel</a>, <a href="#Poly_GaussCoil">Poly_GaussCoil</a>, <a href="#PolymerExclVolume">PolyExclVolume</a>, <a href="#PorodModel">PorodModel</a>, <a href="#RPA10Model">RPA10Model</a>, <a href="#StarPolymer">StarPolymer</a>, <a href="#Surface_Fractal">SurfaceFractalModel</a>, <a href="#TeubnerStreyModel">Teubner Strey</a>, <a href="#TwoLorentzian">TwoLorentzian</a>, <a href="#TwoPowerLaw">TwoPowerLaw</a>, <a href="#UnifiedPowerRg">UnifiedPowerRg</a>, <a href="#LineModel">LineModel</a>, <a href="#ReflectivityModel">ReflectivityModel</a>, <a href="#ReflectivityIIModel">ReflectivityIIModel</a>, <a href="#GelFitModel">GelFitModel</a>.</li>
 <li style="line-height: 115%;"><a href="#Model"><strong>Customized Models</strong></a>: <a href="#testmodel">testmodel</a>, <a href="#testmodel_2">testmodel_2</a>, <a href="#sum_p1_p2">sum_p1_p2</a>, <a href="#sum_Ap1_1_Ap2">sum_Ap1_1_Ap2</a>, <a href="#polynomial5">polynomial5</a>, <a href="#sph_bessel_jn">sph_bessel_jn</a>.</li>
 <li style="line-height: 115%;"><a href="#Structure_Factors"><strong>Structure Factors</strong></a>: <a href="#HardsphereStructure">HardSphereStructure</a>, <a href="#SquareWellStructure">SquareWellStructure</a>, <a href="#HayterMSAStructure">HayterMSAStructure</a>, <a href="#StickyHSStructure">StickyHSStructure</a>.</li>
@@ -17,6 +17,6 @@
 <p>&nbsp;Many of our models use the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research and thus some content and figures in this document are originated from or shared with the NIST Igor analysis package.</p>
 <p style="margin-left: 0.25in; text-indent: -0.25in;"><strong><span style="font-size: 16pt;">2.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp; </span></strong><a name="Shapes"></a><strong><span style="font-size: 16pt;">Shapes (Scattering Intensity Models)</span></strong></p>
-<p>This software provides form factors for various particle shapes. After giving a mathematical definition of each model, we draw the list of parameters available to the user. Validation plots for each model are also presented. Instructions on how to use the software is available with the source code, available from SVN:</p>
-<p style="text-indent: 0.25in;"><em>https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/</em></p>
+<p>This software provides form factors for various particle shapes. After giving a mathematical definition of each model, we draw the list of parameters available to the user. Validation plots for each model are also presented. Instructions on how to use the software is available with the source code.</p>
+
 <p>To easily compare to the scattering intensity measured in experiments, we normalize the form factors by the volume of the particle:</p>
 <p style="text-align: center;" align="center"><span style="position: relative; top: 12pt;"><img src="img/image001.PNG" alt="" /></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
@@ -27,6 +27,7 @@
 <p>Our so-called 1D scattering intensity functions provide <em>P(q) </em>for the case where the scatterer is randomly oriented. In that case, the scattering intensity only depends on the length of q. The intensity measured on the plane of the SANS detector will have an azimuthal symmetry around <em>q</em>=0.</p>
 <p>Our so-called 2D scattering intensity functions provide <em>P(q, </em><em><span style="font-family: 'Arial','sans-serif';">&phi;</span>)</em> for an oriented system as a function of a q-vector in the plane of the detector. We define the angle <span style="font-family: 'Arial','sans-serif';">&phi;</span> as the angle between the q vector and the horizontal (x) axis of the plane of the detector.</p>
-<p style="margin-left: 0.55in; text-indent: -0.3in;"><strong><span style="font-size: 14pt;">2.1.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="SphereModel"></a><strong><span style="font-size: 14pt;">Sphere Model</span></strong></p>
+<p style="margin-left: 0.55in; text-indent: -0.3in;"><strong><span style="font-size: 14pt;">2.1.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="SphereModel"></a><strong><span style="font-size: 14pt;">Sphere Model (Magnetic 2D Model)</span></strong></p>
 <p>This model provides the form factor, P(q), for a monodisperse spherical particle with uniform scattering length density. The form factor is normalized by the particle volume as described below.</p>
+For magnetic scattering, please see the '<a href="polar_mag_help.html">Polarization/Magnetic Scattering</a>' in Fitting Help.
 <p style="margin-left: 0.85in; text-indent: -0.35in;"><strong>1.1.</strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </span>Definition</strong></p>
 <p>The 1D scattering intensity is calculated in the following way (Guinier, 1955):</p>
@@ -242,5 +243,4 @@
 <p>where the amplitude A(q) is given as the typical sphere scattering convoluted with a Gaussian to get a gradual drop-off in the scattering length density:</p>
 <p style="text-align: center;" align="center"><span style="position: relative; top: 18pt;"><img src="img/image011.PNG" alt="" /></span></p>
-<br>
 <p>Here A2(q) is the form factor, P(q). The &lsquo;scale&rsquo; is equivalent to the volume fraction of spheres, each of volume, V. Contrast (<em><span style="font-family: 'Arial','sans-serif';">&Delta;</span>&rho;</em> ) is the difference of scattering length densities of the sphere and the surrounding solvent.</p>
 <p>The poly-dispersion in radius and in fuzziness is provided.</p>
@@ -453,6 +453,7 @@
 <p style="text-align: center;" align="center">&nbsp;</p>
 <p>&nbsp;</p>
-<p style="margin-left: 0.55in; text-indent: -0.3in;"><strong><span style="font-size: 14pt;">2.5.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="CoreShellModel"></a><strong><span style="font-size: 14pt;">Core Shell (Sphere) Model</span></strong></p>
+<p style="margin-left: 0.55in; text-indent: -0.3in;"><strong><span style="font-size: 14pt;">2.5.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="CoreShellModel"></a><strong><span style="font-size: 14pt;">Core Shell (Sphere) Model (Magnetic 2D Model)</span></strong></p>
 <p>This model provides the form factor, P(<em>q</em>), for a spherical particle with a core-shell structure. The form factor is normalized by the particle volume.</p>
+For magnetic scattering, please see the '<a href="polar_mag_help.html">Polarization/Magnetic Scattering</a>' in Fitting Help.
 <p style="margin-left: 0.85in; text-indent: -0.35in;"><strong>1.1.</strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </span>Definition</strong></p>
 <p>The 1D scattering intensity is calculated in the following way (Guinier, 1955):</p>
@@ -686,6 +687,7 @@
 <p>&nbsp;</p>
 <p style="text-align: center; page-break-after: avoid;" align="center"><img style="width: 526px; height: 333px;" src="img/secongm_fig1.jpg" alt="core_scondmoment_1D_validation" /></p>
-<p style="margin-left: 0.55in; text-indent: -0.3in;"><strong><span style="font-size: 14pt;">2.7.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="CoreMultiShellModel"></a><strong><span style="font-size: 14pt;">CoreMultiShell(Sphere)Model</span></strong></p>
+<p style="margin-left: 0.55in; text-indent: -0.3in;"><strong><span style="font-size: 14pt;">2.7.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="CoreMultiShellModel"></a><strong><span style="font-size: 14pt;">CoreMultiShell(Sphere)Model (Magnetic 2D Model)</span></strong></p>
 <p>This model provides the scattering from spherical core with from 1 up to 4 shell structures. It&nbsp;has a core of a specified radius, with four shells. The SLDs of the core and each shell are individually specified.&nbsp;</p>
+For magnetic scattering, please see the '<a href="polar_mag_help.html">Polarization/Magnetic Scattering</a>' in Fitting Help.
 <p style="margin-left: 0.85in; text-indent: -0.35in;"><strong>1.1.</strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </span>Definition</strong></p>
 <p>The returned value is scaled to units of [cm-1sr-1], absolute scale.</p>
@@ -1707,6 +1709,7 @@
 <p><a name="PearlNecklaceModel"></a>R. Schweins and K. Huber, &lsquo;Particle Scattering Factor of Pearl Necklace Chains&rsquo;, Macromol. Symp., 211, 25-42, 2004.</p>
 <p><a name="PearlNecklaceModel"></a>&nbsp;</p>
-<p style="margin-left: 0.55in; text-indent: -0.3in;"><a name="PearlNecklaceModel"></a><strong><span style="font-size: 14pt;">2.14.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="CylinderModel"></a><strong><span style="font-size: 14pt;">Cylinder Model</span></strong></p>
+<p style="margin-left: 0.55in; text-indent: -0.3in;"><a name="PearlNecklaceModel"></a><strong><span style="font-size: 14pt;">2.14.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="CylinderModel"></a><strong><span style="font-size: 14pt;">Cylinder Model (Magnetic 2D Model)</span></strong></p>
 <p>This model provides the form factor for a right circular cylinder with uniform scattering length density. The form factor is normalized by the particle volume.</p>
+For magnetic scattering, please see the '<a href="polar_mag_help.html">Polarization/Magnetic Scattering</a>' in Fitting Help.
 <p style="margin-left: 0.85in; text-indent: -0.35in;"><strong>1.1.</strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </span>Definition</strong></p>
 <p>The output of the 2D scattering intensity function for oriented cylinders is given by (Guinier, 1955):</p>
@@ -1715,8 +1718,11 @@
 <p>where <span style="font-family: 'Arial','sans-serif';">&alpha;</span> is the angle between the axis of the cylinder and the q-vector, V is the volume of the cylinder, L is the length of the cylinder, r is the radius of the cylinder, and <em><span style="font-family: 'Arial','sans-serif';">&Delta;</span>&rho;</em> (contrast) is the scattering length density difference between the scatterer and the solvent. J1 is the first order Bessel function.</p>
 <p>To provide easy access to the orientation of the cylinder, we define the axis of the cylinder using two angles theta and phi. Those angles are defined on Figure 2.</p>
-<p style="text-align: center; page-break-after: avoid;" align="center"><img src="img/image061.jpg" alt="cylinderangles.gif" width="478" height="258" /></p>
-<p style="text-align: center;" align="center"><a name="_Ref173213915"></a><a name="_Ref173306040"></a>Figure 2a. Definition of the angles for oriented cylinders.</p>
-<p style="text-align: center;" align="center"><img src="img/image062.jpg" alt="cylinderangles2.gif" width="464" height="313" /></p>
-<p style="text-align: center;" align="center">Figure 2b. Examples of the angles for oriented cylinders against the detector plane.</p>
+<p style="text-align: center; page-break-after: avoid;" align="center"><img src="img/image061.jpg" /></p>
+<p style="text-align: center;" align="center"><a name="_Ref173213915"></a><a name="_Ref173306040"></a>Figure 2. Definition of the angles for oriented cylinders.</p>
+
+<p style="text-align: center;" align="center"><img src="img/image062.jpg" alt="" width="379" height="256" /></p>
+<p style="text-align: center;" align="center">Figure. Examples of the angles for oriented pp against the detector plane.</p>
+
+
 <p>For P*S: The 2nd virial coefficient of the cylinder is calculate based on the radius and length values, and used as the effective radius toward S(Q) when P(Q)*S(Q) is applied.</p>
 <p>The returned value is scaled to units of [cm-1] and the parameters of the cylinder model are the following:</p>
@@ -1981,4 +1987,10 @@
 <p style="text-align: center; page-break-after: avoid;" align="center">&nbsp;</p>
 <p><a name="_Ref173307204"></a>Figure 9: Comparison of the intensity for uniformly distributed core-shell cylinders calculated from our 2D model and the intensity from the NIST SANS analysis software. The parameters used were: Scale=1.0, Radius=20 &Aring;, Thickness=10 &Aring;, Length=400 &Aring;, Core_sld=1e-6 &Aring; -2, Shell_sld=4e-6 &Aring; -2, Solvent_sld=1e-6 &Aring; -2, and Background=0.0 cm -1.</p>
+
+<p style="text-align: center; page-break-after: avoid;" align="center"><img src="img/image061.jpg" /></p>
+<p style="text-align: center;" align="center"><a name="_Ref173213915"></a><a name="_Ref173306040"></a>Figure. Definition of the angles for oriented core-shell cylinders.</p>
+<p style="text-align: center;" align="center"><img src="img/image062.jpg" alt="" width="379" height="256" /></p>
+<p style="text-align: center;" align="center">Figure. Examples of the angles for oriented pp against the detector plane.</p>
+
 <p style="margin-left: 0.55in; text-indent: -0.3in;"><strong><span style="font-size: 14pt;">2.16.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="CoreShellBicelleModel"></a><strong><span style="font-size: 14pt;">Core-Shell (Cylinder) Bicelle Model</span></strong></p>
 <p>This model provides the form factor for a circular cylinder with a core-shell scattering length density profile. The form factor is normalized by the particle volume. This model is a more general case of <a href="#CoreShellCylinderModel">core-shell cylinder model </a> (see&nbsp;above and reference below) in that the parameters of the shell are separated into a face-shell and a rim-shell so that users can set different values of the thicknesses and slds.&nbsp;</p>
@@ -2127,4 +2139,13 @@
 <p style="text-align: center;" align="center"><img id="cscylbicelle" style="width: 512px; height: 377px;" src="img/cscylbicelle_pic.jpg" alt="" /></p>
 <p style="text-align: center;" align="center"><strong>Figure. 1D plot using the default values (w/200 data point).</strong></p>
+
+
+<p style="text-align: center; page-break-after: avoid;" align="center"><img src="img/image061.jpg" /></p>
+<p style="text-align: center;" align="center"><a name="_Ref173213915"></a><a name="_Ref173306040"></a>Figure. Definition of the angles for the 
+oriented Core-Shell Cylinder Bicelle Model.</p>
+<p style="text-align: center;" align="center"><img src="img/image062.jpg" alt="" width="379" height="256" /></p>
+<p style="text-align: center;" align="center">Figure. Examples of the angles for oriented pp against the detector plane.</p>
+
+
 <p>&nbsp;REFERENCE<br /> Feigin, L. A, and D. I. Svergun, "Structure Analysis by Small-Angle X-Ray and Neutron Scattering", Plenum Press, New York, (1987).</p>
 <p style="margin-left: 0.55in; text-indent: -0.3in;"><strong><span style="font-size: 14pt;">2.17.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="HollowCylinderModel"></a><strong><span style="font-size: 14pt;">HollowCylinderModel</span></strong></p>
@@ -2237,4 +2258,11 @@
 <p style="text-align: center;" align="center"><strong>Figure. 1D plot using the default values (w/1000 data point).</strong></p>
 <p>Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research (Kline, 2006).</p>
+
+<p style="text-align: center; page-break-after: avoid;" align="center"><img src="img/image061.jpg" /></p>
+<p style="text-align: center;" align="center"><a name="_Ref173213915"></a><a name="_Ref173306040"></a>Figure. Definition of the angles for the 
+oriented HollowCylinderModel.</p>
+<p style="text-align: center;" align="center"><img src="img/image062.jpg" alt="" width="379" height="256" /></p>
+<p style="text-align: center;" align="center">Figure. Examples of the angles for oriented pp against the detector plane.</p>
+
 <p>REFERENCE</p>
 <p>Feigin, L. A, and D. I. Svergun, "Structure Analysis by Small-Angle X-Ray and Neutron Scattering", Plenum Press, New York, (1987).</p>
@@ -2341,4 +2369,5 @@
 <p style="text-align: center;" align="center"><img id="Picture 228" src="img/image076.jpg" alt="" width="465" height="345" /></p>
 <p style="text-align: center;" align="center"><strong>Figure. 1D plot using the default values (w/1000 data point).</strong></p>
+
 <p>Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research (Kline, 2006):</p>
 <p>From the reference, "Method 3 With Excluded Volume" is used. The model is a parametrization of simulations of a discrete representation of the worm-like chain model of Kratky and Porod applied in the pseudocontinuous limit.&nbsp; See equations (13,26-27) in the original reference for the details.</p>
@@ -2616,6 +2645,11 @@
 <p style="text-align: center;" align="center"><img src="img/image085.jpg" alt="" width="451" height="334" /></p>
 <p style="text-align: center;" align="center"><strong>Figure. 1D plot using the default values (w/1000 data point).</strong></p>
-<p style="text-align: center;" align="center"><img id="Picture 101" src="img/image086.jpg" alt="" width="377" height="215" /></p>
+<p style="text-align: center;" align="center"><img id="Picture 101" src="img/image086.jpg"  /></p>
 <p style="text-align: center;" align="center">Figure. Examples of the angles for oriented stackeddisks against the detector plane.</p>
+
+<p style="text-align: center;" align="center"><img src="img/image062.jpg" alt="" width="379" height="256" /></p>
+<p style="text-align: center;" align="center">Figure. Examples of the angles for oriented pp against the detector plane.</p>
+
+
 <p>Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research (Kline, 2006):</p>
 <p>REFERENCE</p>
@@ -2623,6 +2657,7 @@
 <p>Kratky, O. and Porod, G., J. Colloid Science, 4, 35, 1949.</p>
 <p>Higgins, J.S. and Benoit, H.C., "Polymers and Neutron Scattering", Clarendon, Oxford, 1994.</p>
-<p style="margin-left: 0.55in; text-indent: -0.3in;"><strong><span style="font-size: 14pt;">2.21.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="ParallelepipedModel"></a><strong><span style="font-size: 14pt;">ParallelepipedModel</span></strong></p>
+<p style="margin-left: 0.55in; text-indent: -0.3in;"><strong><span style="font-size: 14pt;">2.21.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="ParallelepipedModel"></a><strong><span style="font-size: 14pt;">ParallelepipedModel (Magnetic 2D Model) </span></strong></p>
 <p>This model provides the form factor, P(<em>q</em>), for a rectangular cylinder (below) where the form factor is normalized by the volume of the cylinder. P(q) = scale*&lt;f^2&gt;/V+background where the volume V= ABC and the averaging &lt; &gt;&nbsp; is applied over all orientation for 1D. &nbsp;</p>
+For magnetic scattering, please see the '<a href="polar_mag_help.html">Polarization/Magnetic Scattering</a>' in Fitting Help.
 <p><span style="font-size: 14pt;">&nbsp;</span></p>
 <p style="text-align: center;" align="center"><img src="img/image087.jpg" alt="" width="326" height="247" /></p>
@@ -2636,5 +2671,5 @@
 <p>For P*S: The 2nd virial coefficient of the solid cylinder is calculate based on the averaged effective radius (= sqrt(short_a*short_b/pi)) and length( = long_c) values, and used as the effective radius toward S(Q) when P(Q)*S(Q) is applied.</p>
 <p>To provide easy access to the orientation of the parallelepiped, we define the axis of the cylinder using two angles &theta; , <span style="font-family: 'Arial','sans-serif';">&phi; </span>and<span style="font-family: Symbol;">Y</span>. Similarly to the case of the cylinder, those angles, &theta; &nbsp;and <span style="font-family: 'Arial','sans-serif';">&phi;,</span> are defined on Figure 2 of CylinderModel. The angle <span style="font-family: Symbol;">Y </span>is the rotational angle around its own long_c axis against the q plane. For example, <span style="font-family: Symbol;">Y </span>= 0 when the short_b axis is parallel to the x-axis of the detector.</p>
-<p style="text-align: center;" align="center"><img src="img/image090.jpg" alt="" width="352" height="264" /></p>
+<p style="text-align: center;" align="center"><img src="img/image090.jpg"/></p>
 <p style="text-align: center;" align="center"><strong>Figure. Definition of angles for 2D</strong>.</p>
 <p style="text-align: center;" align="center"><img src="img/image091.jpg" alt="" width="379" height="256" /></p>
@@ -2749,5 +2784,5 @@
 <p>For P*S: The 2nd virial coefficient of this CSPP is calculate based on the averaged effective radius (= sqrt((short_a+2*rim_a)*(short_b+2*rim_b)/pi)) and length( = long_c+2*rim_c) values, and used as the effective radius toward S(Q) when P(Q)*S(Q) is applied.</p>
 <p>To provide easy access to the orientation of the CSparallelepiped, we define the axis of the cylinder using two angles &theta; , <span style="font-family: 'Arial','sans-serif';">&phi; </span>and<span style="font-family: Symbol;">Y</span>. Similarly to the case of the cylinder, those angles, &theta; &nbsp;and <span style="font-family: 'Arial','sans-serif';">&phi;,</span> are defined on Figure 2 of CylinderModel. The angle <span style="font-family: Symbol;">Y </span>is the rotational angle around its own long_c axis against the q plane. For example, <span style="font-family: Symbol;">Y </span>= 0 when the short_b axis is parallel to the x-axis of the detector.</p>
-<p style="text-align: center;" align="center"><img id="Picture 102" src="img/image090.jpg" alt="" width="352" height="264" /></p>
+<p style="text-align: center;" align="center"><img id="Picture 102" src="img/image090.jpg" /></p>
 <p style="text-align: center;" align="center"><strong>Figure. Definition of angles for 2D</strong>.</p>
 <p style="text-align: center;" align="center"><img id="Picture 103" src="img/image091.jpg" alt="" width="379" height="256" /></p>
@@ -2918,4 +2953,5 @@
 <p style="text-align: center;" align="center"><img id="Picture 34" src="img/image097.jpg" alt="" width="451" height="339" /></p>
 <p style="text-align: center;" align="center"><strong>Figure. 2D plot using the default values (w/(256X265) data points).</strong></p>
+
 <p>Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research (Kline, 2006):</p>
 <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; REFERENCE</p>
@@ -2940,7 +2976,7 @@
 <p>To provide easy access to the orientation of the elliptical, we define the axis of the cylinder using two angles &theta; , <span style="font-family: 'Arial','sans-serif';">&phi; </span>and<span style="font-family: Symbol;">Y</span>. Similarly to the case of the cylinder, those angles, &theta; &nbsp;and <span style="font-family: 'Arial','sans-serif';">&phi;,</span> are defined on Figure 2 of CylinderModel. The angle <span style="font-family: Symbol;">Y </span>is the rotational angle around its own long_c axis against the q plane. For example, <span style="font-family: Symbol;">Y </span>= 0 when the r_minor axis is parallel to the x-axis of the detector.</p>
 <p>All angle parameters are valid and given only for 2D calculation (Oriented system).</p>
-<p style="text-align: center;" align="center"><img id="Picture 105" src="img/image101.jpg" alt="" width="370" height="277" /></p>
+<p style="text-align: center;" align="center"><img id="Picture 105" src="img/image101.jpg" /></p>
 <p style="text-align: center;" align="center"><strong>Figure. Definition of angels for 2D</strong>.</p>
-<p style="text-align: center;" align="center"><img id="Picture 114" src="img/image091.jpg" alt="" width="379" height="256" /></p>
+<p style="text-align: center;" align="center"><img id="Picture 114" src="img/image062.jpg" alt="" width="379" height="256" /></p>
 <p style="text-align: center;" align="center"><span style="font-size: 12pt;">Figure. Examples of the angles for oriented elliptical cylinders </span></p>
 <p style="text-align: center;" align="center"><span style="font-size: 12pt;">against the detector plane.</span></p>
@@ -3173,4 +3209,13 @@
 <p style="text-align: center;" align="center"><img id="Picture 66" src="img/image111.jpg" alt="" width="425" height="346" /></p>
 <p style="text-align: center;" align="center"><strong>Figure. 2D plot (w/(256X265) data points).</strong></p>
+
+<p style="text-align: center; page-break-after: avoid;" align="center"><img src="img/image061.jpg" /></p>
+<p style="text-align: center;" align="center"><img src="img/image062.jpg" alt="" width="379" height="256" /></p>
+<p style="text-align: center;" align="center">Figure. Examples of the angles for oriented pp against the detector plane.</p>
+
+
+<p style="text-align: center;" align="center"><a name="_Ref173213915"></a><a name="_Ref173306040"></a>Figure. Definition of the angles for oriented 2D barbells.</p>
+
+
 <p style="margin-left: 0.55in; text-indent: -0.3in;"><strong><span style="font-size: 14pt;">2.25.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="CappedCylinderModel"></a><strong><span style="font-size: 14pt;">CappedCylinder(/ConvexLens)Model</span></strong></p>
 <p>Calculates the scattering from a cylinder with spherical section end-caps(This model simply becomes the ConvexLensModel when the length of the cylinder L = 0. &nbsp;That is, a sphereocylinder with end caps that have a radius larger than that of the cylinder and the center of the end cap radius lies within the cylinder. See the diagram for the details of the geometry and restrictions on parameter values.</p>
@@ -3295,4 +3340,11 @@
 <p style="text-align: center;" align="center"><img id="Picture 71" src="img/image118.jpg" alt="" width="402" height="334" /></p>
 <p style="text-align: center;" align="center"><strong>Figure. 2D plot (w/(256X265) data points).</strong></p>
+<p style="text-align: center; page-break-after: avoid;" align="center"><img src="img/image061.jpg" /></p>
+<p style="text-align: center;" align="center"><a name="_Ref173213915"></a><a name="_Ref173306040"></a>Figure. Definition of the angles for oriented 2D cylinders.</p>
+<p style="text-align: center;" align="center"><img src="img/image062.jpg" alt="" width="379" height="256" /></p>
+<p style="text-align: center;" align="center">Figure. Examples of the angles for oriented pp against the detector plane.</p>
+
+
+
 <p style="margin-left: 0.55in; text-indent: -0.3in;"><strong><span style="font-size: 14pt;">2.26.</span></strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong><a name="EllipsoidModel"></a><strong><span style="font-size: 14pt;">Ellipsoid Model</span></strong></p>
 <p>This model provides the form factor for an ellipsoid (ellipsoid of revolution) with uniform scattering length density. The form factor is normalized by the particle volume.</p>
@@ -3414,7 +3466,7 @@
 <p>The output of the 1D scattering intensity function for randomly oriented ellipsoids is then given by the equation above.</p>
 <p>The <em>axis_theta</em> and axis<em>_phi</em> parameters are not used for the 1D output. Our implementation of the scattering kernel and the 1D scattering intensity use the c-library from NIST.</p>
-<p style="text-align: center;" align="center"><img src="img/image122.jpg" alt="" width="396" height="297" /></p>
-<p style="text-align: center;" align="center"><span style="font-size: 12pt;">Figure. Examples of the angles for oriented ellipsoid </span></p>
-<p style="text-align: center;" align="center"><span style="font-size: 12pt;">against the detector plane</span>.</p>
+<p style="text-align: center;" align="center"><img src="img/image122.jpg" alt="" width="379" height="256"/></p>
+<p style="text-align: center;" align="center"><span style="font-size: 12pt;">Figure. The angles for oriented ellipsoid </span></p>
+
 <p style="margin-left: 0.85in; text-indent: -0.35in;"><strong>2.1.</strong><strong><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </span>Validation of the ellipsoid model</strong></p>
 <p>Validation of our code was done by comparing the output of the 1D model to the output of the software provided by the NIST (Kline, 2006). Figure 5 shows a comparison of the 1D output of our model and the output of the NIST software.</p>
@@ -3558,6 +3610,6 @@
 <p style="text-align: center;" align="center"><strong>Figure. 1D plot using the default values (w/1000 data point).</strong></p>
 <p style="text-align: center;" align="center"><strong>&nbsp;</strong></p>
-<p style="text-align: center;" align="center"><img src="img/image122.jpg" alt="" width="396" height="297" /></p>
-<p style="text-align: center;" align="center">Figure. Examples of the angles for oriented coreshellellipsoid against the detector plane where a =polar axis.</p>
+<p style="text-align: center;" align="center"><img src="img/image122.jpg" alt="" width="379" height="256"/></p>
+<p style="text-align: center;" align="center">Figure. The angles for oriented coreshellellipsoid .</p>
 <p>Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research (Kline, 2006):</p>
 <p>REFERENCE</p>
@@ -3674,6 +3726,6 @@
 <p style="text-align: center;" align="center"><img src="img/image131.gif" alt="" width="438" height="272" /></p>
 <p style="text-align: center;" align="center"><strong>Figure. Comparison between 1D and averaged 2D.</strong></p>
-<p style="text-align: center;" align="center"><img src="img/image132.jpg" alt="" width="396" height="297" /></p>
-<p style="text-align: center;" align="center">Figure. Examples of the angles for oriented ellipsoid against the detector plane.</p>
+<p style="text-align: center;" align="center"><img src="img/image132.jpg" alt="" width="379" height="256" /></p>
+<p style="text-align: center;" align="center">Figure. The angles for oriented ellipsoid.</p>
 <p>Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research (Kline, 2006):</p>
 <p>REFERENCE</p>
@@ -4368,5 +4420,5 @@
 <p style="text-align: center;" align="center"><strong>Figure. 1D plot in the linear scale using the default values (w/200 data point).</strong></p>
 <p>&nbsp;The 2D (Anisotropic model) is based on the reference (above) which I(q) &nbsp;is approximated for 1d scattering. Thus the scattering pattern for 2D may not be accurate. Note that we are not responsible for any incorrectness of the 2D model computation.</p>
-<p style="text-align: center;" align="center"><img id="Object 23" src="img/image156.gif" alt="" width="304" height="321" /></p>
+<p style="text-align: center;" align="center"><img id="Object 23" src="img/image156.jpg" /></p>
 <p style="text-align: center;" align="center">&nbsp;</p>
 <p>&nbsp;</p>
@@ -4493,5 +4545,5 @@
 <p style="text-align: center;" align="center"><strong>Figure. 1D plot in the linear scale using the default values (w/200 data point).</strong></p>
 <p>&nbsp;The 2D (Anisotropic model) is based on the reference (above) in which I(q)&nbsp; is approximated for 1d scattering. Thus the scattering pattern for 2D may not be accurate. Note that we are not responsible for any incorrectness of the 2D model computation.</p>
-<p style="text-align: center;" align="center"><img src="img/image165.gif" alt="" width="304" height="321" /></p>
+<p style="text-align: center;" align="center"><img src="img/image165.gif" /></p>
 <p style="text-align: center;" align="center">&nbsp;</p>
 <p>&nbsp;</p>
@@ -4617,5 +4669,5 @@
 <p style="text-align: center;" align="center"><strong>Figure. 1D plot in the linear scale using the default values (w/200 data point).</strong></p>
 <p>&nbsp;The 2D (Anisotropic model) is based on the reference (1987) in which I(q) &nbsp;is approximated for 1d scattering. Thus the scattering pattern for 2D may not be accurate. Note that we are not responsible for any incorrectness of the 2D model computation.</p>
-<p style="text-align: center;" align="center"><img id="Object 31" src="img/image165.gif" alt="" width="304" height="321" /></p>
+<p style="text-align: center;" align="center"><img id="Object 31" src="img/image165.gif" /></p>
 <p style="text-align: center;" align="center">&nbsp;</p>
 <p>&nbsp;</p>
Index: sansmodels/src/sans/models/media/pd_help.html
===================================================================
--- sansmodels/src/sans/models/media/pd_help.html	(revision 17574ae6b0cad29604b5f9e20e14c24c59a49851)
+++ sansmodels/src/sans/models/media/pd_help.html	(revision 318b5bbbcb046db18a8e953dccae04fc7b8a71e0)
@@ -1,4 +1,2 @@
-<html>
-
 <head>
 <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
@@ -29,5 +27,4 @@
 style='font-family:"Times New Roman","serif"'>The following five distribution
 functions are provided;</span></p>
-<p>&nbsp;</p>
 <ul>
 <li><a href="#Rectangular">Rectangular distribution</a></li>
@@ -38,275 +35,148 @@
 </ul>
 <p>&nbsp;</p>
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p><a name="Rectangular"><h4>Rectangular distribution</a></h4></p>
+<p><img src="./img/pd_image001.png"></p>
+<p>&nbsp;</p>
+<p>The x<sub>mean</sub> is the mean
+of the distribution, w is the half-width, and Norm is a normalization factor
+which is determined during the numerical calculation. Note that the Sigma and
+the half width <i>w</i> are different.</p>
+<p>The standard deviation is </p>
+<p><img src="./img/pd_image002.png"></p>
+<p>&nbsp;</p>
+<p>The PD (polydispersity) is </p>
+<p><img src="./img/pd_image003.png"></p>
+<p>&nbsp;</p>
+<p><img width=511 height=270
+id="Picture 1" src="./img/pd_image004.jpg" alt=flat.gif></p>
+<p>&nbsp;</p>
+<p>&nbsp;</p>
+<p><a name="Array"><h4>Array distribution</h4></a></p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p>This distribution is to be given
+by users as a txt file where the array should be defined by two columns in the
+order of x and f(x) values. The f(x) will be normalized by SansView during the
+computation.</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'><a name="Rectangular"><h4>Rectangular distribution</a></h4></span></p>
+<p>Example of an array in the file;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif";position:relative;top:22.0pt'><img
-width=248 height=67 src="./img/pd_image001.png"></span></p>
+<p>30        0.1</p>
+
+<p>32        0.3</p>
+
+<p>35        0.4</p>
+
+<p>36        0.5</p>
+
+<p>37        0.6</p>
+
+<p>39        0.7</p>
+
+<p>41        0.9</p>
+
+<p'>&nbsp;</p>
+
+<p>We use only these array values in
+the computation, therefore the mean value given in the control panel, for
+example radius = 60, will be ignored.</p>
+<p>&nbsp;</p>
+
+
+<p><a name="Gaussian"><h4>Gaussian distribution</h4></a></p>
+<p>&nbsp;</p>
+
+<p><img src="./img/pd_image005.png"></p>
 
 <p>&nbsp;</p>
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>The x<sub>mean</sub> is the mean
-of the distribution, w is the half-width, and Norm is a normalization factor
-which is determined during the numerical calculation. Note that the Sigma and
-the half width <i>w</i> are different.</span></p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>The standard deviation is </span></p>
+<p>The x<sub>mean</sub> is the mean
+of the distribution and Norm is a normalization factor which is determined
+during the numerical calculation.</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif";position:relative;top:4.0pt'><img
-width=72 height=24 src="./img/pd_image002.png"></span><span
-style='font-family:"Times New Roman","serif"'>. </span></p>
+<p>&nbsp;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p>The PD (polydispersity) is </p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>The PD (polydispersity) is </span></p>
+<p><img src="./img/pd_image003.png"></p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif";position:relative;top:6.0pt'><img
-width=93 height=24 src="./img/pd_image003.png"></span><span
-style='font-family:"Times New Roman","serif"'>.</span></p>
+<p>&nbsp;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p><img width=518 height=275
+id="Picture 2" src="./img/pd_image006.jpg" alt=gauss.gif></p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'><img width=511 height=270
-id="Picture 1" src="./img/pd_image004.jpg" alt=flat.gif></span></p>
+<p>&nbsp;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p><a name="Lognormal"><h4>Lognormal distribution</h4></a></p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p>&nbsp;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'><a name="Array"><h4>Array distribution</h4></a></span></p>
+<p><img src="./img/pd_image007.png"></p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p>&nbsp;</p>
 
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>This distribution is to be given
-by users as a txt file where the array should be defined by two columns in the
-order of x and f(x) values. The f(x) will be normalized by SansView during the
-computation.</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>Example of an array in the file;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>30        0.1</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>32        0.3</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>35        0.4</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>36        0.5</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>37        0.6</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>39        0.7</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>41        0.9</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>We use only these array values in
-the computation, therefore the mean value given in the control panel, for
-example radius = 60, will be ignored.</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'><a name="Gaussian"><h4>Gaussian distribution</h4></a></span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif";position:relative;top:12.0pt'><img
-width=212 height=44 src="./img/pd_image005.png"></span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>The x<sub>mean</sub> is the mean
-of the distribution and Norm is a normalization factor which is determined
-during the numerical calculation.</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>The PD (polydispersity) is </span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif";position:relative;top:6.0pt'><img
-width=93 height=24 src="./img/pd_image003.png"></span><span
-style='font-family:"Times New Roman","serif"'>.</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'><img width=518 height=275
-id="Picture 2" src="./img/pd_image006.jpg" alt=gauss.gif></span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'><a name="Lognormal"><h4>Lognormal distribution</h4></a></span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif";position:relative;top:14.0pt'><img
-width=236 height=47 src="./img/pd_image007.png"></span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>The mu = ln(x<sub>med</sub>),  x<sub>med</sub>
+<p>The &#956; = ln(x<sub>med</sub>),  x<sub>med</sub>
 is the median value of the distribution, and Norm is a normalization factor
 which will be determined during the numerical calculation. The median value is
 the value given in the size parameter in the control panel, for example,
-radius = 60.</span></p>
+radius = 60.</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p >&nbsp;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>The PD (polydispersity) is given
-by sigma,</span></p>
+<p>The PD (polydispersity) is given
+by &#963;,</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif";position:relative;top:5.0pt'><img
-width=55 height=21 src="./img/pd_image008.png"></span><span
-style='font-family:"Times New Roman","serif"'>.</span></p>
+<p><img src="./img/pd_image008.png"></p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p>&nbsp;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>For the angular distribution,</span></p>
+<p>For the angular distribution,</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif";position:relative;top:6.0pt'><img
-width=76 height=24 src="./img/pd_image009.png"></span></p>
+<p><img src="./img/pd_image009.png"></p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p>&nbsp;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>The mean value is given by x<sub>mean</sub>
-=exp(mu+p^2/2).</span></p>
+<p>The mean value is given by x<sub>mean</sub>
+=exp(&#956;+p<sup>2</sup>/2).</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>The peak value is given by x<sub>peak</sub>=exp(mu-p^2).</span></p>
+<p>The peak value is given by x<sub>peak</sub>=exp(&#956;-p<sup>2</sup>).</span></p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p>&nbsp;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'><img width=450 height=239
-id="Picture 7" src="./img/pd_image010.jpg" alt=lognormal.gif></span></p>
+<p><img width=450 height=239
+id="Picture 7" src="./img/pd_image010.jpg" alt=lognormal.gif></p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p>&nbsp;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>This distribution function
+<p>This distribution function
 spreads more and the peak shifts to the left as the p increases, requiring
-higher values of Nsigmas and Npts.</span></p>
+higher values of Nsigmas and Npts.</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p>&nbsp;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p><a name="Schulz"><h4>Schulz distribution</h4></a></p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'><a name="Schulz"><h4>Schulz distribution</h4></a></span></p>
+<p>&nbsp;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p><img src="./img/pd_image011.png"></p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif";position:relative;top:15.0pt'><img
-width=347 height=45 src="./img/pd_image011.png"></span></p>
+<p>&nbsp;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
+<p>The x<sub>mean</sub> is the mean
+of the distribution and Norm is a normalization factor which is determined
+during the numerical calculation. </p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>The x<sub>mean</sub> is the mean
-of the distribution and Norm is a normalization factor which is determined
-during the numerical calculation. </span></p>
+<p>The z = 1/p<sup>2</sup>  1.</p>
+<p>&nbsp;</p>
 
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>The z = 1/p^2  1.</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>The PD (polydispersity) is </span></p>
-
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif";position:relative;top:6.0pt'><img
-width=80 height=24 src="./img/pd_image012.png"></span><span
-style='font-family:"Times New Roman","serif"'>.</span></p>
-<p/>
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'>Note that the higher PD (polydispersity)
+<p>The PD (polydispersity) is </p>
+<p'><img src="./img/pd_image012.png"></p>
+<p>Note that the higher PD (polydispersity)
  might need higher values of Npts and Nsigmas. For example, at PD = 0.7 and  radisus = 60 A, 
- Npts >= 160, and Nsigmas >= 15 at least.</span></p>
+ Npts >= 160, and Nsigmas >= 15 at least.</p>
  <p/>
-<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'><span
-style='font-family:"Times New Roman","serif"'><img width=438 height=232
-id="Picture 4" src="./img/pd_image013.jpg" alt=schulz.gif></span></p>
+<p><img width=438 height=232
+id="Picture 4" src="./img/pd_image013.jpg" alt=schulz.gif></p>
 
 </div>
-
+<br>
 </body>
-
-</html>
Index: sansmodels/src/sans/models/media/polar_mag_help.html
===================================================================
--- sansmodels/src/sans/models/media/polar_mag_help.html	(revision 318b5bbbcb046db18a8e953dccae04fc7b8a71e0)
+++ sansmodels/src/sans/models/media/polar_mag_help.html	(revision 318b5bbbcb046db18a8e953dccae04fc7b8a71e0)
@@ -0,0 +1,102 @@
+<body>
+<br>
+<p><a name="magnetic"></a><strong><span style="font-size: 14pt;"> Polarization and Magnetic Scattering</span></strong></p>
+<br>
+<br>
+The magnetic scattering is implemented in five (2D) models, SphereModel, CoreShellModel, 
+CoreMultiShellModel, CylinderModel, and ParallelepipedModel. 
+In general, the scattering length density (SLD) in each regions where the SLD (=&#946;)
+ is uniform, is a combination of the nuclear and magnetic SLDs 
+and depends on the spin states of the neutrons as follows:
+<br>
+<br>
+For magnetic scattering, only the magnetization component, <b>M</b><sub>perp</sub>, 
+perpendicular to the scattering vector <b>Q</b> contributes to the the magnetic 
+scattering length. (Figure below).
+<p>
+<img src="img/mag_vector.bmp"/>
+</p>
+<br>
+The magnetic scattering length density is then
+<p>
+<img src="img/dm_eq.gif"/>
+</p>
+<br>
+where &#947; = -1.913 the gyromagnetic ratio,  	&#956;<sub>B</sub> is the Bohr magneton, 
+r<sub>0</sub> is the classical radius of electron, 
+and <b>&#963;</b> is the Pauli spin.
+<br>
+For polarized neutron, the magnetic scattering is depending on the spin states.
+Let's consider that the incident neutrons are polarized parallel (+)/anti-parallel 
+(&#8211;) to the x' axis (See both Figures above).
+The possible out-coming states then are + and - states for both incident states.
+<br>
+ - Non-spin-flips:  	(+ +) and  	(- -)
+<br>
+ - Spin-flips:  	(+ -) and  	(- +)
+<br>
+<p>
+<img src="img/M_angles_pic.bmp"/>
+</p>
+<br>
+<br>
+Now, let's assume that the angles of the <b>Q</b> vector and the spin-axis (x') against x-axis 
+are &#966; and  &#952;<sub>up</sub>, respectively (See Figure above).
+Then, depending upon the polarization (spin) state of neutrons, the scattering length
+densities , including the nuclear scattering length density (&#946; <sub>N</sub>) are given as, for non-spin-flips,
+<p>
+<img src="img/sld1.gif"/>
+</p>
+<br>
+<br>
+for spin-flips,
+<p>
+<img src="img/sld2.gif"/>
+</p>
+<br>
+<br>
+where
+<p>
+<img src="img/mxp.gif"/>
+</p>
+<p>
+<img src="img/myp.gif"/>
+</p>
+<p>
+<img src="img/mzp.gif"/>
+</p>
+<p>
+<img src="img/mqx.gif"/>
+</p>
+<p>
+<img src="img/mqy.gif"/>
+</p>
+<br>
+<br>
+Here, the M<sub>0x</sub>, M<sub>0y</sub> and M<sub>0z</sub> are the x, y and z 
+components of the magnetization vector given in the xyz lab frame. 
+The angles of the magnetization, &#952;<sub>M</sub> and &#966;<sub>M</sub> as defined in the 
+Figure (above),
+<p>
+<img src="img/m0x_eq.gif"/>
+</p>
+<p>
+<img src="img/m0y_eq.gif"/>
+</p>
+<p>
+<img src="img/m0z_eq.gif"/>
+</p>
+<br>
+<p>
+The user input parameters are M0_sld = D<sub>M</sub>M<sub>0</sub>, Up_theta = &#952;<sub>up</sub>, 
+M_theta = &#952;<sub>M</sub>, and M_phi = &#966;<sub>M</sub>.
+The 'Up_frac_i' and 'Up_frac_f' are the ratio, (spin up) /(spin up + spin down) neutrons 
+before the sample and at the analyzer, respectively.
+</p>
+<br>
+*Note: The values of the 'Up_frac_i' and 'Up_frac_f' must be in the range between 0 and 1.
+</body>
+
+
+
+
Index: sansmodels/src/sans/models/media/smear_computation.html
===================================================================
--- sansmodels/src/sans/models/media/smear_computation.html	(revision 17574ae6b0cad29604b5f9e20e14c24c59a49851)
+++ sansmodels/src/sans/models/media/smear_computation.html	(revision 318b5bbbcb046db18a8e953dccae04fc7b8a71e0)
@@ -1,3 +1,2 @@
-<html>
 
 <head>
@@ -30,52 +29,43 @@
 smeared scattering intensity for SANS is defined by</span></p>
 
-<p class=MsoNormal><img width=349 height=49
+<p class=MsoNormal><img 
 src="./img/sm_image002.gif" align=left hspace=12></p>
 
 <p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>           
-                                 1)</span><br clear=all>
+                                 ---- 1)</span><br clear=all>
 <span style='font-family:"Times New Roman","serif"'>where Norm = <span
-style='position:relative;top:15.0pt'><img width=137 height=49
+style='position:relative;top:15.0pt'><img 
 src="./img/sm_image003.gif"></span>.</span></p>
-
+<br>
 <p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>The
-functions <span style='position:relative;top:6.0pt'><img width=43 height=25
-src="./img/sm_image004.gif"></span>and <span style='position:
-relative;top:6.0pt'><img width=43 height=25
-src="./img/sm_image005.gif"></span>refer to the slit width weighting
+functions <span style='position:relative;top:6.0pt'><img 
+src="./img/sm_image004.gif"></span> and <span style='position:
+relative;top:6.0pt'><img 
+src="./img/sm_image005.gif"></span> refer to the slit width weighting
 function and the slit height weighting determined at the q point, respectively.
  Here, we assumes that the weighting function is described by a rectangular
 function, i.e.,</span></p>
 
-<p class=MsoNormal><span style='position:relative;top:7.0pt'><img width=134
-height=26 src="./img/sm_image006.gif">                                                                                                       
+<p class=MsoNormal><span style='position:relative;top:7.0pt'><img 
+ src="./img/sm_image006.gif">                                                                                                       
   </span><span style='font-family:"Times New Roman","serif";position:relative;
-top:7.0pt'>2)</span></p>
+top:7.0pt'> ---- 2)</span></p>
 
 <p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>and </span></p>
 
-<p class=MsoNormal><span style='position:relative;top:7.0pt'><img width=136
-height=26 src="./img/sm_image007.gif"></span>,                                                                              
-                         <span style='font-family:"Times New Roman","serif"'>3)</span></p>
-
-<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>so that </span><span
-style='position:relative;top:6.0pt'><img width=58 height=23
-src="./img/sm_image008.gif"></span> <span style='position:relative;
-top:16.0pt'><img width=76 height=51 src="./img/sm_image009.gif"></span> <span
-style='font-family:"Times New Roman","serif"'>for</span>  <span
-style='position:relative;top:3.0pt'><img width=40 height=15
-src="./img/sm_image010.gif"></span> <span style='font-family:
-"Times New Roman","serif"'>and <i>u</i>. The </span><span style='position:relative;
-top:6.0pt'><img width=28 height=24 src="./img/sm_image011.gif"></span> <span
-style='font-family:"Times New Roman","serif"'>and </span><span
-style='position:relative;top:6.0pt'><img width=28 height=24
-src="./img/sm_image012.gif"> </span><span style='font-family:
-"Times New Roman","serif"'>stand for the slit height (FWHM/2) and the slit
+<p class=MsoNormal><span style='position:relative;top:7.0pt'><img 
+ src="./img/sm_image007.gif"></span>,                                                                              
+                         <span style='font-family:"Times New Roman","serif"'> ---- 3)</span></p>
+
+<p>so that <img 
+src="./img/sm_image008.gif"> <img src="./img/sm_image009.gif">  for <img 
+src="./img/sm_image010.gif"> and <i>u</i>. The <img src="./img/sm_image011.gif"> 
+ and <img src="./img/sm_image012.gif">  stand for the slit height (FWHM/2) and the slit
 width (FWHM/2) in the q space. Now the integral of Eq. (1) is simplified to</span></p>
 
-<p class=MsoNormal><img width=283 height=52
+<p class=MsoNormal><img 
 src="./img/sm_image013.gif" align=left hspace=12><span
 style='font-family:"Times New Roman","serif"'>                                                  
-         4)</span></p>
+          ---- 4)</span></p>
 
 <p class=MsoNormal><span style='font-family:"Times New Roman","serif";
@@ -89,27 +79,24 @@
 style='font-family:"Times New Roman","serif"'>1)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span></span><span style='font-family:"Times New Roman","serif"'>For </span><span
-style='position:relative;top:6.0pt'><img width=28 height=24
-src="./img/sm_image014.gif"></span>= 0  <span style='font-family:
+style='position:relative;top:6.0pt'><img 
+src="./img/sm_image012.gif"></span>= 0  <span style='font-family:
 "Times New Roman","serif"'>and </span><span style='position:relative;
-top:6.0pt'><img width=28 height=24 src="./img/sm_image015.gif"></span> =
+top:6.0pt'><img src="./img/sm_image011.gif"></span> =
 <span style='font-family:"Times New Roman","serif"'>constant:</span></p>
 
-<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'>
+<p>
 <img src="./img/sm_image016.gif"></p>
 
-<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
-style='font-family:"Times New Roman","serif"'>For discrete q values, at the q
+<p> For discrete q values, at the q
 values from the data points and at the q values extended up to  q<sub>N</sub>=
-q<sub>i</sub> + </span><span style='position:relative;top:6.0pt'><img width=28
-height=24 src="./img/sm_image011.gif"></span><span
-style='font-family:"Times New Roman","serif"'>, the smeared intensity can be
-calculated approximately,</span></p>
-
-<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><img 
+q<sub>i</sub> +  <img src="./img/sm_image011.gif"> , the smeared intensity can be
+calculated approximately, </p>
+
+<p><img 
 src="./img/sm_image017.gif">.                                                           
-<span style='font-family:"Times New Roman","serif"'>5)</span></p>
-
-<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
-style='position:relative;top:7.0pt'><img width=23 height=25
+ ---- 5)</p>
+
+<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
+style='position:relative;top:7.0pt'><img 
 src="./img/sm_image018.gif"></span> <span style='font-family:
 "Times New Roman","serif"'>= 0 for <i>I<sub>s</sub></i> in</span> <i><span
@@ -123,9 +110,9 @@
 style='font-family:"Times New Roman","serif"'>2)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span></span><span style='font-family:"Times New Roman","serif"'>For  </span><span
-style='position:relative;top:6.0pt'><img width=28 height=24
-src="./img/sm_image014.gif"></span>= <span style='font-family:
+style='position:relative;top:6.0pt'><img 
+src="./img/sm_image012.gif"></span>= <span style='font-family:
 "Times New Roman","serif"'>constant </span> <span style='font-family:"Times New Roman","serif"'>and
-</span><span style='position:relative;top:6.0pt'><img width=28 height=24
-src="./img/sm_image015.gif"></span> = <span style='font-family:
+</span><span style='position:relative;top:6.0pt'><img 
+src="./img/sm_image011.gif"></span> = <span style='font-family:
 "Times New Roman","serif"'>0:</span></p>
 
@@ -135,14 +122,14 @@
 <p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'>
 <img src="./img/sm_image019.gif">                                                                                        
-<span style='font-family:"Times New Roman","serif"'>6)</span></p>
+<span style='font-family:"Times New Roman","serif"'> ---- 6)</span></p>
 
 <p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
 style='font-family:"Times New Roman","serif"'>for  q<sub>p</sub> = q<sub>i</sub>
-- </span><span style='position:relative;top:6.0pt'><img width=28 height=24
+- </span><span style='position:relative;top:6.0pt'><img 
 src="./img/sm_image012.gif"></span><span style='font-family:
 "Times New Roman","serif"'> and</span> <span style='font-family:"Times New Roman","serif"'>q<sub>N</sub>
 = q<sub>i</sub> + </span><span style='position:relative;top:6.0pt'><img
-width=28 height=24 src="./img/sm_image012.gif"></span>.  <span
-style='position:relative;top:7.0pt'><img width=23 height=25
+ src="./img/sm_image012.gif"></span>.  <span
+style='position:relative;top:7.0pt'><img 
 src="./img/sm_image018.gif"></span> <span style='font-family:
 "Times New Roman","serif"'>= 0 for <i>I<sub>s</sub></i> in</span> <i><span
@@ -155,9 +142,9 @@
 style='font-family:"Times New Roman","serif"'>3)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span></span><span style='font-family:"Times New Roman","serif"'>For  </span><span
-style='position:relative;top:6.0pt'><img width=28 height=24
-src="./img/sm_image014.gif"></span>= <span style='font-family:
+style='position:relative;top:6.0pt'><img 
+src="./img/sm_image011.gif"></span>= <span style='font-family:
 "Times New Roman","serif"'>constant </span> <span style='font-family:"Times New Roman","serif"'>and
-</span><span style='position:relative;top:6.0pt'><img width=28 height=24
-src="./img/sm_image015.gif"></span> = <span style='font-family:
+</span><span style='position:relative;top:6.0pt'><img 
+src="./img/sm_image011.gif"></span> = <span style='font-family:
 "Times New Roman","serif"'>constant:</span></p>
 
@@ -177,14 +164,14 @@
 <p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'>
 <img src="./img/sm_image020.gif">    <span style='font-family:
-"Times New Roman","serif"'>(7)</span></p>
+"Times New Roman","serif"'> ---- (7)</span></p>
 
 <p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
 style='font-family:"Times New Roman","serif"'>for  q<sub>p</sub> = q<sub>i</sub>
-- </span><span style='position:relative;top:6.0pt'><img width=28 height=24
+- </span><span style='position:relative;top:6.0pt'><img 
 src="./img/sm_image012.gif"></span><span style='font-family:
 "Times New Roman","serif"'> and</span> <span style='font-family:"Times New Roman","serif"'>q<sub>N</sub>
 = q<sub>i</sub> + </span><span style='position:relative;top:6.0pt'><img
-width=28 height=24 src="./img/sm_image012.gif"></span>.  <span
-style='position:relative;top:7.0pt'><img width=23 height=25
+ src="./img/sm_image012.gif"></span>.  <span
+style='position:relative;top:7.0pt'><img 
 src="./img/sm_image018.gif"></span> <span style='font-family:
 "Times New Roman","serif"'>= 0 for <i>I<sub>s</sub></i> in</span> <i><span
@@ -207,5 +194,5 @@
 
 <p class=MsoNormal><img src="./img/sm_image021.gif"><span
-style='font-family:"Times New Roman","serif"'>                                                         (8)</span></p>
+style='font-family:"Times New Roman","serif"'>   ---- (8)</span></p>
 
 <p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>For all
@@ -228,25 +215,21 @@
 
 <p class=MsoNormal><img src="./img/sm_image022.gif"><span
-style='font-family:"Times New Roman","serif"'>                    (9)</span></p>
+style='font-family:"Times New Roman","serif"'>     ---- (9)</span></p>
 
 <p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>In Eq
-(9), x<sub>0</sub> = qcos</span><span style='font-family:Symbol'>(theta)</span><span
-style='font-family:"Times New Roman","serif"'> and y<sub>0</sub>=qsin</span><span
-style='font-family:Symbol'>(theta)</span><span style='font-family:"Times New Roman","serif"'>
-, and the primed axes are in the coordinate rotated by an angle </span><span
-style='font-family:Symbol'>theta</span><span style='font-family:"Times New Roman","serif"'>
-around z-axis (below) so that x<sub>0</sub> =  x<sub>0</sub>cos</span><span
-style='font-family:Symbol'>(theta) + </span><span style='font-family:"Times New Roman","serif"'>y<sub>0</sub>
-sin</span><span style='font-family:Symbol'>(theta)  </span><span style='font-family:
-"Times New Roman","serif"'>and y<sub>0</sub> =  -x<sub>0</sub>sin</span><span
-style='font-family:Symbol'>(theta) + </span><span style='font-family:"Times New Roman","serif"'>y<sub>0</sub>
-cos</span><span style='font-family:Symbol'>(theta) .</span><span style='font-family:
+(9), x<sub>0</sub> = qcos&#952;</span><span
+style='font-family:"Times New Roman","serif"'> and y<sub>0</sub> = qsin&#952;</span><span style='font-family:"Times New Roman","serif"'>
+, and the primed axes are in the coordinate rotated by an angle &#952;</span><span style='font-family:"Times New Roman","serif"'>
+around z-axis (below) so that x<sub>0</sub> =  x<sub>0</sub>cos&#952; + </span><span style='font-family:"Times New Roman","serif"'>y<sub>0</sub>
+sin&#952;  </span><span style='font-family:
+"Times New Roman","serif"'>and y<sub>0</sub> =  -x<sub>0</sub>sin&#952; + </span><span style='font-family:"Times New Roman","serif"'>y<sub>0</sub>
+cos&#952;.</span><span style='font-family:
 "Times New Roman","serif"'> Note that the rotation angle is zero for x-y
-symmetric elliptical Gaussian distribution</span><span style='font-family:Symbol'>.
-</span><span style='font-family:"Times New Roman","serif"'>The  A is a
+symmetric elliptical Gaussian distribution</span>.
+<span style='font-family:"Times New Roman","serif"'>The  A is a
 normalization factor.</span></p>
 
 <p class=MsoNormal align=center style='text-align:center'><span
-style='font-family:"Times New Roman","serif"'><img width=439 height=376
+style='font-family:"Times New Roman","serif"'><img 
 id="Object 1" src="./img/sm_image023.gif"></span></p>
 
@@ -254,9 +237,8 @@
 
 <p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>Now we
-consider a numerical integration where each bins in </span><span
-style='font-family:Symbol'>THETA</span><span style='font-family:"Times New Roman","serif"'>
+consider a numerical integration where each bins in </span> &#920; </span><span style='font-family:"Times New Roman","serif"'>
 and R are <b>evenly </b>(this is to simplify the equation below) distributed by
-</span><span style='font-family:Symbol'>Delta_THETA </span><span style='font-family:
-"Times New Roman","serif"'>and </span><span style='font-family:Symbol'>Delta</span><span
+</span>&#916;&#920; </span><span style='font-family:
+"Times New Roman","serif"'>and </span> &#916;</span><span
 style='font-family:"Times New Roman","serif"'>R, respectively, and it is
 assumed that I(x, y) is constant within the bins which in turn becomes</span></p>
@@ -265,18 +247,17 @@
 
 <p class=MsoNormal>                                                                                                                                                                                <span
-style='font-family:"Times New Roman","serif"'>(10)</span></p>
+style='font-family:"Times New Roman","serif"'> ---- (10)</span></p>
 
 <p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>Since we
 have found the weighting factor on each bin points, it is convenient to
-transform x-y back to x-y coordinate (rotating it by -</span><span
-style='font-family:Symbol'>(theta)</span><span style='font-family:"Times New Roman","serif"'>
+transform x-y back to x-y coordinate (rotating it by -&#952;</span><span style='font-family:"Times New Roman","serif"'>
 around z axis).  Then, for the polar symmetric smear,</span></p>
 
 <p class=MsoNormal><img src="./img/sm_image025.gif"><span
-style='position:relative;top:35.0pt'>                                                         </span>(11)</p>
+style='position:relative;top:35.0pt'>      </span> ---- (11)</p>
 
 <p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>where,</span></p>
 
-<p class=MsoNormal><img src="./img/sm_image026.gif"></p>
+<p class=MsoNormal><img src="./img/sm_image026.gif">,</p>
 
 <p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>while
@@ -284,5 +265,5 @@
 
 <p class=MsoNormal><img src="./img/sm_image027.gif"><span
-style='font-family:"Times New Roman","serif"'>                                                                                          (12)</span></p>
+style='font-family:"Times New Roman","serif"'>  ---- (12)</span></p>
 
 <p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>where,</span></p>
@@ -301,3 +282,2 @@
 </body>
 
-</html>
