Index: src/sas/sascalc/calculator/c_extensions/libfunc.c
===================================================================
--- src/sas/sascalc/calculator/c_extensions/libfunc.c	(revision 144e032af2559d8208e907563f404ab479862dbf)
+++ src/sas/sascalc/calculator/c_extensions/libfunc.c	(revision b36e7c726c1824fc66e2a5a76abb7351c49d66e6)
@@ -87,4 +87,6 @@
 }
 
+//The code calculating magnetic sld below seems to be not used.
+//Keeping it in order to check if it is not breaking anything.
 // calculate magnetic sld and return total sld
 // bn : contrast (not just sld of the layer)
@@ -95,121 +97,121 @@
 // spintheta: angle (anti-clock-wise) between neutron spin(up) and x axis
 // Note: all angles are in degrees.
-void cal_msld(polar_sld *p_sld, int isangle, double qx, double qy, double bn,
-				double m01, double mtheta1, double mphi1,
-				double spinfraci, double spinfracf, double spintheta)
-{
-	//locals
-	double q_x = qx;
-	double q_y = qy;
-	double sld = bn;
-	int is_angle = isangle;
-	double pi = 4.0*atan(1.0);
-	double s_theta = spintheta * pi/180.0;
-	double m_max = m01;
-	double m_phi = mphi1;
-	double m_theta = mtheta1;
-	double in_spin = spinfraci;
-	double out_spin = spinfracf;
-
-	double m_perp = 0.0;
-	double m_perp_z = 0.0;
-	double m_perp_y = 0.0;
-	double m_perp_x = 0.0;
-	double m_sigma_x = 0.0;
-	double m_sigma_z = 0.0;
-	double m_sigma_y = 0.0;
-	//double b_m = 0.0;
-	double q_angle = 0.0;
-	double mx = 0.0;
-	double my = 0.0;
-	double mz = 0.0;
-	double uu = sld;
-	double dd = sld;
-	double re_ud = 0.0;
-	double im_ud = 0.0;
-	double re_du = 0.0;
-	double im_du = 0.0;
-
-	//No mag means no further calculation
-	if (isangle>0) {
-		if (m_max < 1.0e-32){
-			uu = sqrt(sqrt(in_spin * out_spin)) * uu;
-			dd = sqrt(sqrt((1.0 - in_spin) * (1.0 - out_spin))) * dd;
-		}
-	}
-	else if (fabs(m_max)< 1.0e-32 && fabs(m_phi)< 1.0e-32 && fabs(m_theta)< 1.0e-32){
-			uu = sqrt(sqrt(in_spin * out_spin)) * uu;
-			dd = sqrt(sqrt((1.0 - in_spin) * (1.0 - out_spin))) * dd;
-	} else {
-
-		//These are needed because of the precision of inputs
-		if (in_spin < 0.0) in_spin = 0.0;
-		if (in_spin > 1.0) in_spin = 1.0;
-		if (out_spin < 0.0) out_spin = 0.0;
-		if (out_spin > 1.0) out_spin = 1.0;
-
-		if (q_x == 0.0) q_angle = pi / 2.0;
-		else q_angle = atan(q_y/q_x);
-		if (q_y < 0.0 && q_x < 0.0) q_angle -= pi;
-		else if (q_y > 0.0 && q_x < 0.0) q_angle += pi;
-
-		q_angle = pi/2.0 - q_angle;
-		if (q_angle > pi) q_angle -= 2.0 * pi;
-		else if (q_angle < -pi) q_angle += 2.0 * pi;
-
-		if (fabs(q_x) < 1.0e-16 && fabs(q_y) < 1.0e-16){
-			m_perp = 0.0;
-			}
-		else {
-			m_perp = m_max;
-			}
-		if (is_angle > 0){
-			m_phi *= pi/180.0;
-			m_theta *= pi/180.0;
-			mx = m_perp * cos(m_theta) * cos(m_phi);
-			my = m_perp * sin(m_theta);
-			mz = -(m_perp * cos(m_theta) * sin(m_phi));
-		}
-		else{
-			mx = m_perp;
-			my = m_phi;
-			mz = m_theta;
-		}
-		//ToDo: simplify these steps
-		// m_perp1 -m_perp2
-		m_perp_x = (mx) *  cos(q_angle);
-		m_perp_x -= (my) * sin(q_angle);
-		m_perp_y = m_perp_x;
-		m_perp_x *= cos(-q_angle);
-		m_perp_y *= sin(-q_angle);
-		m_perp_z = mz;
-
-		m_sigma_x = (m_perp_x * cos(-s_theta) - m_perp_y * sin(-s_theta));
-		m_sigma_y = (m_perp_x * sin(-s_theta) + m_perp_y * cos(-s_theta));
-		m_sigma_z = (m_perp_z);
-
-		//Find b
-		uu -= m_sigma_x;
-		dd += m_sigma_x;
-		re_ud = m_sigma_y;
-		re_du = m_sigma_y;
-		im_ud = m_sigma_z;
-		im_du = -m_sigma_z;
-
-		uu = sqrt(sqrt(in_spin * out_spin)) * uu;
-		dd = sqrt(sqrt((1.0 - in_spin) * (1.0 - out_spin))) * dd;
-
-		re_ud = sqrt(sqrt(in_spin * (1.0 - out_spin))) * re_ud;
-		im_ud = sqrt(sqrt(in_spin * (1.0 - out_spin))) * im_ud;
-		re_du = sqrt(sqrt((1.0 - in_spin) * out_spin)) * re_du;
-		im_du = sqrt(sqrt((1.0 - in_spin) * out_spin)) * im_du;
-	}
-	p_sld->uu = uu;
-	p_sld->dd = dd;
-	p_sld->re_ud = re_ud;
-	p_sld->im_ud = im_ud;
-	p_sld->re_du = re_du;
-	p_sld->im_du = im_du;
-}
+// void cal_msld(polar_sld *p_sld, int isangle, double qx, double qy, double bn,
+// 				double m01, double mtheta1, double mphi1,
+// 				double spinfraci, double spinfracf, double spintheta)
+// {
+// 	//locals
+// 	double q_x = qx;
+// 	double q_y = qy;
+// 	double sld = bn;
+// 	int is_angle = isangle;
+// 	double pi = 4.0*atan(1.0);
+// 	double s_theta = spintheta * pi/180.0;
+// 	double m_max = m01;
+// 	double m_phi = mphi1;
+// 	double m_theta = mtheta1;
+// 	double in_spin = spinfraci;
+// 	double out_spin = spinfracf;
+//
+// 	double m_perp = 0.0;
+// 	double m_perp_z = 0.0;
+// 	double m_perp_y = 0.0;
+// 	double m_perp_x = 0.0;
+// 	double m_sigma_x = 0.0;
+// 	double m_sigma_z = 0.0;
+// 	double m_sigma_y = 0.0;
+// 	//double b_m = 0.0;
+// 	double q_angle = 0.0;
+// 	double mx = 0.0;
+// 	double my = 0.0;
+// 	double mz = 0.0;
+// 	double uu = sld;
+// 	double dd = sld;
+// 	double re_ud = 0.0;
+// 	double im_ud = 0.0;
+// 	double re_du = 0.0;
+// 	double im_du = 0.0;
+//
+// 	//No mag means no further calculation
+// 	if (isangle>0) {
+// 		if (m_max < 1.0e-32){
+// 			uu = sqrt((1+in_spin)/2 * (1+out_spin)/2) * uu;
+// 			dd = sqrt((1.0 - in_spin)/2 * (1.0 - out_spin)/2) * dd;
+// 		}
+// 	}
+// 	else if (fabs(m_max)< 1.0e-32 && fabs(m_phi)< 1.0e-32 && fabs(m_theta)< 1.0e-32){
+// 			uu = sqrt((1+in_spin)/2 * (1+out_spin)/2) * uu;
+// 			dd = sqrt((1.0 - in_spin)/2 * (1.0 - out_spin)/2) * dd;
+// 	} else {
+//
+// 		//These are needed because of the precision of inputs
+// 		if (in_spin < 0.0) in_spin = 0.0;
+// 		if (in_spin > 1.0) in_spin = 1.0;
+// 		if (out_spin < 0.0) out_spin = 0.0;
+// 		if (out_spin > 1.0) out_spin = 1.0;
+//
+// 		if (q_x == 0.0) q_angle = pi / 2.0;
+// 		else q_angle = atan(q_y/q_x);
+// 		if (q_y < 0.0 && q_x < 0.0) q_angle -= pi;
+// 		else if (q_y > 0.0 && q_x < 0.0) q_angle += pi;
+//
+// 		q_angle = pi/2.0 - q_angle;
+// 		if (q_angle > pi) q_angle -= 2.0 * pi;
+// 		else if (q_angle < -pi) q_angle += 2.0 * pi;
+//
+// 		if (fabs(q_x) < 1.0e-16 && fabs(q_y) < 1.0e-16){
+// 			m_perp = 0.0;
+// 			}
+// 		else {
+// 			m_perp = m_max;
+// 			}
+// 		if (is_angle > 0){
+// 			m_phi *= pi/180.0;
+// 			m_theta *= pi/180.0;
+// 			mx = m_perp * cos(m_theta) * cos(m_phi);
+// 			my = m_perp * sin(m_theta);
+// 			mz = -(m_perp * cos(m_theta) * sin(m_phi));
+// 		}
+// 		else{
+// 			mx = m_perp;
+// 			my = m_phi;
+// 			mz = m_theta;
+// 		}
+// 		//ToDo: simplify these steps
+// 		// m_perp1 -m_perp2
+// 		m_perp_x = (mx) *  cos(q_angle);
+// 		m_perp_x -= (my) * sin(q_angle);
+// 		m_perp_y = m_perp_x;
+// 		m_perp_x *= cos(-q_angle);
+// 		m_perp_y *= sin(-q_angle);
+// 		m_perp_z = mz;
+//
+// 		m_sigma_x = (m_perp_x * cos(-s_theta) - m_perp_y * sin(-s_theta));
+// 		m_sigma_y = (m_perp_x * sin(-s_theta) + m_perp_y * cos(-s_theta));
+// 		m_sigma_z = (m_perp_z);
+//
+// 		//Find b
+// 		uu -= m_sigma_x;
+// 		dd += m_sigma_x;
+// 		re_ud = m_sigma_y;
+// 		re_du = m_sigma_y;
+// 		im_ud = m_sigma_z;
+// 		im_du = -m_sigma_z;
+//
+// 		uu = sqrt((1+in_spin) * (1 + out_spin)) * uu;
+// 		dd = sqrt((1.0 - in_spin) * (1.0 - out_spin)) * dd;
+//
+// 		re_ud = sqrt(in_spin * (1.0 - out_spin)) * re_ud;
+// 		im_ud = sqrt(in_spin * (1.0 - out_spin)) * im_ud;
+// 		re_du = sqrt((1.0 - in_spin) * out_spin) * re_du;
+// 		im_du = sqrt((1.0 - in_spin) * out_spin) * im_du;
+// 	}
+// 	p_sld->uu = uu;
+// 	p_sld->dd = dd;
+// 	p_sld->re_ud = re_ud;
+// 	p_sld->im_ud = im_ud;
+// 	p_sld->re_du = re_du;
+// 	p_sld->im_du = im_du;
+// }
 
 
Index: src/sas/sascalc/calculator/c_extensions/libfunc.h
===================================================================
--- src/sas/sascalc/calculator/c_extensions/libfunc.h	(revision 144e032af2559d8208e907563f404ab479862dbf)
+++ src/sas/sascalc/calculator/c_extensions/libfunc.h	(revision b36e7c726c1824fc66e2a5a76abb7351c49d66e6)
@@ -18,6 +18,6 @@
 //double gamln(double x);
 
-void cal_msld(polar_sld*, int isangle, double qx, double qy, double bn, double m01, double mtheta1, 
-			double mphi1, double spinfraci, double spinfracf, double spintheta);
+//void cal_msld(polar_sld*, int isangle, double qx, double qy, double bn, double m01, double mtheta1,
+//			double mphi1, double spinfraci, double spinfracf, double spintheta);
 
 //void gser(float *gamser, float a, float x, float *gln);
Index: src/sas/sascalc/calculator/c_extensions/sld2i.c
===================================================================
--- src/sas/sascalc/calculator/c_extensions/sld2i.c	(revision 144e032af2559d8208e907563f404ab479862dbf)
+++ src/sas/sascalc/calculator/c_extensions/sld2i.c	(revision b36e7c726c1824fc66e2a5a76abb7351c49d66e6)
@@ -47,104 +47,109 @@
  * Compute 2D anisotropic
  */
-void genicomXY(GenI* this, int npoints, double *qx, double *qy, double *I_out){
-	//npoints is given negative for angular averaging
-	// Assumes that q doesn't have qz component and sld_n is all real
-	//double q = 0.0;
-	//double Pi = 4.0*atan(1.0);
-	polar_sld b_sld;
-	double qr = 0.0;
-	Cplx iqr;
-	Cplx ephase;
-	Cplx comp_sld;
-
-	Cplx sumj_uu;
-	Cplx sumj_ud;
-	Cplx sumj_du;
-	Cplx sumj_dd;
-	Cplx temp_fi;
-
-	double count = 0.0;
-	int i, j;
-
-	cassign(&iqr, 0.0, 0.0);
-	cassign(&ephase, 0.0, 0.0);
-	cassign(&comp_sld, 0.0, 0.0);
-
-	//Assume that pixel volumes are given in vol_pix in A^3 unit
-	//int x_size = 0; //in Ang
-	//int y_size = 0; //in Ang
-	//int z_size = 0; //in Ang
-
-	// Loop over q-values and multiply apply matrix
-
-	//printf("npoints: %d, npix: %d\n", npoints, this->n_pix);
-	for(i=0; i<npoints; i++){
-		//I_out[i] = 0.0;
-		cassign(&sumj_uu, 0.0, 0.0);
-		cassign(&sumj_ud, 0.0, 0.0);
-		cassign(&sumj_du, 0.0, 0.0);
-		cassign(&sumj_dd, 0.0, 0.0);
-		//printf("i: %d\n", i);
-		//q = sqrt(qx[i]*qx[i] + qy[i]*qy[i]); // + qz[i]*qz[i]);
-
-		for(j=0; j<this->n_pix; j++){
-			if (this->sldn_val[j]!=0.0
-				||this->mx_val[j]!=0.0
-				||this->my_val[j]!=0.0
-				||this->mz_val[j]!=0.0)
-			{
-			    // printf("i,j: %d,%d\n", i,j);
-				//anisotropic
-				cassign(&temp_fi, 0.0, 0.0);
-				cal_msld(&b_sld, 0, qx[i], qy[i], this->sldn_val[j],
-							 this->mx_val[j], this->my_val[j], this->mz_val[j],
-			 				 this->inspin, this->outspin, this->stheta);
-				qr = (qx[i]*this->x_val[j] + qy[i]*this->y_val[j]);
-				cassign(&iqr, 0.0, qr);
-				cplx_exp(&ephase, iqr);
-
-				//Let's multiply pixel(atomic) volume here
-				rcmult(&ephase, this->vol_pix[j], ephase);
-				//up_up
-				if (this->inspin > 0.0 && this->outspin > 0.0){
-					cassign(&comp_sld, b_sld.uu, 0.0);
-					cplx_mult(&temp_fi, comp_sld, ephase);
-					cplx_add(&sumj_uu, sumj_uu, temp_fi);
-				}
-				//down_down
-				if (this->inspin < 1.0 && this->outspin < 1.0){
-					cassign(&comp_sld, b_sld.dd, 0.0);
-					cplx_mult(&temp_fi, comp_sld, ephase);
-					cplx_add(&sumj_dd, sumj_dd, temp_fi);
-				}
-				//up_down
-				if (this->inspin > 0.0 && this->outspin < 1.0){
-					cassign(&comp_sld, b_sld.re_ud, b_sld.im_ud);
-					cplx_mult(&temp_fi, comp_sld, ephase);
-					cplx_add(&sumj_ud, sumj_ud, temp_fi);
-				}
-				//down_up
-				if (this->inspin < 1.0 && this->outspin > 0.0){
-					cassign(&comp_sld, b_sld.re_du, b_sld.im_du);
-					cplx_mult(&temp_fi, comp_sld, ephase);
-					cplx_add(&sumj_du, sumj_du, temp_fi);
-				}
-
-				if (i == 0){
-					count += this->vol_pix[j];
-				}
-			}
-		}
-		//printf("aa%d=%g %g %d\n", i, (sumj_uu.re*sumj_uu.re + sumj_uu.im*sumj_uu.im), (sumj_dd.re*sumj_dd.re + sumj_dd.im*sumj_dd.im), count);
-
-		I_out[i] = (sumj_uu.re*sumj_uu.re + sumj_uu.im*sumj_uu.im);
-		I_out[i] += (sumj_ud.re*sumj_ud.re + sumj_ud.im*sumj_ud.im);
-		I_out[i] += (sumj_du.re*sumj_du.re + sumj_du.im*sumj_du.im);
-		I_out[i] += (sumj_dd.re*sumj_dd.re + sumj_dd.im*sumj_dd.im);
-
-		I_out[i] *= (1.0E+8 / count); //in cm (unit) / number; //to be multiplied by vol_pix
-	}
-	//printf("count = %d %g %g %g %g\n", count, this->sldn_val[0],this->mx_val[0], this->my_val[0], this->mz_val[0]);
-}
+
+
+ //The code calculating magnetic scattering below seems to be not used.
+ //Keeping it in order to check if it is not breaking anything.
+// void genicomXY(GenI* this, int npoints, double *qx, double *qy, double *I_out){
+// 	//npoints is given negative for angular averaging
+// 	// Assumes that q doesn't have qz component and sld_n is all real
+// 	//double q = 0.0;
+// 	//double Pi = 4.0*atan(1.0);
+// 	polar_sld b_sld;
+// 	double qr = 0.0;
+// 	Cplx iqr;
+// 	Cplx ephase;
+// 	Cplx comp_sld;
+//
+// 	Cplx sumj_uu;
+// 	Cplx sumj_ud;
+// 	Cplx sumj_du;
+// 	Cplx sumj_dd;
+// 	Cplx temp_fi;
+//
+// 	double count = 0.0;
+// 	int i, j;
+//
+// 	cassign(&iqr, 0.0, 0.0);
+// 	cassign(&ephase, 0.0, 0.0);
+// 	cassign(&comp_sld, 0.0, 0.0);
+//
+// 	//Assume that pixel volumes are given in vol_pix in A^3 unit
+// 	//int x_size = 0; //in Ang
+// 	//int y_size = 0; //in Ang
+// 	//int z_size = 0; //in Ang
+//
+// 	// Loop over q-values and multiply apply matrix
+//
+// 	//printf("npoints: %d, npix: %d\n", npoints, this->n_pix);
+// 	for(i=0; i<npoints; i++){
+// 		//I_out[i] = 0.0;
+// 		cassign(&sumj_uu, 0.0, 0.0);
+// 		cassign(&sumj_ud, 0.0, 0.0);
+// 		cassign(&sumj_du, 0.0, 0.0);
+// 		cassign(&sumj_dd, 0.0, 0.0);
+// 		//printf("i: %d\n", i);
+// 		//q = sqrt(qx[i]*qx[i] + qy[i]*qy[i]); // + qz[i]*qz[i]);
+//
+// 		for(j=0; j<this->n_pix; j++){
+//
+// 			if (this->sldn_val[j]!=0.0
+// 				||this->mx_val[j]!=0.0
+// 				||this->my_val[j]!=0.0
+// 				||this->mz_val[j]!=0.0)
+// 			{
+// 			    // printf("i,j: %d,%d\n", i,j);
+// 				//anisotropic
+// 				cassign(&temp_fi, 0.0, 0.0);
+// 				cal_msld(&b_sld, 0, qx[i], qy[i], this->sldn_val[j],
+// 							 this->mx_val[j], this->my_val[j], this->mz_val[j],
+// 			 				 this->inspin, this->outspin, this->stheta);
+// 				qr = (qx[i]*this->x_val[j] + qy[i]*this->y_val[j]);
+// 				cassign(&iqr, 0.0, qr);
+// 				cplx_exp(&ephase, iqr);
+//
+// 				//Let's multiply pixel(atomic) volume here
+// 				rcmult(&ephase, this->vol_pix[j], ephase);
+// 				//up_up
+// 				if (this->inspin > 0.0 && this->outspin > 0.0){
+// 					cassign(&comp_sld, b_sld.uu, 0.0);
+// 					cplx_mult(&temp_fi, comp_sld, ephase);
+// 					cplx_add(&sumj_uu, sumj_uu, temp_fi);
+// 				}
+// 				//down_down
+// 				if (this->inspin < 1.0 && this->outspin < 1.0){
+// 					cassign(&comp_sld, b_sld.dd, 0.0);
+// 					cplx_mult(&temp_fi, comp_sld, ephase);
+// 					cplx_add(&sumj_dd, sumj_dd, temp_fi);
+// 				}
+// 				//up_down
+// 				if (this->inspin > 0.0 && this->outspin < 1.0){
+// 					cassign(&comp_sld, b_sld.re_ud, b_sld.im_ud);
+// 					cplx_mult(&temp_fi, comp_sld, ephase);
+// 					cplx_add(&sumj_ud, sumj_ud, temp_fi);
+// 				}
+// 				//down_up
+// 				if (this->inspin < 1.0 && this->outspin > 0.0){
+// 					cassign(&comp_sld, b_sld.re_du, b_sld.im_du);
+// 					cplx_mult(&temp_fi, comp_sld, ephase);
+// 					cplx_add(&sumj_du, sumj_du, temp_fi);
+// 				}
+//
+// 				if (i == 0){
+// 					count += this->vol_pix[j];
+// 				}
+// 			}
+// 		}
+// 		//printf("aa%d=%g %g %d\n", i, (sumj_uu.re*sumj_uu.re + sumj_uu.im*sumj_uu.im), (sumj_dd.re*sumj_dd.re + sumj_dd.im*sumj_dd.im), count);
+//
+// 		I_out[i] = (sumj_uu.re*sumj_uu.re + sumj_uu.im*sumj_uu.im);
+// 		I_out[i] += (sumj_ud.re*sumj_ud.re + sumj_ud.im*sumj_ud.im);
+// 		I_out[i] += (sumj_du.re*sumj_du.re + sumj_du.im*sumj_du.im);
+// 		I_out[i] += (sumj_dd.re*sumj_dd.re + sumj_dd.im*sumj_dd.im);
+//
+// 		I_out[i] *= (1.0E+8  / count); //in cm (unit) / number; //to be multiplied by vol_pix
+// 	}
+// 	//printf("count = %d %g %g %g %g\n", count, this->sldn_val[0],this->mx_val[0], this->my_val[0], this->mz_val[0]);
+// }
 /**
  * Compute 1D isotropic
Index: src/sas/sascalc/calculator/c_extensions/sld2i.h
===================================================================
--- src/sas/sascalc/calculator/c_extensions/sld2i.h	(revision 54b0650fdadd5a49ef015c2834003a1ea44c39d2)
+++ src/sas/sascalc/calculator/c_extensions/sld2i.h	(revision b36e7c726c1824fc66e2a5a76abb7351c49d66e6)
@@ -32,5 +32,5 @@
 		double s_theta);
 // compute function
-void genicomXY(GenI*, int npoints, double* qx, double* qy, double *I_out);
+//void genicomXY(GenI*, int npoints, double* qx, double* qy, double *I_out);
 void genicom(GenI*, int npoints, double* q, double *I_out);
 
Index: src/sas/sascalc/calculator/c_extensions/sld2i_module.c
===================================================================
--- src/sas/sascalc/calculator/c_extensions/sld2i_module.c	(revision 7ba64705ddaa18ab8bce14ae2ac2e767b23eb313)
+++ src/sas/sascalc/calculator/c_extensions/sld2i_module.c	(revision b36e7c726c1824fc66e2a5a76abb7351c49d66e6)
@@ -18,6 +18,6 @@
 // Vector binding glue
 #if (PY_VERSION_HEX > 0x03000000) && !defined(Py_LIMITED_API)
-  // Assuming that a view into a writable vector points to a 
-  // non-changing pointer for the duration of the C call, capture 
+  // Assuming that a view into a writable vector points to a
+  // non-changing pointer for the duration of the C call, capture
   // the view pointer and immediately free the view.
   #define VECTOR(VEC_obj, VEC_buf, VEC_len) do { \
@@ -101,31 +101,31 @@
  * GenI the given input (2D) according to a given object
  */
-PyObject * genicom_inputXY(PyObject *self, PyObject *args) {
-	PyObject *gen_obj;
-	PyObject *qx_obj;
-	PyObject *qy_obj;
-	PyObject *I_out_obj;
-	Py_ssize_t n_qx, n_qy, n_out;
-	double *qx;
-	double *qy;
-	double *I_out;
-	GenI* sld2i;
-
-	//printf("in genicom_inputXY\n");
-	if (!PyArg_ParseTuple(args, "OOOO",  &gen_obj, &qx_obj, &qy_obj, &I_out_obj)) return NULL;
-	sld2i = (GenI *)PyCapsule_GetPointer(gen_obj, "GenI");
-	VECTOR(qx_obj, qx, n_qx);
-	VECTOR(qy_obj, qy, n_qy);
-	VECTOR(I_out_obj, I_out, n_out);
-	//printf("qx, qy, I_out: %d %d %d, %d %d %d\n", qx, qy, I_out, n_qx, n_qy, n_out);
-
-	// Sanity check
-	//if(n_q!=n_out) return Py_BuildValue("i",-1);
-
-	genicomXY(sld2i, (int)n_qx, qx, qy, I_out);
-	//printf("done calc\n");
-	//return PyCObject_FromVoidPtr(s, del_genicom);
-	return Py_BuildValue("i",1);
-}
+// PyObject * genicom_inputXY(PyObject *self, PyObject *args) {
+// 	PyObject *gen_obj;
+// 	PyObject *qx_obj;
+// 	PyObject *qy_obj;
+// 	PyObject *I_out_obj;
+// 	Py_ssize_t n_qx, n_qy, n_out;
+// 	double *qx;
+// 	double *qy;
+// 	double *I_out;
+// 	GenI* sld2i;
+//
+// 	//printf("in genicom_inputXY\n");
+// 	if (!PyArg_ParseTuple(args, "OOOO",  &gen_obj, &qx_obj, &qy_obj, &I_out_obj)) return NULL;
+// 	sld2i = (GenI *)PyCapsule_GetPointer(gen_obj, "GenI");
+// 	VECTOR(qx_obj, qx, n_qx);
+// 	VECTOR(qy_obj, qy, n_qy);
+// 	VECTOR(I_out_obj, I_out, n_out);
+// 	//printf("qx, qy, I_out: %d %d %d, %d %d %d\n", qx, qy, I_out, n_qx, n_qy, n_out);
+//
+// 	// Sanity check
+// 	//if(n_q!=n_out) return Py_BuildValue("i",-1);
+//
+// 	genicomXY(sld2i, (int)n_qx, qx, qy, I_out);
+// 	//printf("done calc\n");
+// 	//return PyCObject_FromVoidPtr(s, del_genicom);
+// 	return Py_BuildValue("i",1);
+// }
 
 /**
@@ -161,6 +161,6 @@
 	{"genicom",(PyCFunction)genicom_input, METH_VARARGS,
 		  "genicom the given 1d input arrays"},
-	{"genicomXY",(PyCFunction)genicom_inputXY, METH_VARARGS,
-		  "genicomXY the given 2d input arrays"},
+//	{"genicomXY",(PyCFunction)genicom_inputXY, METH_VARARGS,
+//		  "genicomXY the given 2d input arrays"},
     {NULL}
 };
Index: src/sas/sascalc/calculator/sas_gen.py
===================================================================
--- src/sas/sascalc/calculator/sas_gen.py	(revision 952ea1fd0d931d2eae09831204ea057abfe5450f)
+++ src/sas/sascalc/calculator/sas_gen.py	(revision b36e7c726c1824fc66e2a5a76abb7351c49d66e6)
@@ -134,5 +134,5 @@
         sldn -= self.params['solvent_SLD']
         # **** WARNING **** new_GenI holds pointers to numpy vectors
-        # be sure that they are contiguous double precision arrays and make 
+        # be sure that they are contiguous double precision arrays and make
         # sure the GC doesn't eat them before genicom is called.
         # TODO: rewrite so that the parameters are passed directly to genicom
