Index: doc/conf.py
===================================================================
--- doc/conf.py	(revision 22975f009849b1c0492f0dfb7402f0892dd11eed)
+++ doc/conf.py	(revision 39674a040d2b37f7704abd674b8a98b18ea42b4c)
@@ -56,5 +56,5 @@
 # General information about the project.
 project = 'SAS Models'
-copyright = '2014, sasview team'
+copyright = '2016, sasview team'
 
 # The version info for the project you're documenting, acts as replacement for
Index: sasmodels/models/pringle.c
===================================================================
--- sasmodels/models/pringle.c	(revision b70cb3b65351f9b9fb36c82c3c8117a33b289fb2)
+++ sasmodels/models/pringle.c	(revision b70cb3b65351f9b9fb36c82c3c8117a33b289fb2)
@@ -0,0 +1,207 @@
+double form_volume(double radius,
+          double thickness);
+
+double Iq(double q,
+          double radius,
+          double thickness,
+          double alpha,
+          double beta,
+          double sld_pringle,
+          double sld_solvent);
+
+double Iqxy(double qx, double qy,
+          double radius,
+          double thickness,
+          double alpha,
+          double beta,
+          double sld_pringle,
+          double sld_solvent);
+
+static
+double pringleC(double radius,
+                double alpha,
+                double beta,
+                double q,
+                double phi,
+                double n) {
+
+    double va, vb;
+    double bessargs, cosarg, bessargcb;
+    double r, retval, yyy;
+
+
+    va = 0;
+    vb = radius;
+
+    // evaluate at Gauss points
+    // remember to index from 0,size-1
+
+    double summ = 0.0;		// initialize integral
+    int ii = 0;
+    do {
+        // Using 76 Gauss points
+        r = (Gauss76Z[ii] * (vb - va) + vb + va) / 2.0;
+
+        bessargs = q*r*sin(phi);
+        cosarg = q*r*r*alpha*cos(phi);
+        bessargcb = q*r*r*beta*cos(phi);
+
+        yyy = Gauss76Wt[ii]*r*cos(cosarg)
+                *sas_JN(n, bessargcb)
+                *sas_JN(2*n, bessargs);
+        summ += yyy;
+
+        ii += 1;
+    } while (ii < N_POINTS_76);			// end of loop over quadrature points
+    //
+    // calculate value of integral to return
+
+    retval = (vb - va) / 2.0 * summ;
+    retval = retval / pow(r, 2.0);
+
+    return retval;
+}
+
+static
+double pringleS(double radius,
+                double alpha,
+                double beta,
+                double q,
+                double phi,
+                double n) {
+
+    double va, vb, summ;
+    double bessargs, sinarg, bessargcb;
+    double r, retval, yyy;
+    // set up the integration
+    // end points and weights
+
+    va = 0;
+    vb = radius;
+
+    // evaluate at Gauss points
+    // remember to index from 0,size-1
+
+    summ = 0.0;		// initialize integral
+    int ii = 0;
+    do {
+        // Using 76 Gauss points
+        r = (Gauss76Z[ii] * (vb - va) + vb + va) / 2.0;
+
+        bessargs = q*r*sin(phi);
+        sinarg = q*r*r*alpha*cos(phi);
+        bessargcb = q*r*r*beta*cos(phi);
+
+        yyy = Gauss76Wt[ii]*r*sin(sinarg)
+                    *sas_JN(n, bessargcb)
+                    *sas_JN(2*n, bessargs);
+        summ += yyy;
+
+        ii += 1;
+    } while (ii < N_POINTS_76);
+
+    // end of loop over quadrature points
+    //
+    // calculate value of integral to return
+
+    retval = (vb-va)/2.0*summ;
+    retval = retval/pow(r, 2.0);
+
+    return retval;
+}
+
+static
+double _kernel(double thickness,
+               double radius,
+               double alpha,
+               double beta,
+               double q,
+               double phi) {
+
+    const double sincarg = q * thickness * cos(phi) / 2.0;
+    const double sincterm = pow(sin(sincarg) / sincarg, 2.0);
+
+    //calculate sum term from n = -3 to 3
+    double sumterm = 0.0;
+    for (int nn = -3; nn <= 3; nn++) {
+        double powc = pringleC(radius, alpha, beta, q, phi, nn);
+        double pows = pringleS(radius, alpha, beta, q, phi, nn);
+        sumterm += pow(powc, 2.0) + pow(pows, 2.0);
+    }
+    double retval = 4.0 * sin(phi) * sumterm * sincterm;
+
+    return retval;
+
+}
+
+static double pringles_kernel(double q,
+          double radius,
+          double thickness,
+          double alpha,
+          double beta,
+          double sld_pringle,
+          double sld_solvent)
+{
+
+    //upper and lower integration limits
+    const double lolim = 0.0;
+    const double uplim = M_PI / 2.0;
+
+    double summ = 0.0;			//initialize integral
+
+    double delrho = sld_pringle - sld_solvent; //make contrast term
+
+    for (int i = 0; i < N_POINTS_76; i++) {
+        double phi = (Gauss76Z[i] * (uplim - lolim) + uplim + lolim) / 2.0;
+        summ += Gauss76Wt[i] * _kernel(thickness, radius, alpha, beta, q, phi);
+    }
+
+    double answer = (uplim - lolim) / 2.0 * summ;
+    answer *= delrho*delrho;
+
+    return answer;
+}
+
+double form_volume(double radius,
+        double thickness){
+
+        return 1.0;
+}
+
+double Iq(double q,
+          double radius,
+          double thickness,
+          double alpha,
+          double beta,
+          double sld_pringle,
+          double sld_solvent)
+{
+    const double form = pringles_kernel(q,
+                  radius,
+                  thickness,
+                  alpha,
+                  beta,
+                  sld_pringle,
+                  sld_solvent);
+
+    return 1.0e-4*form*M_PI*radius*radius*thickness;
+}
+
+double Iqxy(double qx, double qy,
+            double radius,
+            double thickness,
+            double alpha,
+            double beta,
+            double sld_pringle,
+            double sld_solvent)
+{
+    double q = sqrt(qx*qx + qy*qy);
+    return Iq(q,
+            radius,
+            thickness,
+            alpha,
+            beta,
+            sld_pringle,
+            sld_solvent);
+}
+
Index: sasmodels/models/pringle.py
===================================================================
--- sasmodels/models/pringle.py	(revision 1805a9e1634c4a831edc2938742a6e50061666eb)
+++ sasmodels/models/pringle.py	(revision 1805a9e1634c4a831edc2938742a6e50061666eb)
@@ -0,0 +1,140 @@
+r"""
+This model provides the form factor, $P(q)$, for a 'pringle' or 'saddle-shaped'
+object (a hyperbolic paraboloid).
+
+.. figure:: img/pringles_fig1.png
+
+    (Graphic from Matt Henderson, matt@matthen.com)
+
+The returned value is in units of cm^-1, on absolute scale.
+
+Definition
+----------
+
+The form factor calculated is
+
+.. math::
+
+    I(q) = (\Delta \rho )^2 V \int^{\pi/2}_0 d\psi \sin{\psi} sinc^2
+    \left( \frac{qd\cos{\psi}}{2} \right)
+    \left[ \left( S^2_0+C^2_0\right) + 2\sum_{n=1}^{\infty}
+     \left( S^2_0+C^2_0\right) \right]
+
+where
+
+.. math::
+
+    C_n = \int^{R}_{0} r dr\cos{qr^2\alpha \cos{\psi}}
+    J_n\left( qr^2\beta \cos{\psi}\right)
+    J_{2n}\left( qr \sin{\psi}\right)
+
+.. math::
+
+    S_n = \int^{R}_{0} r dr\sin{qr^2\alpha \cos{\psi}}
+    J_n\left( qr^2\beta \cos{\psi}\right)
+    J_{2n}\left( qr \sin{\psi}\right)
+
+
+.. figure:: img/pringle-vs-cylinder.png
+
+    1D plot using the default values (with 150 data points).
+
+Reference
+---------
+
+S Alexandru Rautu, Private Communication.
+
+"""
+
+from numpy import inf, pi
+
+name = "pringles"
+title = "Pringles model for K Edler. Represents a disc that is bent in two directions."
+description = """\
+
+"""
+category = "shape:cylinder"
+
+# pylint: disable=bad-whitespace, line-too-long
+#   ["name", "units", default, [lower, upper], "type","description"],
+parameters = [
+    ["radius",      "Ang",         60.0,   [0, inf],    "volume", "Pringle radius"],
+    ["thickness",   "Ang",         10.0,   [0, inf],    "volume", "Thickness of pringle"],
+    ["alpha",       "",            0.001,  [-inf, inf], "", "Curvature parameter alpha"],
+    ["beta",        "",            0.02,   [-inf, inf], "", "Curvature paramter beta"],
+    ["sld_pringle", "1e-6/Ang^2",  1.0,    [-inf, inf], "", "Pringle sld"],
+    ["sld_solvent", "1e-6/Ang^2",  6.3,    [-inf, inf], "", "Solvent sld"]
+    ]
+# pylint: enable=bad-whitespace, line-too-long
+
+source = ["lib/polevl.c", "lib/sas_J0.c", "lib/sas_J1.c", \
+          "lib/sas_JN.c", "lib/gauss76.c", "pringle.c"]
+
+def ER(radius, thickness):
+    """
+        Return equivalent radius (ER)
+    """
+    ddd = 0.75 * radius * (2 * radius * thickness + (thickness + radius) \
+                           * (thickness + pi * radius))
+    return 0.5 * (ddd) ** (1. / 3.)
+
+demo = dict(background=0.0,
+            scale=1.0,
+            radius=60.0,
+            thickness=10.0,
+            alpha=0.001,
+            beta=0.02,
+            sld_pringle=1.0,
+            sld_solvent=6.35)
+
+oldname = 'PringlesModel'
+oldpars = dict(background='background',
+               scale='scale',
+               radius='radius',
+               thickness='thickness',
+               alpha='alpha',
+               beta='beta',
+               pringle_sld='sld_pringle',
+               solvent_sld='sld_solvent')
+
+tests = [
+    [{'scale' : 1.0,
+      'radius': 60.0,
+      'thickness': 10.0,
+      'alpha': 0.001,
+      'beta': 0.02,
+      'sld_pringle': 1.0,
+      'sld_solvent': 6.3,
+      'background': 6.3,
+     }, 0.1, 16.185532],
+
+    [{'scale' : 1.0,
+      'radius': 60.0,
+      'thickness': 10.0,
+      'alpha': 0.001,
+      'beta': 0.02,
+      'sld_pringle': 1.0,
+      'sld_solvent': 6.3,
+      'background': 6.3,
+     }, 0.01, 297.153496],
+
+    [{'scale' : 1.0,
+      'radius': 60.0,
+      'thickness': 10.0,
+      'alpha': 0.001,
+      'beta': 0.02,
+      'sld_pringle': 1.0,
+      'sld_solvent': 6.3,
+      'background': 6.3,
+     }, 0.001, 324.021256415],
+
+    [{'scale' : 1.0,
+      'radius': 60.0,
+      'thickness': 10.0,
+      'alpha': 0.001,
+      'beta': 0.02,
+      'sld_pringle': 1.0,
+      'sld_solvent': 6.3,
+      'background': 6.3,
+     }, (0.001, 90.0), 6.30000026876],
+]
Index: sasmodels/sesans.py
===================================================================
--- sasmodels/sesans.py	(revision a154ad16d63ac5a27901c7c6b1f82e588f89f154)
+++ sasmodels/sesans.py	(revision c94577f038b813ab23072f3ec552add5da36539e)
@@ -189,4 +189,5 @@
         integral = besselj(0, q*SElength_i)*Iq*q
         G[i] = np.sum(integral)
+    G0 = np.sum(Iq*q)
 
     # [m^-1] step size in q, needed for integration
@@ -195,6 +196,7 @@
     # integration step, convert q into [m**-1] and 2 pi circle integration
     G *= dq*1e10*2*pi
-
-    P = exp(thickness*wavelength**2/(4*pi**2)*(G-G[0]))
+    G0 *= dq*1e10*2*pi
+
+    P = exp(thickness*wavelength**2/(4*pi**2)*(G-G0))
 
     return P
