Index: .gitignore
===================================================================
--- .gitignore	(revision d6adfbe1e1180ee1d68c9d8ac7b8a93e0e155cca)
+++ .gitignore	(revision 66ebdd668828275e87ada92bedafaa22888a51db)
@@ -14,2 +14,4 @@
 /coverage.xml
 /.coverage
+/.project
+/.pydevproject
Index: sasmodels/models/guinier.py
===================================================================
--- sasmodels/models/guinier.py	(revision eff3d66153ae7c7cf2b2986cb8325bee9dd8aa6c)
+++ sasmodels/models/guinier.py	(revision 66ebdd668828275e87ada92bedafaa22888a51db)
@@ -26,5 +26,5 @@
 description = """
  I(q) = scale exp ( - rg^2 q^2 / 3.0 )
-        
+ 
     List of default parameters:
     scale = scale
@@ -34,9 +34,12 @@
 
 #             ["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 = """
-    double value = rg*rg*q*q/3.0;
-    return exp(-value);
+    double exponent = rg*rg*q*q/3.0;
+    double value = exp(-exponent);
+    return value;
 """
 
@@ -52,2 +55,7 @@
 oldname = 'GuinierModel'
 oldpars = dict(rg='rg')
+
+# parameters for unit tests
+tests = [
+         [{'rg' : 31.5}, 0.005, 0.991756]
+         ]
Index: sasmodels/models/hollow_cylinder.c
===================================================================
--- sasmodels/models/hollow_cylinder.c	(revision 6cf1cb3757709f6fd91de3dc48b0ec677046fcdb)
+++ sasmodels/models/hollow_cylinder.c	(revision 66ebdd668828275e87ada92bedafaa22888a51db)
@@ -1,6 +1,10 @@
-double _hollow_cylinder_kernel(double q, double core_radius, double radius, 
+static double _hollow_cylinder_kernel(double q, double core_radius, double radius, 
 	double length, double dum);
+static double hollow_cylinder_analytical_2D_scaled(double q, double q_x, double q_y, double radius, double core_radius, double length, double sld,
+	double solvent_sld, double theta, double phi);
+static double hollow_cylinder_scaling(double integrand, double delrho, double volume);
+	
+double form_volume(double radius, double core_radius, double length);
 
-double form_volume(double radius, double core_radius, double length);
 double Iq(double q, double radius, double core_radius, double length, double sld,
 	double solvent_sld);
@@ -9,5 +13,5 @@
 
 // From Igor library
-double _hollow_cylinder_kernel(double q, double core_radius, double radius, 
+static double _hollow_cylinder_kernel(double q, double core_radius, double radius, 
 	double length, double dum)
 {
@@ -40,4 +44,56 @@
     return(retval);
 }
+static double hollow_cylinder_analytical_2D_scaled(double q, double q_x, double q_y, double radius, double core_radius, double length, double sld,
+	double solvent_sld, double theta, double phi) {
+	double cyl_x, cyl_y; //, cyl_z
+	//double q_z;
+	double vol, cos_val, delrho;
+	double answer;
+	//convert angle degree to radian
+	double pi = 4.0*atan(1.0);
+	theta = theta * pi/180.0;
+	phi = phi * pi/180.0;
+	delrho = solvent_sld - sld;
+
+	// Cylinder orientation
+	cyl_x = cos(theta) * cos(phi);
+	cyl_y = sin(theta);
+	//cyl_z = -cos(theta) * sin(phi);
+
+	// q vector
+	//q_z = 0;
+
+	// Compute the angle btw vector q and the
+	// axis of the cylinder
+	cos_val = cyl_x*q_x + cyl_y*q_y;// + cyl_z*q_z;
+
+	// The following test should always pass
+	if (fabs(cos_val)>1.0) {
+		printf("core_shell_cylinder_analytical_2D: Unexpected error: cos(alpha)=%g\n", cos_val);
+		return 0;
+	}
+
+	answer = _hollow_cylinder_kernel(q, core_radius, radius, length, cos_val);
+
+	vol = form_volume(radius, core_radius, length);
+	answer = hollow_cylinder_scaling(answer, delrho, vol);
+
+	return answer;
+}
+static double hollow_cylinder_scaling(double integrand, double delrho, double volume)
+{
+	double answer;
+	// Multiply by contrast^2
+	answer = integrand*delrho*delrho;
+
+	//normalize by cylinder volume
+	answer *= volume*volume;
+
+	//convert to [cm-1]
+	answer *= 1.0e-4;
+	
+	return answer;
+}
+
 
 double form_volume(double radius, double core_radius, double length)
@@ -48,4 +104,5 @@
 }
 
+
 double Iq(double q, double radius, double core_radius, double length, double sld,
 	double solvent_sld)
@@ -55,5 +112,5 @@
 	double lower,upper,zi, inter;		//upper and lower integration limits
 	double summ,answer,delrho;			//running tally of integration
-	double norm,scale,volume,convert;	//final calculation variables
+	double norm,volume;	//final calculation variables
 	
 	delrho = solvent_sld - sld;
@@ -69,19 +126,16 @@
  	
 	norm = summ*(upper-lower)/2.0;
-	// Multiply by contrast^2
-	scale = delrho*delrho;
-	//normalize by volume
 	volume = form_volume(radius, core_radius, length);
-	//convert to [cm-1] given sld*1e6
-	convert = 1.0e-4;
-	answer = norm*scale*convert*volume*volume;
+	answer = hollow_cylinder_scaling(norm, delrho, volume);
 	
 	return(answer);
 }
 
-//TODO: Add this in
+//FIXME: Factor of two difference
 double Iqxy(double qx, double qy, double radius, double core_radius, double length, double sld,
 	double solvent_sld, double theta, double phi)
 {
-    return(0.0);
+	double q;
+	q = sqrt(qx*qx+qy*qy);
+	return hollow_cylinder_analytical_2D_scaled(q, qx/q, qy/q, radius, core_radius, length, sld, solvent_sld, theta, phi);
 }
Index: sasmodels/models/hollow_cylinder.py
===================================================================
--- sasmodels/models/hollow_cylinder.py	(revision 6cf1cb3757709f6fd91de3dc48b0ec677046fcdb)
+++ sasmodels/models/hollow_cylinder.py	(revision 66ebdd668828275e87ada92bedafaa22888a51db)
@@ -49,5 +49,5 @@
 .. image:: img/image061.jpg
 
-*Figure. Definition of the angles for the oriented HollowCylinderModel.*
+*Figure. Definition of the angles for the oriented hollow_cylinder model.*
 
 .. image:: img/image062.jpg
@@ -103,2 +103,7 @@
                core_radius='core_radius',sld='sldCyl',length='length',
                solvent_sld='sldSolv',phi='axis_phi',theta='axis_theta')
+
+# Parameters for unit tests
+tests = [
+         [{"radius" : 30.0},0.00005,1764.926]
+         ]
Index: sasmodels/models/lorentz.py
===================================================================
--- sasmodels/models/lorentz.py	(revision 77ad4124cb77244ae5136977f068bd671915053a)
+++ sasmodels/models/lorentz.py	(revision 66ebdd668828275e87ada92bedafaa22888a51db)
@@ -60,2 +60,7 @@
 oldname = 'LorentzModel'
 oldpars = dict(cor_length='length')
+
+# parameters for unit tests
+tests = [
+         [{'cor_length' : 250},0.01,0.137931]
+         ]
