Index: sasmodels/models/be_polyelectrolyte.py
===================================================================
--- sasmodels/models/be_polyelectrolyte.py	(revision 168052c5791506d7dfad00173f5636fc5701ad11)
+++ sasmodels/models/be_polyelectrolyte.py	(revision 0e86967265f7d2cf12cf1cd8abb371e7cc8e8f46)
@@ -127,6 +127,6 @@
     :return:     2D-Intensity
     """
-    iq = Iq(sqrt(qx**2 + qy**2), *args)
-    return iq
+    intensity = Iq(sqrt(qx**2 + qy**2), *args)
+    return intensity
 
 Iqxy.vectorized = True  # Iqxy accepts an array of qx, qy values
Index: sasmodels/models/core_shell_cylinder.py
===================================================================
--- sasmodels/models/core_shell_cylinder.py	(revision eb69cce00f0781ad8f3eec0eb5965a8576d815b5)
+++ sasmodels/models/core_shell_cylinder.py	(revision f0aa7f88c13775739f654942a5ec343bf210d1f5)
@@ -155,4 +155,7 @@
 
 def ER(radius, thickness, length):
+    """
+        Returns the effective radius used in the S*P calculation
+    """
     radius = radius + thickness
     length = length + 2 * thickness
@@ -161,4 +164,7 @@
 
 def VR(radius, thickness, length):
+    """
+        Returns volume ratio
+    """
     whole = pi * (radius + thickness) ** 2 * (length + 2 * thickness)
     core = pi * radius ** 2 * length
Index: sasmodels/models/correlation_length.py
===================================================================
--- sasmodels/models/correlation_length.py	(revision 5054e805a7c53aa18f659a0c1613f527f05caab3)
+++ sasmodels/models/correlation_length.py	(revision 3e6c5c1168c56a700f8cd12b4025aa6a9764fddf)
@@ -78,15 +78,10 @@
 # names and the target sasview model name.
 oldname = 'CorrLengthModel'
-# pylint: disable=bad-continuation
-oldpars = dict(
-               lorentz_scale='scale_l', porod_scale='scale_p',
+
+oldpars = dict(lorentz_scale='scale_l', porod_scale='scale_p',
                cor_length='length_l', exponent_p='exponent_p',
-               exponent_l='exponent_l'
-               )
+               exponent_l='exponent_l')
 
-tests = [
-         [{}, 0.001, 1009.98],
+tests = [[{}, 0.001, 1009.98],
          [{}, 0.150141, 0.174645],
-         [{}, 0.442528, 0.0203957]
-         ]
-# pylint: enable=bad-continuation
+         [{}, 0.442528, 0.0203957]]
Index: sasmodels/models/cylinder.py
===================================================================
--- sasmodels/models/cylinder.py	(revision eb69cce00f0781ad8f3eec0eb5965a8576d815b5)
+++ sasmodels/models/cylinder.py	(revision 0c3a22666528577f65591c031dbd899b43980331)
@@ -144,4 +144,7 @@
 
 def ER(radius, length):
+    """
+        Return equivalent radius (ER)
+    """
     ddd = 0.75 * radius * (2 * radius * length + (length + radius) * (length + pi * radius))
     return 0.5 * (ddd) ** (1. / 3.)
Index: sasmodels/models/dab.py
===================================================================
--- sasmodels/models/dab.py	(revision eb69cce00f0781ad8f3eec0eb5965a8576d815b5)
+++ sasmodels/models/dab.py	(revision 94bd8097c6283d5783d3cc4d94cabcc1a41bba78)
@@ -1,4 +1,3 @@
 r"""
-
 Calculates the scattering from a randomly distributed, two-phase system based on
 the Debye-Anderson-Brumberger (DAB) model for such systems. The two-phase system
Index: sasmodels/models/fcc.py
===================================================================
--- sasmodels/models/fcc.py	(revision 9aac25dcf63daf48040d6a470ddda4ccb13abbd6)
+++ sasmodels/models/fcc.py	(revision c0ccea8f892e537b9ac3a573d9883875986f4b15)
@@ -114,4 +114,5 @@
 single = False
 
+# pylint: disable=bad-whitespace, line-too-long
 #             ["name", "units", default, [lower, upper], "type","description"],
 parameters = [["dnn", "Ang", 220, [-inf, inf], "", "Nearest neighbour distance"],
@@ -124,4 +125,5 @@
               ["psi", "degrees", 60, [-inf, inf], "orientation", "Out of plane angle"]
              ]
+# pylint: enable=bad-whitespace, line-too-long
 
 source = ["lib/J1.c", "lib/gauss150.c", "lib/sphere_form.c", "fcc.c"]
Index: sasmodels/models/guinier.py
===================================================================
--- sasmodels/models/guinier.py	(revision eb69cce00f0781ad8f3eec0eb5965a8576d815b5)
+++ sasmodels/models/guinier.py	(revision 723cebed4612ad396b30ca46c6f1e5e801142cba)
@@ -36,7 +36,5 @@
 
 #             ["name", "units", default, [lower, upper], "type","description"],
-parameters = [
-              ["rg", "Ang", 60.0, [0, inf], "", "Radius of Gyration"],
-              ]
+parameters = [["rg", "Ang", 60.0, [0, inf], "", "Radius of Gyration"]]
 
 Iq = """
@@ -51,5 +49,5 @@
 
 # parameters for demo
-demo = dict(scale=1.0,rg=60.0)
+demo = dict(scale=1.0, rg=60.0)
 
 # For testing against the old sasview models, include the converted parameter
@@ -59,5 +57,3 @@
 
 # parameters for unit tests
-tests = [
-         [{'rg' : 31.5}, 0.005, 0.991756]
-         ]
+tests = [[{'rg' : 31.5}, 0.005, 0.991756]]
Index: sasmodels/models/guinier_porod.py
===================================================================
--- sasmodels/models/guinier_porod.py	(revision 21d1031a3eb0c8a5883f73d8fa5a42736944a68d)
+++ sasmodels/models/guinier_porod.py	(revision 21d1031a3eb0c8a5883f73d8fa5a42736944a68d)
@@ -0,0 +1,130 @@
+# pylint: disable=line-too-long
+r"""
+Calculates the scattering for a generalized Guinier/power law object.
+This is an empirical model that can be used to determine the size
+and dimensionality of scattering objects, including asymmetric objects
+such as rods or platelets, and shapes intermediate between spheres
+and rods or between rods and platelets.
+
+Definition
+----------
+
+The following functional form is used
+
+.. math::
+    I(q) = \frac{G}{Q^s} \ \exp{\left[ \frac{-Q^2R_g^2}{3-s} \right]} \textrm{ for } Q \leq Q_1
+    \\
+    I(q) = D / Q^m \textrm{ for } Q \geq Q_1
+
+This is based on the generalized Guinier law for such elongated objects
+(see the Glatter reference below). For 3D globular objects (such as spheres), $s = 0$
+and one recovers the standard Guinier formula.
+For 2D symmetry (such as for rods) $s = 1$,
+and for 1D symmetry (such as for lamellae or platelets) $s = 2$.
+A dimensionality parameter ($3-s$) is thus defined, and is 3 for spherical objects,
+2 for rods, and 1 for plates.
+
+Enforcing the continuity of the Guinier and Porod functions and their derivatives yields
+
+.. math::
+    Q_1 = \frac{1}{R_g} \sqrt{(m-s)(3-s)/2}
+
+and
+
+.. math::
+    D = G \ \exp{ \left[ \frac{-Q_1^2 R_g^2}{3-s} \right]} \ Q_1^{m-s}
+      = \frac{G}{R_g^{m-s}} \ \exp{\left[  -\frac{m-s}{2} \right]} \left( \frac{(m-s)(3-s)}{2} \right)^{\frac{m-s}{2}}
+
+
+Note that the radius-of-gyration for a sphere of radius R is given by $R_g = R \sqrt(3/5)$.
+
+The cross-sectional radius-of-gyration for a randomly oriented cylinder
+of radius R is given by $R_g = R / \sqrt(2)$.
+
+The cross-sectional radius-of-gyration of a randomly oriented lamella
+of thickness $T$ is given by $R_g = T / \sqrt(12)$.
+
+For 2D data: The 2D scattering intensity is calculated in the same way as 1D,
+where the q vector is defined as
+
+.. math::
+    q = \sqrt{q_x^2+q_y^2}
+
+.. image:: img/guinier_porod_model.jpg
+
+    Figure 1: Guinier-Porod model for $R_g=100$ |Ang|, $s=1$, $m=3$, and $background=0.1$.
+
+
+Reference
+---------
+
+A Guinier, G Fournet, Small-Angle Scattering of X-Rays, John Wiley and Sons, New York, (1955)
+
+O Glatter, O Kratky, Small-Angle X-Ray Scattering, Academic Press (1982)
+Check out Chapter 4 on Data Treatment, pages 155-156.
+"""
+
+from numpy import inf, sqrt, power, exp
+
+name = "guinier_porod"
+title = "Guinier-Porod function"
+description = """\
+         I(q) = scale/q^s* exp ( - R_g^2 q^2 / (3-s) ) for q<= ql
+         = scale/q^m*exp((-ql^2*Rg^2)/(3-s))*ql^(m-s) for q>=ql
+                        where ql = sqrt((m-s)(3-s)/2)/Rg.
+                        List of parameters:
+                        scale = Guinier Scale
+                        s = Dimension Variable
+                        Rg = Radius of Gyration [A] 
+                        m = Porod Exponent
+                        background  = Background [1/cm]"""
+
+category = "shape-independent"
+
+# pylint: disable=bad-whitespace, line-too-long
+#             ["name", "units", default, [lower, upper], "type","description"],
+parameters = [["rg", "Ang", 60.0, [0, inf], "", "Radius of gyration"],
+              ["s",  "",    1.0,  [0, inf], "", "Dimension variable"],
+              ["m",  "",    3.0,  [0, inf], "", "Porod exponent"]]
+# pylint: enable=bad-whitespace, line-too-long
+
+# pylint: disable=C0103
+def Iq(q, rg, s, m):
+    """
+    @param q: Input q-value
+    """
+    n = 3.0 - s
+
+    # Take care of the singular points
+    if rg <= 0.0:
+        return 0.0
+    if (n-3.0+m) <= 0.0:
+        return 0.0
+
+    # Do the calculation and return the function value
+    q1 = sqrt((n-3.0+m)*n/2.0)/rg
+    if q < q1:
+        iq = (1.0/power(q, (3.0-n)))*exp((-q*q*rg*rg)/n)
+    else:
+        iq = (1.0/power(q, m))*exp(-(n-3.0+m)/2.0)*power(((n-3.0+m)*n/2.0),
+                                                         ((n-3.0+m)/2.0))/power(rg, (n-3.0+m))
+    return iq
+
+Iq.vectorized = False  # Iq accepts an array of q values
+
+def Iqxy(qx, qy, *args):
+    """
+    @param qx:   Input q_x-value
+    @param qy:   Input q_y-value
+    @param args: Remaining arguments
+    """
+    return Iq(sqrt(qx ** 2 + qy ** 2), *args)
+
+Iqxy.vectorized = False # Iqxy accepts an array of qx, qy values
+
+demo = dict(scale=1.5, background=0.5, rg=60, s=1.0, m=3.0)
+
+oldname = "GuinierPorodModel"
+oldpars = dict(scale='scale', background='background', s='dim', m='m', rg='rg')
+
+tests = [[{'scale': 1.5, 'background':0.5}, 0.04, 5.290096890253155]]
Index: sasmodels/models/hollow_cylinder.py
===================================================================
--- sasmodels/models/hollow_cylinder.py	(revision ec2ca99b9e3d90e4b91919c523a94d9855ca9c3c)
+++ sasmodels/models/hollow_cylinder.py	(revision e0fd91396c863eb30f45111903316f0bde64c127)
@@ -93,4 +93,5 @@
 source = ["lib/J1.c", "lib/gauss76.c", "hollow_cylinder.c"]
 
+# pylint: disable=W0613
 def ER(radius, core_radius, length):
     """
Index: sasmodels/models/lamellarCailleHG.py
===================================================================
--- sasmodels/models/lamellarCailleHG.py	(revision 13ed84c3c71257d2df9c2ed4b4e98c0bfa4d7d69)
+++ sasmodels/models/lamellarCailleHG.py	(revision 652a78a9a04424b9e84f32b660bf775a67d37463)
@@ -146,7 +146,6 @@
     solvent_sld='sld_solvent')
 #
-tests = [
-        [ {'scale': 1.0, 'background' : 0.0, 'tail_length' : 10.0, 'head_length' : 2.0,'Nlayers' : 30.0, 'spacing' : 40.,
-            'Caille_parameter' : 0.001, 'sld' : 0.4, 'head_sld' : 2.0, 'solvent_sld' : 6.0,
-            'tail_length_pd' : 0.0, 'head_length_pd' : 0.0, 'spacing_pd' : 0.0 }, [0.001], [6838238.571488]]
-        ]
+tests = [[{'scale': 1.0, 'background': 0.0, 'tail_length': 10.0, 'head_length': 2.0,
+           'Nlayers': 30.0, 'spacing': 40., 'Caille_parameter': 0.001, 'sld': 0.4,
+           'head_sld': 2.0, 'solvent_sld': 6.0, 'tail_length_pd': 0.0,
+           'head_length_pd': 0.0, 'spacing_pd': 0.0}, [0.001], [6838238.571488]]]
Index: sasmodels/models/lamellarFFHG.py
===================================================================
--- sasmodels/models/lamellarFFHG.py	(revision 7f47777b1828197366e17d650a92f794a3433fcc)
+++ sasmodels/models/lamellarFFHG.py	(revision 3eb6b901aa1e301f7d79b984a69d3d37509b2eb0)
@@ -68,16 +68,12 @@
 category = "shape:lamellae"
 
+# pylint: disable=bad-whitespace, line-too-long
 #             ["name", "units", default, [lower, upper], "type","description"],
-parameters = [["tail_length", "Ang",  15, [0, inf], "volume",
-               "Tail thickness"],
-              ["head_length", "Ang",  10, [0, inf], "volume",
-               "head thickness"],
-              ["sld", "1e-6/Ang^2", 0.4, [-inf,inf], "",
-               "Tail scattering length density"],
-              ["head_sld", "1e-6/Ang^2", 3.0, [-inf,inf], "",
-               "Head scattering length density"],
-              ["solvent_sld", "1e-6/Ang^2", 6, [-inf,inf], "",
-               "Solvent scattering length density"],
-             ]
+parameters = [["tail_length", "Ang",       15,   [0, inf],  "volume",  "Tail thickness"],
+              ["head_length", "Ang",       10,   [0, inf],  "volume",  "head thickness"],
+              ["sld",         "1e-6/Ang^2", 0.4, [-inf,inf], "",       "Tail scattering length density"],
+              ["head_sld",    "1e-6/Ang^2", 3.0, [-inf,inf], "",       "Head scattering length density"],
+              ["solvent_sld", "1e-6/Ang^2", 6,   [-inf,inf], "",       "Solvent scattering length density"]]
+# pylint: enable=bad-whitespace, line-too-long
 
 # No volume normalization despite having a volume parameter
@@ -113,8 +109,8 @@
 
 demo = dict(scale=1, background=0,
-            tail_length=15,head_length=10,
+            tail_length=15, head_length=10,
             sld=0.4, head_sld=3.0, solvent_sld=6.0,
-            tail_length_pd= 0.2, tail_length_pd_n=40,
-            head_length_pd= 0.01, head_length_pd_n=40)
+            tail_length_pd=0.2, tail_length_pd_n=40,
+            head_length_pd=0.01, head_length_pd_n=40)
 
 oldname = 'LamellarFFHGModel'
@@ -122,8 +118,4 @@
                sld='sld_tail', head_sld='sld_head', solvent_sld='sld_solvent')
 #
-tests = [
-        [ {'scale': 1.0, 'background' : 0.0, 'tail_length' : 15.0, 'head_length' : 10.0,'sld' : 0.4,
-         'head_sld' : 3.0, 'solvent_sld' : 6.0, }, [0.001], [653143.9209]]
-        ]
-
-
+tests = [[{'scale': 1.0, 'background': 0.0, 'tail_length': 15.0, 'head_length': 10.0,
+           'sld': 0.4, 'head_sld': 3.0, 'solvent_sld': 6.0}, [0.001], [653143.9209]]]
Index: sasmodels/models/linear_pearls.py
===================================================================
--- sasmodels/models/linear_pearls.py	(revision 577912b439fe119a0663629c075b6b67323269ca)
+++ sasmodels/models/linear_pearls.py	(revision 32c743d8fe636333bd6fa7aa99f46c623b72890c)
Index: sasmodels/models/lorentz.py
===================================================================
--- sasmodels/models/lorentz.py	(revision eb69cce00f0781ad8f3eec0eb5965a8576d815b5)
+++ sasmodels/models/lorentz.py	(revision eb5901bce0a70fc35f2edf395a5b02199feab0cb)
@@ -56,5 +56,5 @@
 
 # parameters for demo
-demo = dict(scale=1.0,background=0.0,cor_length=50.0)
+demo = dict(scale=1.0, background=0.0, cor_length=50.0)
 
 # For testing against the old sasview models, include the converted parameter
@@ -64,5 +64,3 @@
 
 # parameters for unit tests
-tests = [
-         [{'cor_length' : 250},0.01,0.137931]
-         ]
+tests = [[{'cor_length': 250}, 0.01, 0.137931]]
Index: sasmodels/models/peak_lorentz.py
===================================================================
--- sasmodels/models/peak_lorentz.py	(revision 14ba6f663691e07e3ad9e93eadb16aedf8b2caa6)
+++ sasmodels/models/peak_lorentz.py	(revision 04b0b30a637f374651ae93ca42ae86785daeb735)
@@ -11,5 +11,6 @@
     I(q) = \frac{scale}{\bigl(1+\bigl(\frac{q-q_0}{B}\bigr)^2\bigr)} + background
 
-with the peak having height of $I_0$ centered at $q_0$ and having a HWHM (half-width half-maximum) of B.
+with the peak having height of $I_0$ centered at $q_0$ and having
+a HWHM (half-width half-maximum) of B.
 
 For 2D data the scattering intensity is calculated in the same way as 1D,
@@ -55,4 +56,7 @@
 
 def Iq(q, peak_pos, peak_hwhm):
+    """
+        Return I(q)
+    """
     inten = (1/(1+((q-peak_pos)/peak_hwhm)**2))
     return inten
@@ -60,4 +64,7 @@
 
 def Iqxy(qx, qy, *args):
+    """
+        Return I(qx, qy)
+    """
     return Iq(sqrt(qx ** 2 + qy ** 2), *args)
 Iqxy.vectorized = True # Iqxy accepts an array of qx, qy values
Index: sasmodels/models/porod.py
===================================================================
--- sasmodels/models/porod.py	(revision 16bb4337d95ce5f999aec885781f06ccb80925c0)
+++ sasmodels/models/porod.py	(revision 1ce6e8231452d582e846afe023a22e987fe25c95)
@@ -13,5 +13,5 @@
 of the sample, and $\Delta\rho$ is the contrast factor.
 
-For 2D data: The 2D scattering intensity is calculated in the same way as 1D, 
+For 2D data: The 2D scattering intensity is calculated in the same way as 1D,
 where the q vector is defined as
 
Index: sasmodels/models/rpa.py
===================================================================
--- sasmodels/models/rpa.py	(revision 82c299fa51ab091ee8ead0a235d4177ccfeecb99)
+++ sasmodels/models/rpa.py	(revision 8dd691474e20ca55befd08cb62489c44a15d5eb5)
@@ -89,5 +89,5 @@
 #   ["name", "units", default, [lower, upper], "type","description"],
 parameters = [
-    ["case_num", CASES, 0, [0, 10], "", "Component organization" ],
+    ["case_num", CASES, 0, [0, 10], "", "Component organization"],
 
     ["Na", "", 1000.0, [1, inf], "", "Degree of polymerization"],
Index: sasmodels/models/sphere.py
===================================================================
--- sasmodels/models/sphere.py	(revision 9c461c713e9961727442c844be3e6354d6548c2f)
+++ sasmodels/models/sphere.py	(revision c6915512ab98df810af8905ba552572737ceb9fa)
@@ -100,4 +100,7 @@
 
 def ER(radius):
+    """
+        Return equivalent radius (ER)
+    """
     return radius
 
Index: sasmodels/models/triaxial_ellipsoid.py
===================================================================
--- sasmodels/models/triaxial_ellipsoid.py	(revision 9c461c713e9961727442c844be3e6354d6548c2f)
+++ sasmodels/models/triaxial_ellipsoid.py	(revision 469e763f1e5fc119d32baa75e7d38058e275d079)
@@ -82,6 +82,6 @@
 ----------
 
-L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and Neutron Scattering*, Plenum,
-New York, 1987.
+L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray
+and Neutron Scattering*, Plenum, New York, 1987.
 """
 
@@ -120,4 +120,7 @@
 
 def ER(req_minor, req_major, rpolar):
+    """
+        Returns the effective radius used in the S*P calculation
+    """
     import numpy as np
     from .ellipsoid import ER as ellipsoid_ER
Index: sasmodels/models/vesicle.py
===================================================================
--- sasmodels/models/vesicle.py	(revision 216fa6d00e42770a4a028c2953a73319ad05e924)
+++ sasmodels/models/vesicle.py	(revision 068cebd186a5297589c4a04793fe1eacac49a7bf)
@@ -60,5 +60,4 @@
 """
 
-import numpy as np
 from numpy import pi, inf
 
@@ -131,5 +130,5 @@
 # NOTE: test results taken from values returned by SasView 3.1.2
 tests = [[{}, 0.0010005303255, 17139.8268799],
-         [{}, 0.200027832249, 0.130387268704 ],
+         [{}, 0.200027832249, 0.130387268704],
          [{}, 'ER', 130.],
          [{}, 'VR', 0.54483386436],
