Index: sasmodels/models/barbell.py
===================================================================
--- sasmodels/models/barbell.py	(revision 0d6e86566d51a1fba22933bdbac8c40d36f9bd76)
+++ sasmodels/models/barbell.py	(revision fcb33e4672814b4a8fe1ee865d430090b5fc03e6)
@@ -20,23 +20,23 @@
 .. math::
 
-    I(q) = \frac{\Delta \rho^2}{V} \left<A^2(q)\right>
+    I(q) = \frac{\Delta \rho^2}{V} \left<A^2(q,\alpha).sin(\alpha)\right>
 
-where the amplitude $A(q)$ is given as
+where the amplitude $A(q,\alpha)$ with the rod axis at angle $\alpha$ to $q$ is given as
 
 .. math::
 
     A(q) =&\ \pi r^2L
-        \frac{\sin\left(\tfrac12 qL\cos\theta\right)}
-             {\tfrac12 qL\cos\theta}
-        \frac{2 J_1(qr\sin\theta)}{qr\sin\theta} \\
+        \frac{\sin\left(\tfrac12 qL\cos\alpha\right)}
+             {\tfrac12 qL\cos\alpha}
+        \frac{2 J_1(qr\sin\alpha)}{qr\sin\alpha} \\
         &\ + 4 \pi R^3 \int_{-h/R}^1 dt
-        \cos\left[ q\cos\theta
+        \cos\left[ q\cos\alpha
             \left(Rt + h + {\tfrac12} L\right)\right]
         \times (1-t^2)
-        \frac{J_1\left[qR\sin\theta \left(1-t^2\right)^{1/2}\right]}
-             {qR\sin\theta \left(1-t^2\right)^{1/2}}
+        \frac{J_1\left[qR\sin\alpha \left(1-t^2\right)^{1/2}\right]}
+             {qR\sin\alpha \left(1-t^2\right)^{1/2}}
 
 The $\left<\ldots\right>$ brackets denote an average of the structure over
-all orientations. $\left<A^2(q)\right>$ is then the form factor, $P(q)$.
+all orientations. $\left<A^2(q,\alpha)\right>$ is then the form factor, $P(q)$.
 The scale factor is equivalent to the volume fraction of cylinders, each of
 volume, $V$. Contrast $\Delta\rho$ is the difference of scattering length
@@ -85,5 +85,5 @@
 * **Author:** NIST IGOR/DANSE **Date:** pre 2010
 * **Last Modified by:** Paul Butler **Date:** March 20, 2016
-* **Last Reviewed by:** Paul Butler **Date:** March 20, 2016
+* **Last Reviewed by:** Richard Heenan **Date:** January 4, 2017
 """
 from numpy import inf
Index: sasmodels/models/capped_cylinder.py
===================================================================
--- sasmodels/models/capped_cylinder.py	(revision 0d6e86566d51a1fba22933bdbac8c40d36f9bd76)
+++ sasmodels/models/capped_cylinder.py	(revision fcb33e4672814b4a8fe1ee865d430090b5fc03e6)
@@ -21,20 +21,20 @@
 .. math::
 
-    I(q) = \frac{\Delta \rho^2}{V} \left<A^2(q)\right>
+    I(q) = \frac{\Delta \rho^2}{V} \left<A^2(q,\alpha).sin(\alpha)\right>
 
-where the amplitude $A(q)$ is given as
+where the amplitude $A(q,\alpha)$ with the rod axis at angle $\alpha$ to $q$ is given as
 
 .. math::
 
     A(q) =&\ \pi r^2L
-        \frac{\sin\left(\tfrac12 qL\cos\theta\right)}
-            {\tfrac12 qL\cos\theta}
-        \frac{2 J_1(qr\sin\theta)}{qr\sin\theta} \\
+        \frac{\sin\left(\tfrac12 qL\cos\alpha\right)}
+            {\tfrac12 qL\cos\alpha}
+        \frac{2 J_1(qr\sin\alpha)}{qr\sin\alpha} \\
         &\ + 4 \pi R^3 \int_{-h/R}^1 dt
-        \cos\left[ q\cos\theta
+        \cos\left[ q\cos\alpha
             \left(Rt + h + {\tfrac12} L\right)\right]
         \times (1-t^2)
-        \frac{J_1\left[qR\sin\theta \left(1-t^2\right)^{1/2}\right]}
-             {qR\sin\theta \left(1-t^2\right)^{1/2}}
+        \frac{J_1\left[qR\sin\alpha \left(1-t^2\right)^{1/2}\right]}
+             {qR\sin\alpha \left(1-t^2\right)^{1/2}}
 
 The $\left<\ldots\right>$ brackets denote an average of the structure over
@@ -88,5 +88,6 @@
 * **Author:** NIST IGOR/DANSE **Date:** pre 2010
 * **Last Modified by:** Paul Butler **Date:** September 30, 2016
-* **Last Reviewed by:** Richard Heenan **Date:** March 19, 2016
+* **Last Reviewed by:** Richard Heenan **Date:** January 4, 2017
+
 """
 from numpy import inf
Index: sasmodels/models/core_shell_bicelle.py
===================================================================
--- sasmodels/models/core_shell_bicelle.py	(revision b829b161dd452ced7aab4d44d03905daab7234ac)
+++ sasmodels/models/core_shell_bicelle.py	(revision fcb33e4672814b4a8fe1ee865d430090b5fc03e6)
@@ -41,5 +41,5 @@
 
     I(Q,\alpha) = \frac{\text{scale}}{V_t} \cdot
-        F(Q,\alpha)^2 + \text{background}
+        F(Q,\alpha)^2.sin(\alpha) + \text{background}
 
 where
@@ -85,5 +85,5 @@
 * **Author:** NIST IGOR/DANSE **Date:** pre 2010
 * **Last Modified by:** Paul Butler **Date:** September 30, 2016
-* **Last Reviewed by:** Richard Heenan **Date:** October 5, 2016
+* **Last Reviewed by:** Richard Heenan **Date:** January 4, 2017
 """
 
Index: sasmodels/models/core_shell_bicelle_elliptical.c
===================================================================
--- sasmodels/models/core_shell_bicelle_elliptical.c	(revision fcb33e4672814b4a8fe1ee865d430090b5fc03e6)
+++ sasmodels/models/core_shell_bicelle_elliptical.c	(revision fcb33e4672814b4a8fe1ee865d430090b5fc03e6)
@@ -0,0 +1,139 @@
+double form_volume(double radius, double x_core, double thick_rim, double thick_face, double length);
+double Iq(double q,
+          double radius,
+          double x_core,
+          double thick_rim,
+          double thick_face,
+          double length,
+          double core_sld,
+          double face_sld,
+          double rim_sld,
+          double solvent_sld);
+
+
+double Iqxy(double qx, double qy,
+          double radius,
+          double x_core,
+          double thick_rim,
+          double thick_face,
+          double length,
+          double core_sld,
+          double face_sld,
+          double rim_sld,
+          double solvent_sld,
+          double theta,
+          double phi,
+          double psi);
+
+// NOTE that "length" here is the full height of the core!
+double form_volume(double radius, double x_core, double thick_rim, double thick_face, double length)
+{
+    return M_PI*(radius+thick_rim)*(radius*x_core+thick_rim)*(length+2.0*thick_face);
+}
+
+double 
+                Iq(double qq,
+                   double rad,
+                   double x_core,
+                   double radthick,
+                   double facthick,
+                   double length,
+                   double rhoc,
+                   double rhoh,
+                   double rhor,
+                   double rhosolv)
+{
+    double si1,si2,be1,be2;
+     // core_shell_bicelle_elliptical, RKH Dec 2016, based on elliptical_cylinder and core_shell_bicelle
+     // tested against limiting cases of cylinder, elliptical_cylinder and core_shell_bicelle
+     //    const double uplim = M_PI_4;
+    const double halfheight = 0.5*length;
+    //const double va = 0.0;
+    //const double vb = 1.0;
+    // inner integral limits
+    //const double vaj=0.0;
+    //const double vbj=M_PI;
+
+    const double radius_major = rad * x_core;
+    const double rA = 0.5*(square(radius_major) + square(rad));
+    const double rB = 0.5*(square(radius_major) - square(rad));
+    const double dr1 = (rhoc-rhoh)   *M_PI*rad*radius_major*(2.0*halfheight);;
+    const double dr2 = (rhor-rhosolv)*M_PI*(rad+radthick)*(radius_major+radthick)*2.0*(halfheight+facthick);
+    const double dr3 = (rhoh-rhor)   *M_PI*rad*radius_major*2.0*(halfheight+facthick);
+    //const double vol1 = M_PI*rad*radius_major*(2.0*halfheight);
+    //const double vol2 = M_PI*(rad+radthick)*(radius_major+radthick)*2.0*(halfheight+facthick);
+    //const double vol3 = M_PI*rad*radius_major*2.0*(halfheight+facthick);
+
+    //initialize integral
+    double outer_sum = 0.0;
+    for(int i=0;i<76;i++) {
+        //setup inner integral over the ellipsoidal cross-section
+        // since we generate these lots of times, why not store them somewhere?
+        //const double cos_alpha = ( Gauss76Z[i]*(vb-va) + va + vb )/2.0;
+        const double cos_alpha = ( Gauss76Z[i] + 1.0 )/2.0;
+        const double sin_alpha = sqrt(1.0 - cos_alpha*cos_alpha);
+        double inner_sum=0;
+        double sinarg1 = qq*halfheight*cos_alpha;
+        double sinarg2 = qq*(halfheight+facthick)*cos_alpha;
+        si1 = sinc(sinarg1);
+        si2 = sinc(sinarg2);
+        for(int j=0;j<76;j++) {
+            //76 gauss points for the inner integral (WAS 20 points,so this may make unecessarily slow, but playing safe)
+            //const double beta = ( Gauss76Z[j]*(vbj-vaj) + vaj + vbj )/2.0;
+            const double beta = ( Gauss76Z[j] +1.0)*M_PI_2;
+            const double rr = sqrt(rA - rB*cos(beta));
+            double besarg1 = qq*rr*sin_alpha;
+            double besarg2 = qq*(rr+radthick)*sin_alpha;
+            be1 = sas_J1c(besarg1);
+            be2 = sas_J1c(besarg2);
+            inner_sum += Gauss76Wt[j] *square(dr1*si1*be1 +
+                                              dr2*si2*be2 +
+                                              dr3*si2*be1);
+        }
+        //now calculate outer integral
+        outer_sum += Gauss76Wt[i] * inner_sum;
+    }
+
+    return outer_sum*2.5e-05;
+}
+
+double 
+Iqxy(double qx, double qy,
+          double rad,
+          double x_core,
+          double radthick,
+          double facthick,
+          double length,
+          double rhoc,
+          double rhoh,
+          double rhor,
+          double rhosolv,
+          double theta,
+          double phi,
+          double psi)
+{
+       // THIS NEEDS TESTING
+    double qq, cos_val, cos_mu, cos_nu;
+    ORIENT_ASYMMETRIC(qx, qy, theta, phi, psi, qq, cos_val, cos_mu, cos_nu);
+    const double dr1 = rhoc-rhoh;
+    const double dr2 = rhor-rhosolv;
+    const double dr3 = rhoh-rhor;
+    const double radius_major = rad*x_core;
+    const double halfheight = 0.5*length;
+    const double vol1 = M_PI*rad*radius_major*length;
+    const double vol2 = M_PI*(rad+radthick)*(radius_major+radthick)*2.0*(halfheight+facthick);
+    const double vol3 = M_PI*rad*radius_major*2.0*(halfheight+facthick);
+
+    // Compute:  r = sqrt((radius_major*cos_nu)^2 + (radius_minor*cos_mu)^2)
+    // Given:    radius_major = r_ratio * radius_minor  
+    // ASSUME the sin_alpha is included in the separate integration over orientation of rod angle
+    const double r = rad*sqrt(square(x_core*cos_nu) + cos_mu*cos_mu);
+    const double be1 = sas_J1c(qq*r);
+    const double be2 = sas_J1c( qq*(r + radthick ) );
+    const double si1 = sinc( qq*halfheight*cos_val );
+    const double si2 = sinc( qq*(halfheight + facthick)*cos_val );
+    const double Aq = square( vol1*dr1*si1*be1 + vol2*dr2*si2*be2 +  vol3*dr3*si2*be1);
+    //const double vol = form_volume(radius_minor, r_ratio, length);
+    return 1.0e-4 * Aq;
+}
+
Index: sasmodels/models/core_shell_bicelle_elliptical.py
===================================================================
--- sasmodels/models/core_shell_bicelle_elliptical.py	(revision fcb33e4672814b4a8fe1ee865d430090b5fc03e6)
+++ sasmodels/models/core_shell_bicelle_elliptical.py	(revision fcb33e4672814b4a8fe1ee865d430090b5fc03e6)
@@ -0,0 +1,159 @@
+r"""
+Definition
+----------
+
+This model provides the form factor for an elliptical cylinder with a
+core-shell scattering length density profile. Thus this is a variation
+of the core-shell bicelle model, but with an elliptical cylinder for the core.
+Outer shells on the rims and flat ends may be of different thicknesses and 
+scattering length densities. The form factor is normalized by the total particle volume.
+
+
+.. figure:: img/core_shell_bicelle_geometry.png
+
+    Schematic cross-section of bicelle. Note however that the model here
+    calculates for rectangular, not curved, rims as shown below.
+
+.. figure:: img/core_shell_bicelle_parameters.png
+
+   Cross section of model used here. Users will have 
+   to decide how to distribute "heads" and "tails" between the rim, face 
+   and core regions in order to estimate appropriate starting parameters.
+
+Given the scattering length densities (sld) $\rho_c$, the core sld, $\rho_f$,
+the face sld, $\rho_r$, the rim sld and $\rho_s$ the solvent sld, the
+scattering length density variation along the bicelle axis is:
+
+.. math::
+
+    \rho(r) = 
+      \begin{cases} 
+      &\rho_c \text{ for } 0 \lt r \lt R; -L \lt z\lt L \\[1.5ex]
+      &\rho_f \text{ for } 0 \lt r \lt R; -(L+2t) \lt z\lt -L;
+      L \lt z\lt (L+2t) \\[1.5ex]
+      &\rho_r\text{ for } 0 \lt r \lt R; -(L+2t) \lt z\lt -L; L \lt z\lt (L+2t)
+      \end{cases}
+
+The form factor for the bicelle is calculated in cylindrical coordinates, where
+$\alpha$ is the angle between the $Q$ vector and the cylinder axis, and $\psi$ is the angle
+for the ellipsoidal cross section core, to give:
+
+.. math::
+
+    I(Q,\alpha,\psi) = \frac{\text{scale}}{V_t} \cdot
+        F(Q,\alpha, \psi)^2.sin(\alpha) + \text{background}
+
+where a numerical integration of $F(Q,\alpha, \psi)^2.sin(\alpha)$ is carried out over \alpha and \psi for:
+
+.. math::
+
+        \begin{align}    
+    F(Q,\alpha,\psi) = &\bigg[ 
+    (\rho_c - \rho_f) V_c \frac{2J_1(QR'sin \alpha)}{QR'sin\alpha}\frac{sin(QLcos\alpha/2)}{Q(L/2)cos\alpha} \\
+    &+(\rho_f - \rho_r) V_{c+f} \frac{2J_1(QR'sin\alpha)}{QR'sin\alpha}\frac{sin(Q(L/2+t_f)cos\alpha)}{Q(L/2+t_f)cos\alpha} \\
+    &+(\rho_r - \rho_s) V_t \frac{2J_1(Q(R'+t_r)sin\alpha)}{Q(R'+t_r)sin\alpha}\frac{sin(Q(L/2+t_f)cos\alpha)}{Q(L/2+t_f)cos\alpha}
+    \bigg]
+    \end{align} 
+
+where
+
+.. math::
+
+    R'=\frac{R}{\sqrt{2}}\sqrt{(1+X_{core}^{2}) + (1-X_{core}^{2})cos(\psi)}
+    
+    
+and $V_t = \pi.(R+t_r)(Xcore.R+t_r)^2.(L+2.t_f)$ is the total volume of the bicelle, 
+$V_c = \pi.Xcore.R^2.L$ the volume of the core, $V_{c+f} = \pi.Xcore.R^2.(L+2.t_f)$ 
+the volume of the core plus the volume of the faces, $R$ is the radius
+of the core, $Xcore$ is the axial ratio of the core, $L$ the length of the core, 
+$t_f$ the thickness of the face, $t_r$ the thickness of the rim and $J_1$ the usual 
+first order bessel function. The core has radii $R$ and $Xcore.R$ so is circular, 
+as for the core_shell_bicelle model, for $Xcore$ =1. Note that you may need to 
+limit the range of $Xcore$, especially if using the Monte-Carlo algorithm, as 
+setting radius to $R/Xcore$ and axial ratio to $1/Xcore$ gives an equivalent solution!
+
+The output of the 1D scattering intensity function for randomly oriented
+bicelles is then given by integrating over all possible $\alpha$ and $\psi$.
+
+For oriented bicellles the *theta*, *phi* and *psi* orientation parameters only appear when fitting 2D data, 
+see the :ref:`elliptical-cylinder` model for further information.
+
+
+.. figure:: img/elliptical_cylinder_angle_definition.jpg
+
+    Definition of the angles for the oriented core_shell_bicelle_elliptical model.
+
+
+References
+----------
+
+.. [#]
+
+Authorship and Verification
+----------------------------
+
+* **Author:** Richard Heenan **Date:** December 14, 2016
+* **Last Modified by:**  Richard Heenan **Date:** December 14, 2016
+* **Last Reviewed by:**  Richard Heenan BEWARE 2d data yet to be checked **Date:** December 14, 2016
+"""
+
+from numpy import inf, sin, cos
+
+name = "core_shell_bicelle_elliptical"
+title = "Elliptical cylinder with a core-shell scattering length density profile.."
+description = """
+    core_shell_bicelle_elliptical
+    Elliptical cylinder core, optional shell on the two flat faces, and shell of 
+    uniform thickness on its rim (extending around the end faces).    
+    Please see full documentation for equations and further details.
+    Involves a double numerical integral around the ellipsoid diameter
+    and the angle of the cylinder axis to Q.
+    Compare also the core_shell_bicelle and elliptical_cylinder models.
+      """
+category = "shape:cylinder"
+
+# pylint: disable=bad-whitespace, line-too-long
+#             ["name", "units", default, [lower, upper], "type", "description"],
+parameters = [
+    ["radius",         "Ang",       30, [0, inf],    "volume",      "Cylinder core radius"],
+    ["x_core",        "None",       3,  [0, inf],    "volume",      "axial ratio of core, X = r_polar/r_equatorial"],
+    ["thick_rim",  "Ang",        8, [0, inf],    "volume",      "Rim shell thickness"],
+    ["thick_face", "Ang",       14, [0, inf],    "volume",      "Cylinder face thickness"],
+    ["length",         "Ang",      50, [0, inf],    "volume",      "Cylinder length"],
+    ["sld_core",       "1e-6/Ang^2", 4, [-inf, inf], "sld",         "Cylinder core scattering length density"],
+    ["sld_face",       "1e-6/Ang^2", 7, [-inf, inf], "sld",         "Cylinder face scattering length density"],
+    ["sld_rim",        "1e-6/Ang^2", 1, [-inf, inf], "sld",         "Cylinder rim scattering length density"],
+    ["sld_solvent",    "1e-6/Ang^2", 6, [-inf, inf], "sld",         "Solvent scattering length density"],
+    ["theta",          "degrees",   90, [-360, 360], "orientation", "In plane angle"],
+    ["phi",            "degrees",    0, [-360, 360], "orientation", "Out of plane angle"],
+    ["psi",            "degrees",    0, [-360, 360], "orientation", "Major axis angle relative to Q"],
+    ]
+
+# pylint: enable=bad-whitespace, line-too-long
+
+source = ["lib/Si.c", "lib/polevl.c", "lib/sas_J1.c", "lib/gauss76.c","core_shell_bicelle_elliptical.c"]
+
+demo = dict(scale=1, background=0,
+            radius=30.0,
+            x_core=3.0,
+            thick_rim=8.0,
+            thick_face=14.0,
+            length=50.0,
+            sld_core=4.0,
+            sld_face=7.0,
+            sld_rim=1.0,
+            sld_solvent=6.0,
+            theta=90,
+            phi=0,
+            psi=0)
+
+qx, qy = 0.4 * cos(90), 0.5 * sin(0)
+
+tests = [
+    [{'radius': 30.0, 'x_core': 3.0, 'thick_rim':8.0, 'thick_face':14.0, 'length':50.0}, 'ER', 1],
+    [{'radius': 30.0, 'x_core': 3.0, 'thick_rim':8.0, 'thick_face':14.0, 'length':50.0}, 'VR', 1],
+
+    [{'radius': 30.0, 'x_core': 3.0, 'thick_rim':8.0, 'thick_face':14.0, 'length':50.0,
+    'sld_core':4.0, 'sld_face':7.0, 'sld_rim':1.0, 'sld_solvent':6.0, 'background':0.0},
+    0.015, 286.540286],
+]
Index: sasmodels/models/core_shell_cylinder.py
===================================================================
--- sasmodels/models/core_shell_cylinder.py	(revision 755ecc2c8863bbe3bdb29424e14f1f9a805f7e6e)
+++ sasmodels/models/core_shell_cylinder.py	(revision fcb33e4672814b4a8fe1ee865d430090b5fc03e6)
@@ -9,5 +9,5 @@
 .. math::
 
-    I(q,\alpha) = \frac{\text{scale}}{V_s} F^2(q) + \text{background}
+    I(q,\alpha) = \frac{\text{scale}}{V_s} F^2(q,\alpha).sin(\alpha) + \text{background}
 
 where
@@ -15,5 +15,5 @@
 .. math::
 
-    F(q) = &\ (\rho_c - \rho_s) V_c
+    F(q,\alpha) = &\ (\rho_c - \rho_s) V_c
            \frac{\sin \left( q \tfrac12 L\cos\alpha \right)}
                 {q \tfrac12 L\cos\alpha}
Index: sasmodels/models/core_shell_ellipsoid.py
===================================================================
--- sasmodels/models/core_shell_ellipsoid.py	(revision 73e08aee242fc777e9b6a88ee4ab9fea7732e685)
+++ sasmodels/models/core_shell_ellipsoid.py	(revision fcb33e4672814b4a8fe1ee865d430090b5fc03e6)
@@ -166,42 +166,43 @@
 qy = q*sin(phi)
 # After redefinition of angles find new reasonable values for unit test
-#tests = [
-#    # Accuracy tests based on content in test/utest_coreshellellipsoidXTmodel.py
-#    [{'radius_equat_core': 200.0,
-#      'x_core': 0.1,
-#      'thick_shell': 50.0,
-#      'x_polar_shell': 0.2,
-#      'sld_core': 2.0,
-#      'sld_shell': 1.0,
-#      'sld_solvent': 6.3,
-#      'background': 0.001,
-#      'scale': 1.0,
-#     }, 1.0, 0.00189402],
+tests = [
+     # Accuracy tests based on content in test/utest_coreshellellipsoidXTmodel.py
+    [{'radius_equat_core': 200.0,
+      'x_core': 0.1,
+      'thick_shell': 50.0,
+      'x_polar_shell': 0.2,
+      'sld_core': 2.0,
+      'sld_shell': 1.0,
+      'sld_solvent': 6.3,
+      'background': 0.001,
+      'scale': 1.0,
+     }, 1.0, 0.00189402],
 
     # Additional tests with larger range of parameters
-#    [{'background': 0.01}, 0.1, 11.6915],
-
-#    [{'radius_equat_core': 20.0,
-#      'x_core': 200.0,
-#      'thick_shell': 54.0,
-#      'x_polar_shell': 3.0,
-#      'sld_core': 20.0,
-#      'sld_shell': 10.0,
-#      'sld_solvent': 6.0,
-#      'background': 0.0,
-#      'scale': 1.0,
-#     }, 0.01, 8688.53],
-
-#   [{'background': 0.001}, (0.4, 0.5), 0.00690673],
-
-#   [{'radius_equat_core': 20.0,
-#      'x_core': 200.0,
-#      'thick_shell': 54.0,
-#      'x_polar_shell': 3.0,
-#      'sld_core': 20.0,
-#      'sld_shell': 10.0,
-#      'sld_solvent': 6.0,
-#      'background': 0.01,
-#      'scale': 0.01,
-#     }, (qx, qy), 0.0100002],
-#    ]
+    [{'background': 0.01}, 0.1, 11.6915],
+
+    [{'radius_equat_core': 20.0,
+      'x_core': 200.0,
+      'thick_shell': 54.0,
+      'x_polar_shell': 3.0,
+      'sld_core': 20.0,
+      'sld_shell': 10.0,
+      'sld_solvent': 6.0,
+      'background': 0.0,
+      'scale': 1.0,
+     }, 0.01, 8688.53],
+
+    [{'background': 0.001}, (0.4, 0.5), 0.00690673],
+
+   [{'radius_equat_core': 20.0,
+      'x_core': 200.0,
+      'thick_shell': 54.0,
+      'x_polar_shell': 3.0,
+      'sld_core': 20.0,
+      'sld_shell': 10.0,
+      'sld_solvent': 6.0,
+      'background': 0.01,
+      'scale': 0.01,
+# assuming theta and phi zero here?
+     }, (qx, qy), 0.01000025],
+    ]
Index: sasmodels/models/cylinder.py
===================================================================
--- sasmodels/models/cylinder.py	(revision 4cdd0cc83e644cfa2cf6045c86fd32ccd5ccf2ef)
+++ sasmodels/models/cylinder.py	(revision fcb33e4672814b4a8fe1ee865d430090b5fc03e6)
@@ -2,5 +2,5 @@
 # Note: model title and parameter table are inserted automatically
 r"""
-The form factor is normalized by the particle volume V = \piR^2L.
+
 For information about polarised and magnetic scattering, see
 the :ref:`magnetism` documentation.
@@ -14,5 +14,5 @@
 .. math::
 
-    P(q,\alpha) = \frac{\text{scale}}{V} F^2(q,\alpha) + \text{background}
+    P(q,\alpha) = \frac{\text{scale}}{V} F^2(q,\alpha).sin(\alpha) + \text{background}
 
 where
@@ -25,5 +25,5 @@
            \frac{J_1 \left(q R \sin \alpha\right)}{q R \sin \alpha}
 
-and $\alpha$ is the angle between the axis of the cylinder and $\vec q$, $V$
+and $\alpha$ is the angle between the axis of the cylinder and $\vec q$, $V =\pi R^2L$
 is the volume of the cylinder, $L$ is the length of the cylinder, $R$ is the
 radius of the cylinder, and $\Delta\rho$ (contrast) is the scattering length
@@ -35,9 +35,26 @@
 .. math::
 
-    F^2(q)=\int_{0}^{\pi/2}{F^2(q,\theta)\sin(\theta)d\theta}
+    F^2(q)=\int_{0}^{\pi/2}{F^2(q,\alpha)\sin(\alpha)d\alpha}=\int_{0}^{1}{F^2(q,u)du}
 
 
-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
+Numerical integration is simplified by a change of variable to $u = cos(\alpha)$ with 
+$sin(\alpha)=\sqrt{1-u^2}$. 
+
+The output of the 1D scattering intensity function for randomly oriented
+cylinders is thus given by
+
+.. math::
+
+    P(q) = \frac{\text{scale}}{V}
+        \int_0^{\pi/2} F^2(q,\alpha) \sin \alpha\ d\alpha + \text{background}
+
+
+NB: The 2nd virial coefficient of the cylinder is calculated based on the
+radius and length values, and used as the effective radius for $S(q)$
+when $P(q) \cdot S(q)$ is applied.
+
+For oriented cylinders, we define the direction of the
+axis of the cylinder using two angles $\theta$ (note this is not the
+same as the scattering angle used in q) and $\phi$. Those angles
 are defined in :numref:`cylinder-angle-definition` .
 
@@ -48,18 +65,5 @@
     Definition of the angles for oriented cylinders.
 
-
-NB: The 2nd virial coefficient of the cylinder is calculated based on the
-radius and length values, and used as the effective radius for $S(q)$
-when $P(q) \cdot S(q)$ is applied.
-
-The output of the 1D scattering intensity function for randomly oriented
-cylinders is then given by
-
-.. math::
-
-    P(q) = \frac{\text{scale}}{V}
-        \int_0^{\pi/2} F^2(q,\alpha) \sin \alpha\ d\alpha + \text{background}
-
-The $\theta$ and $\phi$ parameters are not used for the 1D output.
+The $\theta$ and $\phi$ parameters only appear in the model when fitting 2d data.
 
 Validation
@@ -74,9 +78,9 @@
 
     P(q) = \int_0^{\pi/2} d\phi
-        \int_0^\pi p(\alpha) P_0(q,\alpha) \sin \alpha\ d\alpha
+        \int_0^\pi p(\theta) P_0(q,\theta) \sin \theta\ d\theta
 
 
 where $p(\theta,\phi) = 1$ is the probability distribution for the orientation
-and $P_0(q,\alpha)$ is the scattering intensity for the fully oriented
+and $P_0(q,\theta)$ is the scattering intensity for the fully oriented
 system, and then comparing to the 1D result.
 
@@ -145,10 +149,12 @@
 
 qx, qy = 0.2 * np.cos(2.5), 0.2 * np.sin(2.5)
-# After redefinition of angles, find new tests values 
-#tests = [[{}, 0.2, 0.042761386790780453],
-#         [{}, [0.2], [0.042761386790780453]],
-#         [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.03514647218513852],
-#         [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.03514647218513852]],
-#        ]
+# After redefinition of angles, find new tests values.  Was 10 10 in old coords
+tests = [[{}, 0.2, 0.042761386790780453],
+        [{}, [0.2], [0.042761386790780453]],
+#  expect new      [{'theta':80.1534480601659, 'phi':10.1510817110481}, (qx, qy), 0.03514647218513852],
+#         [{'theta':80.1534480601659, 'phi':10.1510817110481}, [(qx, qy)], [0.03514647218513852]],
+# old, but calcs .0344268         [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.03514647218513852],
+#                       [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.03514647218513852]],
+        ]
 del qx, qy  # not necessary to delete, but cleaner
 # ADDED by:  RKH  ON: 18Mar2016 renamed sld's etc
Index: sasmodels/models/elliptical_cylinder.py
===================================================================
--- sasmodels/models/elliptical_cylinder.py	(revision a8072067ae8a224e45d23ba71f663aadbe1ba4a9)
+++ sasmodels/models/elliptical_cylinder.py	(revision fcb33e4672814b4a8fe1ee865d430090b5fc03e6)
@@ -20,5 +20,5 @@
 
     I(\vec q)=\frac{1}{V_\text{cyl}}\int{d\psi}\int{d\phi}\int{
-        p(\theta,\phi,\psi)F^2(\vec q,\alpha,\psi)\sin(\theta)d\theta}
+        p(\theta,\phi,\psi)F^2(\vec q,\alpha,\psi)\sin(\alpha)d\alpha}
 
 with the functions
@@ -26,5 +26,5 @@
 .. math::
 
-    F(\vec q,\alpha,\psi) = 2\frac{J_1(a)\sin(b)}{ab}
+    F(q,\alpha,\psi) = 2\frac{J_1(a)\sin(b)}{ab}
 
 where
@@ -32,10 +32,12 @@
 .. math::
 
-    a &= \vec q\sin(\alpha)\left[
-        r^2_\text{major}\sin^2(\psi)+r^2_\text{minor}\cos(\psi) \right]^{1/2}
+    a = qr'\sin(\alpha)
+    
+    b = q\frac{L}{2}\cos(\alpha)
+    
+    r'=\frac{r_{minor}}{\sqrt{2}}\sqrt{(1+\nu^{2}) + (1-\nu^{2})cos(\psi)}
 
-    b &= \vec q\frac{L}{2}\cos(\alpha)
 
-and the angle $\Psi$ is defined as the orientation of the major axis of the
+and the angle $\psi$ is defined as the orientation of the major axis of the
 ellipse with respect to the vector $\vec q$. The angle $\alpha$ is the angle
 between the axis of the cylinder and $\vec q$.
@@ -95,5 +97,13 @@
 
 L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and
-Neutron Scattering*, Plenum, New York, (1987)
+Neutron Scattering*, Plenum, New York, (1987) [see table 3.4]
+
+Authorship and Verification
+----------------------------
+
+* **Author:**
+* **Last Modified by:** 
+* **Last Reviewed by:**  Richard Heenan - corrected equation in docs **Date:** December 21, 2016
+
 """
 
