Index: sasmodels/models/hayter_msa.py
===================================================================
--- sasmodels/models/hayter_msa.py	(revision 348557ad6267dc6c27f1b0a9f23dc61b4aae3715)
+++ sasmodels/models/hayter_msa.py	(revision d529d93bd045e44913320de5e1c8db47f680e037)
@@ -9,5 +9,5 @@
 
 **This routine only works for charged particles**. If the charge is set to
-zero the routine will self-destruct! For non-charged particles use a hard
+zero the routine may self-destruct! For non-charged particles use a hard
 sphere potential.
 
@@ -15,5 +15,14 @@
 which in turn is used to compute the Debye screening length. At present
 there is no provision for entering the ionic strength directly nor for use
-of any multivalent salts. The counterions are also assumed to be monovalent.
+of any multivalent salts, though it should be possible to simulate the effect
+of this by increasing the salt concentration. The counterions are also assumed to 
+be monovalent.
+
+In sasview the effective radius may be calculated from the parameters
+used in the form factor $P(q)$ that this $S(q)$ is combined with.
+
+The computation uses a Taylor series expansion at very small rescaled $qR$, to 
+avoid some serious rounding error issues, this may result in a minor artefact 
+in the transition region under some circumstances.
 
 For 2D data, the scattering intensity is calculated in the same way as 1D,
@@ -24,7 +33,4 @@
     q = \sqrt{q_x^2 + q_y^2}
 
-.. figure:: img/HayterMSAsq_227.jpg
-
-    1D plot using the default values (in linear scale).
 
 References
@@ -35,6 +41,11 @@
 J P Hansen and J B Hayter, *Molecular Physics*, 46 (1982) 651-656
 """
+from numpy import inf
 
-#  dp[0] = 2.0*effect_radius();
+category = "structure-factor"
+structure_factor = True
+single = False  # double precision only!
+
+#  dp[0] = 2.0*radius_effective();
 #  dp[1] = fabs(charge());
 #  dp[2] = volfraction();
@@ -43,33 +54,32 @@
 #  dp[5] = dielectconst();
 
-from numpy import inf
 
-source = ["hayter_msa_kernel.c"]
+
 
 name = "hayter_msa"
-title = "Hayter-Penfold MSA charged sphere interparticle S(Q) structure factor"
+title = "Hayter-Penfold rescaled MSA, charged sphere, interparticle S(Q) structure factor"
 description = """\
-    [Hayter-Penfold MSA charged sphere interparticle S(Q) structure factor]
+    [Hayter-Penfold RMSA charged sphere interparticle S(Q) structure factor]
         Interparticle structure factor S(Q)for a charged hard spheres.
         Routine takes absolute value of charge, use HardSphere if charge
         goes to zero.
-        In sasview the effective radius will be calculated from the
-        parameters used in P(Q).
+        In sasview the effective radius and volume fraction may be calculated 
+        from the parameters used in P(Q).
 """
-single = False  # double precision only!
+
 
 # pylint: disable=bad-whitespace, line-too-long
 #             [ "name", "units", default, [lower, upper], "type", "description" ],
 parameters = [
-    ["effect_radius", "Ang", 20.75,   [0, inf],    "volume", "effective radius of hard sphere"],
+    ["radius_effective", "Ang", 20.75,   [0, inf],    "volume", "effective radius of charged sphere"],
     ["charge",        "e",   19.0,    [0, inf],    "", "charge on sphere (in electrons)"],
-    ["volfraction",   "",     0.0192, [0, 0.74],   "", "volume fraction of spheres"],
+    ["volfraction",   "None",     0.0192, [0, 0.74],   "", "volume fraction of spheres"],
     ["temperature",   "K",  318.16,   [0, inf],    "", "temperature, in Kelvin, for Debye length calculation"],
-    ["saltconc",      "M",    0.0,    [-inf, inf], "", "conc of salt, 1:1 electolyte, for Debye length"],
-    ["dielectconst",  "",    71.08,   [-inf, inf], "", "dielectric constant of solvent (default water), for Debye length"],
+    ["saltconc",      "M",    0.0,    [-inf, inf], "", "conc of salt, moles/litre, 1:1 electolyte, for Debye length"],
+    ["dielectconst",  "None",    71.08,   [-inf, inf], "", "dielectric constant (relative permittivity) of solvent, default water, for Debye length"]
     ]
 # pylint: enable=bad-whitespace, line-too-long
-category = "structure-factor"
 
+source = ["hayter_msa_kernel.c"]
 # No volume normalization despite having a volume parameter
 # This should perhaps be volume normalized?
@@ -85,10 +95,12 @@
 
 oldname = 'HayterMSAStructure'
-oldpars = dict()
+#oldpars = dict(effect_radius="radius_effective",effect_radius_pd="radius_effective_pd",effect_radius_pd_n="radius_effective_pd_n")
+oldpars = dict(radius_effective="effect_radius",radius_effective_pd="effect_radius_pd",radius_effective_pd_n="effect_radius_pd_n")
+#oldpars = dict( )
 # default parameter set,  use  compare.sh -midQ -linear
 # note the calculation varies in different limiting cases so a wide range of
 # parameters will be required for a thorough test!
 # odd that the default st has saltconc zero
-demo = dict(effect_radius=20.75,
+demo = dict(radius_effective=20.75,
             charge=19.0,
             volfraction=0.0192,
@@ -96,6 +108,6 @@
             saltconc=0.05,
             dielectconst=71.08,
-            effect_radius_pd=0.1,
-            effect_radius_pd_n=40)
+            radius_effective_pd=0.1,
+            radius_effective_pd_n=40)
 #
 # attempt to use same values as old sasview unit test at Q=.001 was 0.0712928, 
@@ -104,5 +116,5 @@
     [{'scale': 1.0,
       'background': 0.0,
-      'effect_radius': 20.75,
+      'radius_effective': 20.75,
       'charge': 19.0,
       'volfraction': 0.0192,
@@ -110,9 +122,9 @@
       'saltconc': 0,
       'dielectconst': 78.0,
-      'effect_radius_pd': 0},
+      'radius_effective_pd': 0},
      [0.00001,0.0010,0.01,0.075], [0.0711646,0.0712928,0.0847006,1.07150]],
     [{'scale': 1.0,
       'background': 0.0,
-      'effect_radius': 20.75,
+      'radius_effective': 20.75,
       'charge': 19.0,
       'volfraction': 0.0192,
@@ -120,7 +132,7 @@
       'saltconc': 0.05,
       'dielectconst': 78.0,
-      'effect_radius_pd': 0.1,
-      'effect_radius_pd_n': 40},
+      'radius_effective_pd': 0.1,
+      'radius_effective_pd_n': 40},
      [0.00001,0.0010,0.01,0.075], [0.450272,0.450420,0.465116,1.039625]]
     ]
-
+# ADDED by:  RKH  ON: 16Mar2016 converted from sasview, new Taylor expansion at smallest rescaled Q
