Index: example/fit.py
===================================================================
--- example/fit.py	(revision 1182da5952c5f1fedd003e65e6b154df780d0afb)
+++ example/fit.py	(revision f4b36fa94da2129ef86fb36f21c6458873815e0f)
@@ -24,5 +24,6 @@
             % section)
 data = radial_data if section != "tangential" else tan_data
-phi = 0 if section != "tangential" else 90
+theta = 89.9 if section != "tangential" else 0
+phi = 90
 kernel = load_model(name, dtype="single")
 cutoff = 1e-3
@@ -30,34 +31,32 @@
 if name == "ellipsoid":
     model = Model(kernel,
-        scale=0.08,
-        r_polar=15, r_equatorial=800,
+        scale=0.08, background=35,
+        radius_polar=15, radius_equatorial=800,
         sld=.291, sld_solvent=7.105,
-        background=0,
-        theta=90, phi=phi,
-        theta_pd=15, theta_pd_n=40, theta_pd_nsigma=3,
-        r_polar_pd=0.222296, r_polar_pd_n=1, r_polar_pd_nsigma=0,
-        r_equatorial_pd=.000128, r_equatorial_pd_n=1, r_equatorial_pd_nsigma=0,
+        theta=theta, phi=phi,
+        theta_pd=0, theta_pd_n=0, theta_pd_nsigma=3,
         phi_pd=0, phi_pd_n=20, phi_pd_nsigma=3,
+        radius_polar_pd=0.222296, radius_polar_pd_n=1, radius_polar_pd_nsigma=0,
+        radius_equatorial_pd=.000128, radius_equatorial_pd_n=1, radius_equatorial_pd_nsigma=0,
         )
 
-
     # SET THE FITTING PARAMETERS
-    model.r_polar.range(15, 1000)
-    model.r_equatorial.range(15, 1000)
-    model.theta_pd.range(0, 360)
+    model.radius_polar.range(15, 1000)
+    model.radius_equatorial.range(15, 1000)
+    #model.theta.range(0, 90)
+    #model.theta_pd.range(0,10)
+    model.phi_pd.range(0,20)
+    model.phi.range(0, 180)
     model.background.range(0,1000)
     model.scale.range(0, 10)
 
 
-
 elif name == "lamellar":
     model = Model(kernel,
-        scale=0.08,
+        scale=0.08, background=0.003,
         thickness=19.2946,
         sld=5.38,sld_sol=7.105,
-        background=0.003,
         thickness_pd= 0.37765, thickness_pd_n=10, thickness_pd_nsigma=3,
         )
-
 
     # SET THE FITTING PARAMETERS
@@ -77,15 +76,15 @@
         radius_pd=.0084, radius_pd_n=10, radius_pd_nsigma=3,
         length_pd=0.493, length_pd_n=10, length_pd_nsigma=3,
-        phi_pd=0, phi_pd_n=5, phi_pd_nsigma=3,)
+        phi_pd=0, phi_pd_n=5 phi_pd_nsigma=3,)
         """
     pars = dict(
         scale=.01, background=35,
         sld=.291, sld_solvent=5.77,
-        radius=250, length=178, 
-        theta=90, phi=phi,
+        radius=250, length=178,
         radius_pd=0.1, radius_pd_n=5, radius_pd_nsigma=3,
         length_pd=0.1,length_pd_n=5, length_pd_nsigma=3,
-        theta_pd=10, theta_pd_n=50, theta_pd_nsigma=3,
-        phi_pd=0, phi_pd_n=10, phi_pd_nsigma=3)
+        theta=theta, phi=phi,
+        theta_pd=0, theta_pd_n=0, theta_pd_nsigma=3,
+        phi_pd=10, phi_pd_n=20, phi_pd_nsigma=3)
     model = Model(kernel, **pars)
 
@@ -93,9 +92,9 @@
     model.radius.range(1, 500)
     model.length.range(1, 5000)
-    model.theta.range(-90,100)
-    model.theta_pd.range(0, 30)
-    model.theta_pd_n = model.theta_pd + 5
+    #model.theta.range(0, 90)
+    model.phi.range(0, 180)
+    model.phi_pd.range(0, 30)
     model.radius_pd.range(0, 1)
-    model.length_pd.range(0, 2)
+    model.length_pd.range(0, 1)
     model.scale.range(0, 10)
     model.background.range(0, 100)
@@ -104,21 +103,22 @@
 elif name == "core_shell_cylinder":
     model = Model(kernel,
-        scale= .031, radius=19.5, thickness=30, length=22,
-        sld_core=7.105, sld_shell=.291, sdl_solvent=7.105,
-        background=0, theta=0, phi=phi,
-
+        scale= .031, background=0,
+        radius=19.5, thickness=30, length=22,
+        sld_core=7.105, sld_shell=.291, sld_solvent=7.105,
         radius_pd=0.26, radius_pd_n=10, radius_pd_nsigma=3,
         length_pd=0.26, length_pd_n=10, length_pd_nsigma=3,
         thickness_pd=1, thickness_pd_n=1, thickness_pd_nsigma=1,
-        theta_pd=1, theta_pd_n=10, theta_pd_nsigma=3,
-        phi_pd=0.1, phi_pd_n=1, phi_pd_nsigma=1,
+        theta=theta, phi=phi,
+        theta_pd=1, theta_pd_n=1, theta_pd_nsigma=3,
+        phi_pd=0, phi_pd_n=20, phi_pd_nsigma=3,
         )
 
     # SET THE FITTING PARAMETERS
-    #model.radius.range(115, 1000)
-    #model.length.range(0, 2500)
+    model.radius.range(115, 1000)
+    model.length.range(0, 2500)
     #model.thickness.range(18, 38)
     #model.thickness_pd.range(0, 1)
     #model.phi.range(0, 90)
+    model.phi_pd.range(0,20)
     #model.radius_pd.range(0, 1)
     #model.length_pd.range(0, 1)
@@ -131,14 +131,25 @@
 elif name == "capped_cylinder":
     model = Model(kernel,
-        scale=.08, radius=20, cap_radius=40, length=400,
+        scale=.08, background=35,
+        radius=20, cap_radius=40, length=400,
         sld=1, sld_solvent=6.3,
-        background=0, theta=0, phi=phi,
         radius_pd=.1, radius_pd_n=5, radius_pd_nsigma=3,
         cap_radius_pd=.1, cap_radius_pd_n=5, cap_radius_pd_nsigma=3,
         length_pd=.1, length_pd_n=1, length_pd_nsigma=0,
-        theta_pd=.1, theta_pd_n=1, theta_pd_nsigma=0,
-        phi_pd=.1, phi_pd_n=1, phi_pd_nsigma=0,
+        theta=theta, phi=phi,
+        theta_pd=0, theta_pd_n=1, theta_pd_nsigma=0,
+        phi_pd=10, phi_pd_n=20, phi_pd_nsigma=0,
         )
 
+    model.radius.range(115, 1000)
+    model.length.range(0, 2500)
+    #model.thickness.range(18, 38)
+    #model.thickness_pd.range(0, 1)
+    #model.phi.range(0, 90)
+    model.phi_pd.range(0,20)
+    #model.radius_pd.range(0, 1)
+    #model.length_pd.range(0, 1)
+    #model.theta_pd.range(0, 360)
+    #model.background.range(0,5)
     model.scale.range(0, 1)
 
@@ -146,19 +157,20 @@
 elif name == "triaxial_ellipsoid":
     model = Model(kernel,
-        scale=0.08, req_minor=15, req_major=20, rpolar=500,
+        scale=0.08, background=35,
+        radius_equat_minor=15, radius_equat_major=20, radius_polar=500,
         sld=7.105, solvent_sld=.291,
-        background=5, theta=0, phi=phi, psi=0,
+        radius_equat_minor_pd=.1, radius_equat_minor_pd_n=1, radius_equat_minor_pd_nsigma=0,
+        radius_equat_major_pd=.1, radius_equat_major_pd_n=1, radius_equat_major_pd_nsigma=0,
+        radius_polar_pd=.1, radius_polar_pd_n=1, radius_polar_pd_nsigma=0,
+        theta=theta, phi=phi, psi=0,
         theta_pd=20, theta_pd_n=40, theta_pd_nsigma=3,
         phi_pd=.1, phi_pd_n=1, phi_pd_nsigma=0,
         psi_pd=30, psi_pd_n=1, psi_pd_nsigma=0,
-        req_minor_pd=.1, req_minor_pd_n=1, req_minor_pd_nsigma=0,
-        req_major_pd=.1, req_major_pd_n=1, req_major_pd_nsigma=0,
-        rpolar_pd=.1, rpolar_pd_n=1, rpolar_pd_nsigma=0,
         )
 
     # SET THE FITTING PARAMETERS
-    model.req_minor.range(15, 1000)
-    model.req_major.range(15, 1000)
-    #model.rpolar.range(15, 1000)
+    model.radius_equat_minor.range(15, 1000)
+    model.radius_equat_major.range(15, 1000)
+    #model.radius_polar.range(15, 1000)
     #model.background.range(0,1000)
     #model.theta_pd.range(0, 360)
@@ -173,5 +185,5 @@
 M = Experiment(data=data, model=model)
 if section == "both":
-   tan_model = Model(model.kernel, **model.parameters())
+   tan_model = Model(model.sasmodel, **model.parameters())
    tan_model.phi = model.phi - 90
    tan_model.cutoff = cutoff
