Index: doc/genmodel.py
===================================================================
--- doc/genmodel.py	(revision 70bbb740071fe0e5f444dcd206020bb72862edec)
+++ doc/genmodel.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -25,5 +25,5 @@
         'xscale'    : 'log',
         'yscale'    : 'log' if not info['structure_factor'] else 'linear',
-        'qmin'      : 0.005,
+        'qmin'      : 0.001,
         'qmax'      : 1.0,
         'nq'        : 1000,
@@ -68,5 +68,5 @@
 fig = plt.figure()
 ax = fig.add_subplot(1,1,1)
-ax.plot(q, Iq1D, color='blue', lw=2, label=model_name)
+ax.plot(q, Iq1D, color='blue', lw=2, label=info['name'])
 ax.set_xlabel(r'$Q \/(\AA^{-1})$')
 ax.set_xscale(opts['xscale'])   
@@ -101,5 +101,7 @@
     docstr = docstr1 + captionstr + docstr2
 else:
+    print '------------------------------------------------------------------'
     print 'References NOT FOUND for model: ', model_name
+    print '------------------------------------------------------------------'
     docstr = docstr + captionstr
 
Index: sasmodels/models/core_shell_parallelepiped.py
===================================================================
--- sasmodels/models/core_shell_parallelepiped.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/core_shell_parallelepiped.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -92,5 +92,6 @@
 by the NIST Center for Neutron Research (Kline, 2006).
 
-REFERENCE
+References
+----------
 
 P Mittelbach and G Porod, *Acta Physica Austriaca*, 14 (1961) 185-211
Index: sasmodels/models/core_shell_sphere.py
===================================================================
--- sasmodels/models/core_shell_sphere.py	(revision 7d4b2ae2af901813f3ff60e60aa0eae98f4dfd5e)
+++ sasmodels/models/core_shell_sphere.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -42,10 +42,4 @@
 our model and the output of the NIST software.
 
-.. figure:: img/core_shell_sphere_1d.jpg
-
-    Comparison of the SasView scattering intensity for a core-shell sphere with
-    the output of the NIST SANS analysis software. The parameters were set to:
-    *scale* = 1.0, *radius* = 60 , *contrast* = 1e-6 |Ang^-2|, and
-    *background* = 0.001 |cm^-1|.
 """
 
Index: sasmodels/models/correlation_length.py
===================================================================
--- sasmodels/models/correlation_length.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/correlation_length.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -25,9 +25,7 @@
     q = \sqrt{q_x^2 + q_y^2}
 
-.. figure:: img/correlation_length_1d.jpg
+References
+----------
 
-    1D plot using the default values (w/500 data points).
-
-REFERENCE
 B Hammouda, D L Ho and S R Kline, Insight into Clustering in
 Poly(ethylene oxide) Solutions, Macromolecules, 37 (2004) 6932-6937
Index: sasmodels/models/cylinder.py
===================================================================
--- sasmodels/models/cylinder.py	(revision 0784c18939a01e611f50a2a290cae39e86083f33)
+++ sasmodels/models/cylinder.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -60,21 +60,8 @@
 ----------
 
-Validation of our code was done by comparing the output of the 1D model
+Validation of the code was done by comparing the output of the 1D model
 to the output of the software provided by the NIST (Kline, 2006).
-:num:`Figure #cylinder-compare` shows a comparison of
-the 1D output of our model and the output of the NIST software.
-
-.. _cylinder-compare:
-
-.. figure:: img/cylinder_compare.jpg
-
-    Comparison of the SasView scattering intensity for a cylinder with the
-    output of the NIST SANS analysis software.
-    The parameters were set to: *scale* = 1.0, *radius* = 20 |Ang|,
-    *length* = 400 |Ang|, *contrast* = 3e-6 |Ang^-2|, and
-    *background* = 0.01 |cm^-1|.
-
-In general, averaging over a distribution of orientations is done by
-evaluating the following
+The implementation of the intensity for fully oriented cylinders was done
+by averaging over a uniform distribution of orientations using
 
 .. math::
@@ -86,26 +73,11 @@
 where $p(\theta,\phi)$ is the probability distribution for the orientation
 and $P_0(q,\alpha)$ is the scattering intensity for the fully oriented
-system. Since we have no other software to compare the implementation of
-the intensity for fully oriented cylinders, we can compare the result of
-averaging our 2D output using a uniform distribution $p(\theta, \phi) = 1.0$.
-:num:`Figure #cylinder-crosscheck` shows the result of
-such a cross-check.
-
-.. _cylinder-crosscheck:
-
-.. figure:: img/cylinder_crosscheck.jpg
-
-    Comparison of the intensity for uniformly distributed cylinders
-    calculated from our 2D model and the intensity from the NIST SANS
-    analysis software.
-    The parameters used were: *scale* = 1.0, *radius* = 20 |Ang|,
-    *length* = 400 |Ang|, *contrast* = 3e-6 |Ang^-2|, and
-    *background* = 0.0 |cm^-1|.
-    
+system, and then comparing to the 1D result.
 
 References
 ----------
 
-None.    
+None
+
 """
 
Index: sasmodels/models/dab.py
===================================================================
--- sasmodels/models/dab.py	(revision 94bd8097c6283d5783d3cc4d94cabcc1a41bba78)
+++ sasmodels/models/dab.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -26,8 +26,4 @@
 
 .. math:: q = \sqrt{q_x^2 + q_y^2}
-
-.. figure:: img/dab_1d.jpg
-
-   1D plot using the default values (w/200 data point).
 
 
Index: sasmodels/models/ellipsoid.py
===================================================================
--- sasmodels/models/ellipsoid.py	(revision 2f0c07deb2cb7a8c0c93476fbf1e0ffbe6c278cb)
+++ sasmodels/models/ellipsoid.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -59,25 +59,11 @@
 ----------
 
-Validation of our code was done by comparing the output of the 1D model
+Validation of the code was done by comparing the output of the 1D model
 to the output of the software provided by the NIST (Kline, 2006).
-:num:`Figure ellipsoid-comparison-1d` below shows a comparison of
-the 1D output of our model and the output of the NIST software.
 
-.. _ellipsoid-comparison-1d:
+The implementation of the intensity for fully oriented ellipsoids was
+validated by averaging the 2D output using a uniform distribution
+$p(\theta,\phi) = 1.0$ and comparing with the output of the 1D calculation.
 
-.. figure:: img/ellipsoid_comparison_1d.jpg
-
-    Comparison of the SasView scattering intensity for an ellipsoid
-    with the output of the NIST SANS analysis software.  The parameters
-    were set to: *scale* = 1.0, *rpolar* = 20 |Ang|,
-    *requatorial* =400 |Ang|, *contrast* = 3e-6 |Ang^-2|,
-    and *background* = 0.01 |cm^-1|.
-
-Averaging over a distribution of orientation is done by evaluating the
-equation above. Since we have no other software to compare the
-implementation of the intensity for fully oriented ellipsoids, we can
-compare the result of averaging our 2D output using a uniform distribution
-$p(\theta,\phi) = 1.0$.  :num:`Figure #ellipsoid-comparison-2d`
-shows the result of such a cross-check.
 
 .. _ellipsoid-comparison-2d:
Index: sasmodels/models/elliptical_cylinder.py
===================================================================
--- sasmodels/models/elliptical_cylinder.py	(revision 5111921153c056b59ff03411e4b7b028d238ae26)
+++ sasmodels/models/elliptical_cylinder.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -64,15 +64,9 @@
 ----------
 
-Validation of our code was done by comparing the output of the 1D calculation to the angular average of the output of
-the 2D calculation over all possible angles. The figure below shows the comparison where the solid dot refers to
-averaged 2D values while the line represents the result of the 1D calculation (for the 2D averaging, values of 76, 180,
-and 76 degrees are taken for the angles of |theta|, |phi|, and |bigpsi| respectively).
+Validation of our code was done by comparing the output of the 1D calculation to the 
+angular average of the output of the 2D calculation over all possible angles. 
 
-.. figure:: img/elliptical_cylinder_validation_1d.png
-
-    Comparison between 1D and averaged 2D.
-
-In the 2D average, more binning in the angle |phi| is necessary to get the proper result. The following figure shows
-the results of the averaging by varying the number of angular bins.
+In the 2D average, more binning in the angle |phi| is necessary to get the proper result. 
+The following figure shows the results of the averaging by varying the number of angular bins.
 
 .. figure:: img/elliptical_cylinder_averaging.png
Index: sasmodels/models/flexible_cylinder.py
===================================================================
--- sasmodels/models/flexible_cylinder.py	(revision e7678b2f993854334aca4c45e1c7022b2fdbb509)
+++ sasmodels/models/flexible_cylinder.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -34,10 +34,4 @@
 In the parameters, the sldCyl and sldSolv represent the SLD of the chain/cylinder
 and solvent respectively.
-
-
-.. figure:: img/flexible_cylinder_1d.jpg
-
-    1D plot using the default values (w/1000 data point).
-
 
 Our model uses the form factor calculations implemented in a c-library provided
Index: sasmodels/models/flexible_cylinder_ex.py
===================================================================
--- sasmodels/models/flexible_cylinder_ex.py	(revision e7678b2f993854334aca4c45e1c7022b2fdbb509)
+++ sasmodels/models/flexible_cylinder_ex.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -70,8 +70,4 @@
 
 **No inter-cylinder interference effects are included in this calculation.**
-
-.. figure:: img/flexible_cylinder_ex_1d.jpg
-
-    1D plot using the default values (w/1000 data point).
 
 References
Index: sasmodels/models/fractal_core_shell.py
===================================================================
--- sasmodels/models/fractal_core_shell.py	(revision 7d4b2ae2af901813f3ff60e60aa0eae98f4dfd5e)
+++ sasmodels/models/fractal_core_shell.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -43,8 +43,4 @@
 
     q = \sqrt{q_x^2 + q_y^2}
-
-.. figure:: img/fractal_core_shell_1d.jpg
-
-    1D plot using the default values (w/500 data point).
 
 Reference
Index: sasmodels/models/fuzzy_sphere.py
===================================================================
--- sasmodels/models/fuzzy_sphere.py	(revision 8dca856265977fe3d9e69f78610587271bb2ed27)
+++ sasmodels/models/fuzzy_sphere.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -48,12 +48,4 @@
 
     q = \sqrt{{q_x}^2 + {q_y}^2}
-
-
-.. figure:: img/fuzzy_sphere.jpg
-
-     This example dataset is produced by running the FuzzySphereModel,
-     using 200 data points, *qmin* = 0.001 -1,
-     *qmax* = 0.7 |Ang^-1|, background = 0.001 |cm^-1| and the default values.
-
 
 
Index: sasmodels/models/gauss_lorentz_gel.py
===================================================================
--- sasmodels/models/gauss_lorentz_gel.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/gauss_lorentz_gel.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -32,9 +32,4 @@
 
     q = \sqrt{q_x^2 + q_y^2}
-
-
-.. figure:: img/gauss_lorentz_gel_1d.jpg
-
-    1D plot using the default values (w/500 data point).
 
 
Index: sasmodels/models/gaussian_peak.py
===================================================================
--- sasmodels/models/gaussian_peak.py	(revision 13ed84c3c71257d2df9c2ed4b4e98c0bfa4d7d69)
+++ sasmodels/models/gaussian_peak.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -21,8 +21,4 @@
     q = \sqrt{q_x^2 + q_y^2}
 
-
-.. figure:: img/gaussian_peak_1d.jpg
-
-    1D plot using the default values (w/500 data points).
 
 References
Index: sasmodels/models/gel_fit.py
===================================================================
--- sasmodels/models/gel_fit.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/gel_fit.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -32,8 +32,4 @@
 ~2.6 to 2.8.
 
-
-.. figure:: img/gel_fit_1d.png
-
-    1D plot using the default values (with 300 data points).
 
 Reference
Index: sasmodels/models/guinier_porod.py
===================================================================
--- sasmodels/models/guinier_porod.py	(revision fa8011eb0e6b527e15b594945876ee39b6a46dbd)
+++ sasmodels/models/guinier_porod.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -50,8 +50,4 @@
 .. math::
     q = \sqrt{q_x^2+q_y^2}
-
-.. figure:: img/guinier_porod_model.jpg
-
-    Guinier-Porod model for $R_g=100$ |Ang|, $s=1$, $m=3$, and $background=0.1$.
 
 
Index: sasmodels/models/hardsphere.py
===================================================================
--- sasmodels/models/hardsphere.py	(revision d529d93bd045e44913320de5e1c8db47f680e037)
+++ sasmodels/models/hardsphere.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -35,8 +35,4 @@
     q = \sqrt{q_x^2 + q_y^2}
 
-
-.. figure:: img/hardSphere_1d.jpg
-
-    1D plot using the default values (in linear scale).
 
 References
Index: sasmodels/models/hollow_rectangular_prism.py
===================================================================
--- sasmodels/models/hollow_rectangular_prism.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/hollow_rectangular_prism.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -75,5 +75,7 @@
 of the 1D model to the curves shown in (Nayuk, 2012).
 
-REFERENCES
+
+References
+----------
 
 R Nayuk and K Huber, *Z. Phys. Chem.*, 226 (2012) 837-854
Index: sasmodels/models/hollow_rectangular_prism_infinitely_thin_walls.py
===================================================================
--- sasmodels/models/hollow_rectangular_prism_infinitely_thin_walls.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/hollow_rectangular_prism_infinitely_thin_walls.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -67,5 +67,7 @@
 of the 1D model to the curves shown in (Nayuk, 2012).
 
-REFERENCES
+
+References
+----------
 
 R Nayuk and K Huber, *Z. Phys. Chem.*, 226 (2012) 837-854
Index: sasmodels/models/lamellar.py
===================================================================
--- sasmodels/models/lamellar.py	(revision 348557ad6267dc6c27f1b0a9f23dc61b4aae3715)
+++ sasmodels/models/lamellar.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -27,9 +27,4 @@
 
     q = \sqrt{q_x^2 + q_y^2}
-
-
-.. figure:: img/lamellar_1d.jpg
-
-    1D plot using the default values (w/1000 data point).
 
 
Index: sasmodels/models/lamellarCaille.py
===================================================================
--- sasmodels/models/lamellarCaille.py	(revision ec2ca99b9e3d90e4b91919c523a94d9855ca9c3c)
+++ sasmodels/models/lamellarCaille.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -60,7 +60,4 @@
     q = \sqrt{q_x^2 + q_y^2}
 
-.. figure:: img/lamellarCaille_1d.jpg
-
-    1D plot using the default values (w/6000 data point).
 
 References
Index: sasmodels/models/lamellarCailleHG.py
===================================================================
--- sasmodels/models/lamellarCailleHG.py	(revision 652a78a9a04424b9e84f32b660bf775a67d37463)
+++ sasmodels/models/lamellarCailleHG.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -63,7 +63,4 @@
     q = \sqrt{q_x^2 + q_y^2}
 
-.. figure:: img/lamellarCailleHG_1d.jpg
-
-    1D plot using the default values (w/6000 data point).
 
 References
Index: sasmodels/models/lamellarFFHG.py
===================================================================
--- sasmodels/models/lamellarFFHG.py	(revision 3eb6b901aa1e301f7d79b984a69d3d37509b2eb0)
+++ sasmodels/models/lamellarFFHG.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -36,8 +36,4 @@
     q = \sqrt{q_x^2 + q_y^2}
 
-
-.. figure:: img/lamellarFFHG_1d.jpg
-
-    1D plot using the default values (w/1000 data point).
 
 References
Index: sasmodels/models/lamellarPC.py
===================================================================
--- sasmodels/models/lamellarPC.py	(revision 13ed84c3c71257d2df9c2ed4b4e98c0bfa4d7d69)
+++ sasmodels/models/lamellarPC.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -84,8 +84,4 @@
 
 
-.. figure:: img/lamellarPC_1d.jpg
-
-    1D plot using the default values above (w/20000 data point).
-
 Reference
 ---------
Index: sasmodels/models/lorentz.py
===================================================================
--- sasmodels/models/lorentz.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/lorentz.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -16,7 +16,4 @@
 .. math:: q=\sqrt{q_x^2 + q_y^2}
 
-.. figure:: img/lorentz_1d.jpg
-
-    1D plot using the default values (w/200 data point).
 
 References
Index: sasmodels/models/mass_fractal.py
===================================================================
--- sasmodels/models/mass_fractal.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/mass_fractal.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -45,7 +45,4 @@
     $q$ range (see the reference for details).
 
-.. figure:: img/mass_fractal_1d.jpg
-
-    1D plot using the default values.
 
 Reference
Index: sasmodels/models/mass_surface_fractal.py
===================================================================
--- sasmodels/models/mass_surface_fractal.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/mass_surface_fractal.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -45,7 +45,4 @@
     $(surface_dim + mass_dim ) < 6$ .
 
-.. figure:: img/mass_surface_fractal_1d.jpg
-
-    1D plot using the default values.
 
 Reference
Index: sasmodels/models/mono_gauss_coil.py
===================================================================
--- sasmodels/models/mono_gauss_coil.py	(revision 246517d47d1dd00d2038b0bdb50205f635d0c46c)
+++ sasmodels/models/mono_gauss_coil.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -14,5 +14,5 @@
 
      *I(q)* = *scale* |cdot| *I* \ :sub:`0` |cdot| *P(q)* + *background*
-
+	 
 where
 
@@ -20,11 +20,11 @@
 
      *P(q)* = 2 [exp(-Z) + Z - 1] / Z \ :sup:`2`
-
-     *Z* = (*q R* \ :sub:`g`)\ :sup:`2`
+	 
+	 *Z* = (*q R* \ :sub:`g`)\ :sup:`2`
 
 and
 
-     *V* = *M* / (*N*\ :sub:`A` |delta|)
-
+	 *V* = *M* / (*N*\ :sub:`A` |delta|)
+	 
 Here, |phi|\ :sub:`poly` is the volume fraction of polymer, *V* is the volume of a polymer coil, *M* is the molecular weight of the polymer, *N*\ :sub:`A` is Avogadro's Number, |delta| is the bulk density of the polymer, |rho|\ :sub:`poly` is the sld of the polymer, |rho|\ :sub:`solv` is the sld of the solvent, and *R*\ :sub:`g` is the radius of gyration of the polymer coil.
 
@@ -52,18 +52,18 @@
 description =  """
     Evaluates the scattering from 
-    monodisperse polymer chains.
+	monodisperse polymer chains.
     """
 category =  "shape-independent"
 
 #             ["name", "units", default, [lower, upper], "type", "description"],
-parameters =  [["i_zero", "1/cm", 70.0, [0.0, inf], "", "Intensity at q=0"],
-               ["radius_gyration", "Ang", 75.0, [0.0, inf], "", "Radius of gyration"]]
+parameters =  [["i_zero", "1/cm", 1.0, [-inf, inf], "", "Intensity at q=0"],
+               ["radius_gyration", "Ang", 50.0, [0.0, inf], "", "Radius of gyration"]]
 
 # NB: Scale and Background are implicit parameters on every model
 def Iq(q, i_zero, radius_gyration):
     # pylint: disable = missing-docstring
-    z = (q * radius_gyration) * (q * radius_gyration)
-    if (q == 0).any():
-       inten = i_zero
+    z = (q * radius_gyration) ** 2
+    if q == 0:
+       inten = 1.0
     else:
        inten = i_zero * 2.0 * (exp(-z) + z - 1.0 ) / (z * z)
@@ -77,6 +77,6 @@
 
 demo =  dict(scale = 1.0,
-            i_zero = 70.0,
-            radius_gyration = 75.0,
+            i_zero = 1.0,
+            radius_gyration = 50.0,
             background = 0.0)
 
@@ -87,5 +87,5 @@
 
 tests =  [
-    [{'scale': 70.0, 'radius_gyration': 75.0, 'background': 0.0},
-     [0.0106939, 0.469418], [57.1241, 0.112859]],
+    [{'scale': 1.0, 'radius_gyration': 50.0, 'background': 0.0},
+     [0.0106939, 0.469418], [0.911141, 0.00362394]],
     ]
Index: sasmodels/models/parallelepiped.py
===================================================================
--- sasmodels/models/parallelepiped.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/parallelepiped.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -143,17 +143,13 @@
 Validation of the code was done by comparing the output of the 1D calculation
 to the angular average of the output of a 2D calculation over all possible
-angles. The Figure below shows the comparison where the solid dot refers to
-averaged 2D while the line represents the result of the 1D calculation (for
-the averaging, 76, 180, 76 points are taken for the angles of $\theta$,
-$\phi$, and $\Psi$ respectively).
-
-.. _parallelepiped-compare:
-
-.. figure:: img/parallelepiped_compare.png
-
-   Comparison between 1D and averaged 2D.
+angles. 
 
 This model is based on form factor calculations implemented in a c-library
 provided by the NIST Center for Neutron Research (Kline, 2006).
+
+References
+----------
+
+None.
 """
 
Index: sasmodels/models/peak_lorentz.py
===================================================================
--- sasmodels/models/peak_lorentz.py	(revision 04b0b30a637f374651ae93ca42ae86785daeb735)
+++ sasmodels/models/peak_lorentz.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -21,8 +21,4 @@
     q = \sqrt{q_x^2 + q_y^2}
 
-
-.. figure:: img/peak_lorentz_1d.jpg
-
-    1D plot using the default values (w/200 data point).
 
 References
Index: sasmodels/models/poly_gauss_coil.py
===================================================================
--- sasmodels/models/poly_gauss_coil.py	(revision 246517d47d1dd00d2038b0bdb50205f635d0c46c)
+++ sasmodels/models/poly_gauss_coil.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -14,5 +14,5 @@
 
      *I(q)* = *scale* |cdot| *I* \ :sub:`0` |cdot| *P(q)* + *background*
-
+	 
 where
 
@@ -20,13 +20,13 @@
 
      *P(q)* = 2 [(1 + UZ)\ :sup:`-1/U` + Z - 1] / [(1 + U) Z\ :sup:`2`]
-
-     *Z* = [(*q R*\ :sub:`g`)\ :sup:`2`] / (1 + 2U)
-
-     *U* = (Mw / Mn) - 1 = (*polydispersity ratio*) - 1
+	 
+	 *Z* = [(*q R*\ :sub:`g`)\ :sup:`2`] / (1 + 2U)
+	 
+	 *U* = (Mw / Mn) - 1 = (*polydispersity ratio*) - 1
 
 and
 
-     *V* = *M* / (*N*\ :sub:`A` |delta|)
-
+	 *V* = *M* / (*N*\ :sub:`A` |delta|)
+	 
 Here, |phi|\ :sub:`poly`, is the volume fraction of polymer, *V* is the volume of a polymer coil, *M* is the molecular weight of the polymer, *N*\ :sub:`A` is Avogadro's Number, |delta| is the bulk density of the polymer, |rho|\ :sub:`poly` is the sld of the polymer, |rho|\ :sub:`solv` is the sld of the solvent, and *R*\ :sub:`g` is the radius of gyration of the polymer coil.
 
@@ -57,11 +57,11 @@
 description =  """
     Evaluates the scattering from 
-    polydisperse polymer chains.
+	polydisperse polymer chains.
     """
 category =  "shape-independent"
 
 #             ["name", "units", default, [lower, upper], "type", "description"],
-parameters =  [["i_zero", "1/cm", 70.0, [0.0, inf], "", "Intensity at q=0"],
-               ["radius_gyration", "Ang", 75.0, [0.0, inf], "", "Radius of gyration"],
+parameters =  [["i_zero", "1/cm", 1.0, [-inf, inf], "", "Intensity at q=0"],
+               ["radius_gyration", "Ang", 50.0, [0.0, inf], "", "Radius of gyration"],
                ["polydispersity", "None", 2.0, [1.0, inf], "", "Polymer Mw/Mn"]]
 
@@ -69,17 +69,15 @@
 def Iq(q, i_zero, radius_gyration, polydispersity):
     # pylint: disable = missing-docstring
-    # need to trap the case of the polydispersity being 1 (ie, monodispersity)
     u = polydispersity - 1.0
-    if polydispersity == 1:
-       minusoneonu = -1.0 / u
+    # TO DO
+    # should trap the case of polydispersity = 1 by switching to a taylor expansion
+    minusoneonu = -1.0 / u
+    z = (q * radius_gyration) ** 2 / (1.0 + 2.0 * u)
+    if q == 0:
+        inten = i_zero * 1.0
     else:
-       minusoneonu = -1.0 / u
-    z = ((q * radius_gyration) * (q * radius_gyration)) / (1.0 + 2.0 * u)
-    if (q == 0).any():
-       inten = i_zero
-    else:
-       inten = i_zero * 2.0 * (power((1.0 + u * z),minusoneonu) + z - 1.0 ) / ((1.0 + u) * (z * z))
+        inten = i_zero * 2.0 * (power((1.0 + u * z),minusoneonu) + z - 1.0 ) / ((1.0 + u) * (z * z))
     return inten
-Iq.vectorized =  True  # Iq accepts an array of q values
+#Iq.vectorized = True # Iq accepts an array of q values
 
 def Iqxy(qx, qy, *args):
@@ -89,6 +87,6 @@
 
 demo =  dict(scale = 1.0,
-            i_zero = 70.0,
-            radius_gyration = 75.0,
+            i_zero = 1.0,
+            radius_gyration = 50.0,
             polydispersity = 2.0,
             background = 0.0)
@@ -101,5 +99,5 @@
 
 tests =  [
-    [{'scale': 70.0, 'radius_gyration': 75.0, 'polydispersity': 2.0, 'background': 0.0},
-     [0.0106939, 0.469418], [57.6405, 0.169016]],
+    [{'scale': 1.0, 'radius_gyration': 50.0, 'polydispersity': 2.0, 'background': 0.0},
+     [0.0106939, 0.469418], [0.912993, 0.0054163]],
     ]
Index: sasmodels/models/polymer_excl_volume.py
===================================================================
--- sasmodels/models/polymer_excl_volume.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/polymer_excl_volume.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -81,11 +81,4 @@
 
     q = \sqrt{q_x^2 + q_y^2}
-
-This example dataset is produced using 200 data points, $qmin=0.001Ang^{-1}$,
-$qmax=0.2Ang^{-1}$ and the default values
-
-.. figure:: img/polymer_excl_volume_1d.jpg
-
-    1D plot using the default values (w/500 data point).
 
 
Index: sasmodels/models/power_law.py
===================================================================
--- sasmodels/models/power_law.py	(revision b15849cd5f00f9f0529b67f50a329928aa0ad7a6)
+++ sasmodels/models/power_law.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -20,7 +20,4 @@
 combining this model with other models.
 
-.. figure:: img/power_law_1d.jpg
-
-    1D plot using the default values (w/200 data point).
 
 References
Index: sasmodels/models/rectangular_prism.py
===================================================================
--- sasmodels/models/rectangular_prism.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/rectangular_prism.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -71,5 +71,7 @@
 to the output of the existing :ref:`parallelepiped` model.
 
-REFERENCES
+
+References
+----------
 
 P Mittelbach and G Porod, *Acta Physica Austriaca*, 14 (1961) 185-211
Index: sasmodels/models/rpa.py
===================================================================
--- sasmodels/models/rpa.py	(revision 5cfda00e2127f7bc13806a82cd24ec5eacbae59c)
+++ sasmodels/models/rpa.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -43,7 +43,4 @@
 component.
 
-.. figure:: img/rpa_1d.jpg
-
-    1D plot using the default values (w/500 data points).
 
 References
Index: sasmodels/models/sphere.py
===================================================================
--- sasmodels/models/sphere.py	(revision ad90df9f3ed42019113506f1366fe4b851b5f389)
+++ sasmodels/models/sphere.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -33,15 +33,4 @@
 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 :num:`figure #sphere-comparison` shows a comparison of the output
-of our model and the output of the NIST software.
-
-.. _sphere-comparison:
-
-.. figure:: img/sphere_comparison.jpg
-
-    Comparison of the DANSE scattering intensity for a sphere with the
-    output of the NIST SANS analysis software. The parameters were set to:
-    *scale* = 1.0, *radius* = 60 |Ang|, *contrast* = 1e-6 |Ang^-2|, and
-    *background* = 0.01 |cm^-1|.
 
 
Index: sasmodels/models/spherepy.py
===================================================================
--- sasmodels/models/spherepy.py	(revision d2950f4360cecbd3a71cc4eb7a857316a173acf4)
+++ sasmodels/models/spherepy.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -33,15 +33,4 @@
 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 :num:`figure #spherepy-comparison` shows a comparison of the output
-of our model and the output of the NIST software.
-
-.. _spherepy-comparison:
-
-.. figure:: img/sphere_comparison.jpg
-
-    Comparison of the DANSE scattering intensity for a sphere with the
-    output of the NIST SANS analysis software. The parameters were set to:
-    *scale* = 1.0, *radius* = 60 |Ang|, *contrast* = 1e-6 |Ang^-2|, and
-    *background* = 0.01 |cm^-1|.
 
 
Index: sasmodels/models/star_polymer.py
===================================================================
--- sasmodels/models/star_polymer.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/star_polymer.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -26,8 +26,4 @@
 
 is the square of the ensemble average radius-of-gyration of an arm.
-
-.. figure:: img/star_polymer_1d.jpg
-
-    1D plot using the default values.
 
 
Index: sasmodels/models/surface_fractal.py
===================================================================
--- sasmodels/models/surface_fractal.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/surface_fractal.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -44,8 +44,4 @@
     details)
 
-
-.. figure:: img/surface_fractal_1d.jpg
-
-    1D plot using the default values.
 
 Reference
Index: sasmodels/models/teubner_strey.py
===================================================================
--- sasmodels/models/teubner_strey.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/teubner_strey.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -35,8 +35,4 @@
     q = \sqrt{q_x^2 + q_y^2}
 
-
-.. figure:: img/teubner_strey_1d.jpg
-
-    1D plot using the default values (w/200 data point).
 
 References
Index: sasmodels/models/triaxial_ellipsoid.py
===================================================================
--- sasmodels/models/triaxial_ellipsoid.py	(revision 2f0c07deb2cb7a8c0c93476fbf1e0ffbe6c278cb)
+++ sasmodels/models/triaxial_ellipsoid.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -64,14 +64,5 @@
 1D calculation to the angular average of the output of 2D calculation
 over all possible angles.
-:num:`Figure #triaxial-ellipsoid-comparison` shows the comparison where
-the solid dot refers to averaged 2D while the line represents the
-result of 1D calculation (for 2D averaging, 76, 180, and 76 points
-are taken for the angles of $\theta$, $\phi$, and $\psi$ respectively).
 
-.. _triaxial-ellipsoid-comparison:
-
-.. figure:: img/triaxial_ellipsoid_comparison.png
-
-    Comparison between 1D and averaged 2D.
 
 References
Index: sasmodels/models/two_lorentzian.py
===================================================================
--- sasmodels/models/two_lorentzian.py	(revision 168052c5791506d7dfad00173f5636fc5701ad11)
+++ sasmodels/models/two_lorentzian.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -24,8 +24,4 @@
     q = \sqrt{q_x^2 + q_y^2}
 
-
-.. figure:: img/two_lorentzian.jpg
-
-    1D plot using the default values (w/500 data point).
 
 References
Index: sasmodels/models/two_power_law.py
===================================================================
--- sasmodels/models/two_power_law.py	(revision 7e1d090d6f1579784a2df1a534eda3abdc9c2d5a)
+++ sasmodels/models/two_power_law.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -36,8 +36,4 @@
     q = \sqrt{q_x^2 + q_y^2}
 
-
-.. figure:: img/two_power_law_1d.jpg
-
-    1D plot using the default values (with 500 data point).
 
 References
Index: sasmodels/models/vesicle.py
===================================================================
--- sasmodels/models/vesicle.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
+++ sasmodels/models/vesicle.py	(revision aa2edb2b2fb550caed0506dcf63bc7eac7e1779a)
@@ -50,11 +50,7 @@
 radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied.
 
-.. figure:: img/vesicle_1d.jpg
 
-    1D plot using the default values given in the table (w/200 data point).
-    Polydispersity and instrumental resolution normally will smear out most
-    of the rapidly oscillating features.
-
-REFERENCE
+References
+----------
 
 A Guinier and G. Fournet, *Small-Angle Scattering of X-Rays*, John Wiley and
