Index: sansmodels/src/sans/models/test/utest_dispersity.py
===================================================================
--- sansmodels/src/sans/models/test/utest_dispersity.py	(revision dfa883239da737ed361a8efb1dc86caa7dbb6f22)
+++ sansmodels/src/sans/models/test/utest_dispersity.py	(revision 18b89c4c6d865555c4957a4154ec169c3c1add6c)
@@ -17,5 +17,6 @@
         self.model.setParam('radius', 20.0)
         self.model.setParam('length', 400.0)
-        self.model.setParam('contrast', 3.e-6)
+        self.model.setParam('sldCyl', 4.e-6)
+        self.model.setParam('sldSolv', 1.e-6)
         self.model.setParam('background', 0.0)
         self.model.setParam('cyl_theta', 0.0)
@@ -33,4 +34,5 @@
         self.model.dispersion['radius']['width'] = 5.0
         self.model.dispersion['radius']['npts'] = 100
+        self.model.dispersion['radius']['nsigmas'] = 2.5
         
         self.assertAlmostEqual(self.model.run(0.001), 1.021051*4527.47250339, 3)
@@ -43,4 +45,5 @@
         self.model.dispersion['radius']['width'] = 5.0
         self.model.dispersion['radius']['npts'] = 100
+        self.model.dispersion['radius']['nsigmas'] = 2.5
         self.model.setParam('scale', 10.0)
         
@@ -54,4 +57,5 @@
         self.model.dispersion['radius']['width'] = 5.0
         self.model.dispersion['radius']['npts'] = 100
+        self.model.dispersion['radius']['nsigmas'] = 2.5
         self.model.setParam('scale', 10.0)
         
@@ -66,4 +70,5 @@
         self.model.dispersion['radius']['width'] = 0.0
         self.model.dispersion['radius']['npts'] = 100
+        self.model.dispersion['radius']['nsigmas'] = 2.5
         self.model.setParam('scale', 1.0)
         
@@ -84,6 +89,6 @@
         weights   = numpy.zeros(100)
         for i in range(100):
-            values_ph[i]=(2.0*math.pi/99.0*i)
-            values_th[i]=(math.pi/99.0*i)
+            values_ph[i]=(360/99.0*i)
+            values_th[i]=(180/99.0*i)
             weights[i]=(1.0)
         
@@ -143,4 +148,5 @@
         self.model.dispersion['radius']['width'] = 5.0
         self.model.dispersion['radius']['npts'] = 10
+        self.model.dispersion['radius']['nsigmas'] = 2.5
 
         disp_rr = GaussianDispersion()
@@ -148,4 +154,5 @@
         self.model.dispersion['thickness']['width'] = 2.
         self.model.dispersion['thickness']['npts'] = 10
+        self.model.dispersion['thickness']['nsigmas'] = 2.5
 
         disp_len = GaussianDispersion()
@@ -153,4 +160,5 @@
         self.model.dispersion['length']['width'] = 50.0
         self.model.dispersion['length']['npts'] = 10
+        self.model.dispersion['length']['nsigmas'] = 2.5
 
         self.assertAlmostEqual(self.model.run(0.001), 1.07832610*358.44062724936009, 3)
@@ -171,6 +179,6 @@
         weights   = numpy.zeros(100)
         for i in range(100):
-            values_ph[i]=(2.0*math.pi/99.0*i)
-            values_th[i]=(math.pi/99.0*i)
+            values_ph[i]=(360/99.0*i)
+            values_th[i]=(180/99.0*i)
             weights[i]=(1.0)
         
@@ -228,4 +236,5 @@
         self.model.dispersion['radius']['width'] = 10.
         self.model.dispersion['radius']['npts'] = 10
+        self.model.dispersion['radius']['nsigmas'] = 2.5
 
         disp_rr = GaussianDispersion()
@@ -233,5 +242,5 @@
         self.model.dispersion['thickness']['width'] = 2.
         self.model.dispersion['thickness']['npts'] = 10
-
+        self.model.dispersion['thickness']['nsigmas'] = 2.5
 
         self.assertAlmostEqual(self.model.run(0.001), 1.16747510*407.344127907553, 3)
@@ -249,7 +258,8 @@
         self.model.setParam('radius_a', 20.0)
         self.model.setParam('radius_b', 400.0)
-        self.model.setParam('contrast', 3.e-6)
-        self.model.setParam('background', 0.0)
-        self.model.setParam('axis_theta', 1.57)
+        self.model.setParam('sldEll', 4.e-6)
+        self.model.setParam('sldSolv', 1.e-6)
+        self.model.setParam('background', 0.0)
+        self.model.setParam('axis_theta', 89.95445)
         self.model.setParam('axis_phi', 0.0)
         
@@ -270,4 +280,5 @@
         disp = DisperseModel(self.model, ['radius_a', 'radius_b'], [5, 50])
         disp.setParam('n_pts', 10)
+
         self.assertAlmostEqual(disp.run(0.001), 11948.72581312305, 3)
         self.assertAlmostEqual(disp.runXY([0.001,0.001]), 11811.972359807551, 3)
@@ -279,4 +290,5 @@
         self.model.dispersion['radius_a']['width'] = 5.0
         self.model.dispersion['radius_a']['npts'] = 10
+        self.model.dispersion['radius_a']['nsigmas'] = 2.5
 
         disp_rr = GaussianDispersion()
@@ -284,5 +296,5 @@
         self.model.dispersion['radius_b']['width'] = 50.
         self.model.dispersion['radius_b']['npts'] = 10
-
+        self.model.dispersion['radius_b']['nsigmas'] = 2.5
 
         self.assertAlmostEqual(self.model.run(0.001), 1.10650710*11948.72581312305, 3)
@@ -302,6 +314,6 @@
         weights   = numpy.zeros(100)
         for i in range(100):
-            values_ph[i]=(2.0*math.pi/99.0*i)
-            values_th[i]=(math.pi/99.0*i)
+            values_ph[i]=(360/99.0*i)
+            values_th[i]=(180/99.0*i)
             weights[i]=(1.0)
         
@@ -329,5 +341,6 @@
         self.model.setParam('scale', 1.0)
         self.model.setParam('radius', 60.0)
-        self.model.setParam('contrast', 1)
+        self.model.setParam('sldSph', 2.0e-06)
+        self.model.setParam('sldSolv', 1.0e-6)
         self.model.setParam('background', 0.0)
         
@@ -356,4 +369,5 @@
         self.model.dispersion['radius']['width'] = 10.0
         self.model.dispersion['radius']['npts'] = 10
+        self.model.dispersion['radius']['nsigmas'] = 2.5
 
         self.assertAlmostEqual(self.model.run(0.001), 1.19864810*96795008379475.25,3)
@@ -373,7 +387,8 @@
         self.model.setParam('r_ratio', 1.5)
         self.model.setParam('length', 400.0)
-        self.model.setParam('contrast', 3.e-6)
-        self.model.setParam('background', 0.0)
-        self.model.setParam('cyl_theta', 1.57)
+        self.model.setParam('sldCyl', 4.0e-6)
+        self.model.setParam('sldSolv', 1.0e-6)
+        self.model.setParam('background', 0.0)
+        self.model.setParam('cyl_theta', 90)
         self.model.setParam('cyl_phi', 0.0)
         self.model.setParam('cyl_psi', 0.0)
@@ -386,5 +401,5 @@
         """
         self.assertAlmostEqual(self.model.run(0.001), 675.50440232504991, 3)
-        self.assertAlmostEqual(self.model.runXY([0.001,0.001]), 669.5173937622792, 3)
+        self.assertAlmostEqual(self.model.runXY([0.001,0.001]), 669.5173937622792, 0)
         
     def test_dispersion(self):
@@ -396,5 +411,5 @@
         disp.setParam('n_pts', 10)
         self.assertAlmostEqual(disp.run(0.001), 711.18048194151925, 3)
-        self.assertAlmostEqual(disp.runXY([0.001,0.001]), 704.63525988095705, 3)
+        self.assertAlmostEqual(disp.runXY([0.001,0.001]), 704.63525988095705, 0)
 
     def test_new_disp(self):
@@ -404,4 +419,5 @@
         self.model.dispersion['r_minor']['width'] = 5.0
         self.model.dispersion['r_minor']['npts'] = 10
+        self.model.dispersion['r_minor']['nsigmas'] = 2.5
 
         disp_rr = GaussianDispersion()
@@ -409,4 +425,5 @@
         self.model.dispersion['r_ratio']['width'] = 0.25
         self.model.dispersion['r_ratio']['npts'] = 10
+        self.model.dispersion['r_ratio']['nsigmas'] = 2.5
 
         disp_len = GaussianDispersion()
@@ -414,7 +431,8 @@
         self.model.dispersion['length']['width'] = 50.0
         self.model.dispersion['length']['npts'] = 10
+        self.model.dispersion['length']['nsigmas'] = 2.5
 
         self.assertAlmostEqual(self.model.run(0.001), 1.23925910*711.18048194151925, 3)
-        self.assertAlmostEqual(self.model.runXY([0.001,0.001]), 1.238955*704.63525988095705, 3)
+        self.assertAlmostEqual(self.model.runXY([0.001,0.001]), 1.238955*704.63525988095705, 0)
         
 
@@ -434,7 +452,7 @@
         weights   = numpy.zeros(100)
         for i in range(100):
-            values_ps[i]=(2.0*math.pi/99.0*i)
-            values_ph[i]=(2.0*math.pi/99.0*i)
-            values_th[i]=(math.pi/99.0*i)
+            values_ps[i]=(360/99.0*i)
+            values_ph[i]=(360/99.0*i)
+            values_th[i]=(180/99.0*i)
             weights[i]=(1.0)
         
