Index: sasmodels/kernel_header.c
===================================================================
--- sasmodels/kernel_header.c	(revision f1ec7002f7fecc5f777ce1efd042be32bd028e89)
+++ sasmodels/kernel_header.c	(revision b7e8b94b477e6d9a7e4e2666bb218d3568ee66d2)
@@ -149,8 +149,9 @@
 
 #if 1
+//think cos(theta) should be sin(theta) in new coords, RKH 11Jan2017
 #define ORIENT_SYMMETRIC(qx, qy, theta, phi, q, sn, cn) do { \
     SINCOS(phi*M_PI_180, sn, cn); \
     q = sqrt(qx*qx + qy*qy); \
-    cn  = (q==0. ? 1.0 : (cn*qx + sn*qy)/q * cos(theta*M_PI_180));  \
+    cn  = (q==0. ? 1.0 : (cn*qx + sn*qy)/q * sin(theta*M_PI_180));  \
     sn = sqrt(1 - cn*cn); \
     } while (0)
Index: sasmodels/models/core_shell_ellipsoid.py
===================================================================
--- sasmodels/models/core_shell_ellipsoid.py	(revision fcb33e4672814b4a8fe1ee865d430090b5fc03e6)
+++ sasmodels/models/core_shell_ellipsoid.py	(revision b7e8b94b477e6d9a7e4e2666bb218d3568ee66d2)
@@ -162,8 +162,9 @@
 
 q = 0.1
-phi = pi/6
-qx = q*cos(phi)
-qy = q*sin(phi)
-# After redefinition of angles find new reasonable values for unit test
+# tests had in old coords theta=0, phi=0; new coords theta=90, phi=0
+qx = q*cos(pi/6.0)
+qy = q*sin(pi/6.0)
+phi = 0.0
+# 11Jan2017 RKH sorted tests after redefinition of angles
 tests = [
      # Accuracy tests based on content in test/utest_coreshellellipsoidXTmodel.py
@@ -192,6 +193,6 @@
       'scale': 1.0,
      }, 0.01, 8688.53],
-
-    [{'background': 0.001}, (0.4, 0.5), 0.00690673],
+# why does it need theta setting here, not globally above?
+   [{'background': 0.001, 'theta':90.0}, (0.4, 0.5), 0.00690673],
 
    [{'radius_equat_core': 20.0,
@@ -204,5 +205,5 @@
       'background': 0.01,
       'scale': 0.01,
-# assuming theta and phi zero here?
+      'theta': 90.0,
      }, (qx, qy), 0.01000025],
     ]
Index: sasmodels/models/cylinder.py
===================================================================
--- sasmodels/models/cylinder.py	(revision fcb33e4672814b4a8fe1ee865d430090b5fc03e6)
+++ sasmodels/models/cylinder.py	(revision b7e8b94b477e6d9a7e4e2666bb218d3568ee66d2)
@@ -152,8 +152,9 @@
 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]],
+#  new coords    
+        [{'theta':80.1534480601659, 'phi':10.1510817110481}, (qx, qy), 0.03514647218513852],
+        [{'theta':80.1534480601659, 'phi':10.1510817110481}, [(qx, qy)], [0.03514647218513852]],
+# old coords   [{'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
Index: sasmodels/models/stacked_disks.py
===================================================================
--- sasmodels/models/stacked_disks.py	(revision 07300ea35d16b40f790fffc4ded20189ec5267a4)
+++ sasmodels/models/stacked_disks.py	(revision b7e8b94b477e6d9a7e4e2666bb218d3568ee66d2)
@@ -148,94 +148,99 @@
             sld_layer=0.0,
             sld_solvent=5.0,
-            theta=0,
+            theta=90,
             phi=0)
-#After redefinition to spherical coordinates find new reasonable test values
-#tests = [
-#    # Accuracy tests based on content in test/utest_extra_models.py.
-#    # Added 2 tests with n_stacked = 5 using SasView 3.1.2 - PDB
-#    [{'thick_core': 10.0,
-#      'thick_layer': 15.0,
-#      'radius': 3000.0,
-#      'n_stacking': 1.0,
-#      'sigma_d': 0.0,
-#      'sld_core': 4.0,
-#      'sld_layer': -0.4,
-#      'solvent_sd': 5.0,
-#      'theta': 0.0,
-#      'phi': 0.0,
-#      'scale': 0.01,
-#      'background': 0.001,
-#     }, 0.001, 5075.12],
-
-#    [{'thick_core': 10.0,
-#      'thick_layer': 15.0,
-#      'radius': 3000.0,
-#      'n_stacking': 5.0,
-#      'sigma_d': 0.0,
-#      'sld_core': 4.0,
-#      'sld_layer': -0.4,
-#      'solvent_sd': 5.0,
-#      'theta': 0.0,
-#      'phi': 0.0,
-#      'scale': 0.01,
-#      'background': 0.001,
-#     }, 0.001, 5065.12793824],
-
-#    [{'thick_core': 10.0,
-#      'thick_layer': 15.0,
-#      'radius': 3000.0,
-#      'n_stacking': 5.0,
-#      'sigma_d': 0.0,
-#      'sld_core': 4.0,
-#      'sld_layer': -0.4,
-#      'solvent_sd': 5.0,
-#      'theta': 0.0,
-#      'phi': 0.0,
-#      'scale': 0.01,
-#      'background': 0.001,
-#     }, 0.164, 0.0127673597265],
-
-#    [{'thick_core': 10.0,
-#      'thick_layer': 15.0,
-#      'radius': 3000.0,
-#      'n_stacking': 1.0,
-#      'sigma_d': 0.0,
-#      'sld_core': 4.0,
-#      'sld_layer': -0.4,
-#      'solvent_sd': 5.0,
-#      'theta': 0.0,
-#      'phi': 0.0,
-#      'scale': 0.01,
-#      'background': 0.001,
-#     }, [0.001, 90.0], [5075.12, 0.001]],
-
-#    [{'thick_core': 10.0,
-#      'thick_layer': 15.0,
-#      'radius': 3000.0,
-#      'n_stacking': 1.0,
-#      'sigma_d': 0.0,
-#      'sld_core': 4.0,
-#      'sld_layer': -0.4,
-#      'solvent_sd': 5.0,
-#      'theta': 0.0,
-#      'phi': 0.0,
-#      'scale': 0.01,
-#      'background': 0.001,
-#     }, ([0.4, 0.5]), [0.00105074, 0.00121761]],
-
-#    [{'thick_core': 10.0,
-#      'thick_layer': 15.0,
-#      'radius': 3000.0,
-#      'n_stacking': 1.0,
-#      'sigma_d': 0.0,
-#      'sld_core': 4.0,
-#      'sld_layer': -0.4,
-#     'solvent_sd': 5.0,
-#      'theta': 0.0,
-#      'phi': 0.0,
-#      'scale': 0.01,
-#      'background': 0.001,
-#     }, ([1.3, 1.57]), [0.0010039, 0.0010038]],
-#    ]
-# 21Mar2016   RKH notes that unit tests all have n_stacking=1, ought to test other values
-
+# After redefinition of spherical coordinates -
+# tests had in old coords theta=0, phi=0; new coords theta=90, phi=0
+# but should not matter here as so far all the tests are 1D not 2D
+tests = [
+# Accuracy tests based on content in test/utest_extra_models.py.
+# Added 2 tests with n_stacked = 5 using SasView 3.1.2 - PDB; for which alas q=0.001 values seem closer to n_stacked=1 not 5, changed assuming my 4.1 code OK, RKH
+    [{'thick_core': 10.0,
+      'thick_layer': 15.0,
+      'radius': 3000.0,
+      'n_stacking': 1.0,
+      'sigma_d': 0.0,
+      'sld_core': 4.0,
+      'sld_layer': -0.4,
+      'solvent_sd': 5.0,
+      'theta': 90.0,
+      'phi': 0.0,
+      'scale': 0.01,
+      'background': 0.001,
+     }, 0.001, 5075.12],
+    [{'thick_core': 10.0,
+      'thick_layer': 15.0,
+      'radius': 3000.0,
+      'n_stacking': 5,
+      'sigma_d': 0.0,
+      'sld_core': 4.0,
+      'sld_layer': -0.4,
+      'solvent_sd': 5.0,
+      'theta': 90.0,
+      'phi': 0.0,
+      'scale': 0.01,
+      'background': 0.001,
+#     }, 0.001, 5065.12793824],    n_stacking=1 not 5 ? slight change in value here 11jan2017, check other cpu types
+#     }, 0.001, 5075.11570493],
+     }, 0.001, 25325.635693],
+    [{'thick_core': 10.0,
+      'thick_layer': 15.0,
+      'radius': 3000.0,
+      'n_stacking': 5,
+      'sigma_d': 0.0,
+      'sld_core': 4.0,
+      'sld_layer': -0.4,
+      'solvent_sd': 5.0,
+      'theta': 90.0,
+      'phi': 0.0,
+      'scale': 0.01,
+      'background': 0.001,
+#     }, 0.164, 0.0127673597265],    n_stacking=1 not 5 ?  slight change in value here 11jan2017, check other cpu types
+#     }, 0.164, 0.01480812968],
+     }, 0.164, 0.0598367986509],
+
+    [{'thick_core': 10.0,
+      'thick_layer': 15.0,
+      'radius': 3000.0,
+      'n_stacking': 1.0,
+      'sigma_d': 0.0,
+      'sld_core': 4.0,
+      'sld_layer': -0.4,
+      'solvent_sd': 5.0,
+      'theta': 90.0,
+      'phi': 0.0,
+      'scale': 0.01,
+      'background': 0.001,
+# second test here was at q=90, changed it to q=5, note I(q) is then just value of flat background
+     }, [0.001, 5.0], [5075.12, 0.001]],
+
+    [{'thick_core': 10.0,
+      'thick_layer': 15.0,
+      'radius': 3000.0,
+      'n_stacking': 1.0,
+      'sigma_d': 0.0,
+      'sld_core': 4.0,
+      'sld_layer': -0.4,
+      'solvent_sd': 5.0,
+      'theta': 90.0,
+      'phi': 0.0,
+      'scale': 0.01,
+      'background': 0.001,
+     }, ([0.4, 0.5]), [0.00105074, 0.00121761]],
+
+    [{'thick_core': 10.0,
+      'thick_layer': 15.0,
+      'radius': 3000.0,
+      'n_stacking': 1.0,
+      'sigma_d': 0.0,
+      'sld_core': 4.0,
+      'sld_layer': -0.4,
+     'solvent_sd': 5.0,
+      'theta': 90.0,
+      'phi': 0.0,
+      'scale': 0.01,
+      'background': 0.001,
+     }, ([1.3, 1.57]), [0.0010039, 0.0010038]],
+    ]
+# 11Jan2017   RKH checking unit test agai, note they are all 1D, no 2D
+
