Index: sansmodels/src/sans/models/c_extensions/CBinaryHSModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CBinaryHSModel.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,305 +1,0 @@
-/** CBinaryHSModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY binaryHs.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "binaryHs.h"
-
-/// Error object for raised exceptions
-static PyObject * CBinaryHSModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	BinaryHSParameters model_pars;
-} CBinaryHSModel;
-
-
-static void
-CBinaryHSModel_dealloc(CBinaryHSModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CBinaryHSModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CBinaryHSModel *self;
-    
-    self = (CBinaryHSModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CBinaryHSModel_init(CBinaryHSModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"vol_frac_ls",Py_BuildValue("d",0.100000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.001000));
-        PyDict_SetItemString(self->params,"vol_frac_ss",Py_BuildValue("d",0.200000));
-        PyDict_SetItemString(self->params,"solvent_sld",Py_BuildValue("d",0.000006));
-        PyDict_SetItemString(self->params,"ls_sld",Py_BuildValue("d",0.000003));
-        PyDict_SetItemString(self->params,"ss_sld",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"s_radius",Py_BuildValue("d",25.000000));
-        PyDict_SetItemString(self->params,"l_radius",Py_BuildValue("d",100.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CBinaryHSModel_members[] = {
-    {"params", T_OBJECT, offsetof(CBinaryHSModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CBinaryHSModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CBinaryHSModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CBinaryHSModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.vol_frac_ls = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ls") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.vol_frac_ss = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ss") );
-    self->model_pars.solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") );
-    self->model_pars.ls_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ls_sld") );
-    self->model_pars.ss_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ss_sld") );
-    self->model_pars.s_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "s_radius") );
-    self->model_pars.l_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "l_radius") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CBinaryHSModelError, 
-	    	"CBinaryHSModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CBinaryHSModelError, 
-	    		"CBinaryHSModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CBinaryHSModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CBinaryHSModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",binaryHs_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CBinaryHSModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",binaryHs_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CBinaryHSModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.vol_frac_ls = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ls") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.vol_frac_ss = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ss") );
-    self->model_pars.solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") );
-    self->model_pars.ls_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ls_sld") );
-    self->model_pars.ss_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ss_sld") );
-    self->model_pars.s_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "s_radius") );
-    self->model_pars.l_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "l_radius") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CBinaryHSModelError, 
-	    	"CBinaryHSModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CBinaryHSModelError, 
-	    		"CBinaryHSModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CBinaryHSModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CBinaryHSModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",binaryHs_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CBinaryHSModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",binaryHs_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CBinaryHSModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CBinaryHSModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CBinaryHSModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CBinaryHSModel",             /*tp_name*/
-    sizeof(CBinaryHSModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CBinaryHSModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CBinaryHSModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CBinaryHSModel_methods,             /* tp_methods */
-    CBinaryHSModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CBinaryHSModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CBinaryHSModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCBinaryHSModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CBinaryHSModelType) < 0)
-        return;
-
-    Py_INCREF(&CBinaryHSModelType);
-    PyModule_AddObject(module, "CBinaryHSModel", (PyObject *)&CBinaryHSModelType);
-    
-    d = PyModule_GetDict(module);
-    CBinaryHSModelError = PyErr_NewException("CBinaryHSModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CBinaryHSModelError", CBinaryHSModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CBinaryHSPSF11Model.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CBinaryHSPSF11Model.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,305 +1,0 @@
-/** CBinaryHSPSF11Model
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY binaryHS_PSF11.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "binaryHS_PSF11.h"
-
-/// Error object for raised exceptions
-static PyObject * CBinaryHSPSF11ModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	BinaryHSPSF11Parameters model_pars;
-} CBinaryHSPSF11Model;
-
-
-static void
-CBinaryHSPSF11Model_dealloc(CBinaryHSPSF11Model* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CBinaryHSPSF11Model_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CBinaryHSPSF11Model *self;
-    
-    self = (CBinaryHSPSF11Model *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CBinaryHSPSF11Model_init(CBinaryHSPSF11Model *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"vol_frac_ls",Py_BuildValue("d",0.200000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.001000));
-        PyDict_SetItemString(self->params,"vol_frac_ss",Py_BuildValue("d",0.200000));
-        PyDict_SetItemString(self->params,"solvent_sld",Py_BuildValue("d",0.000006));
-        PyDict_SetItemString(self->params,"ls_sld",Py_BuildValue("d",0.000003));
-        PyDict_SetItemString(self->params,"ss_sld",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"s_radius",Py_BuildValue("d",25.000000));
-        PyDict_SetItemString(self->params,"l_radius",Py_BuildValue("d",160.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CBinaryHSPSF11Model_members[] = {
-    {"params", T_OBJECT, offsetof(CBinaryHSPSF11Model, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CBinaryHSPSF11Model, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CBinaryHSPSF11Model_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CBinaryHSPSF11Model *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.vol_frac_ls = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ls") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.vol_frac_ss = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ss") );
-    self->model_pars.solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") );
-    self->model_pars.ls_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ls_sld") );
-    self->model_pars.ss_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ss_sld") );
-    self->model_pars.s_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "s_radius") );
-    self->model_pars.l_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "l_radius") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CBinaryHSPSF11ModelError, 
-	    	"CBinaryHSPSF11Model.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CBinaryHSPSF11ModelError, 
-	    		"CBinaryHSPSF11Model.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CBinaryHSPSF11Model_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CBinaryHSPSF11Model_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",binaryHS_PSF11_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CBinaryHSPSF11Model_readDouble(pars);		
-		
-		return Py_BuildValue("d",binaryHS_PSF11_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CBinaryHSPSF11Model *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.vol_frac_ls = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ls") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.vol_frac_ss = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ss") );
-    self->model_pars.solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") );
-    self->model_pars.ls_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ls_sld") );
-    self->model_pars.ss_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ss_sld") );
-    self->model_pars.s_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "s_radius") );
-    self->model_pars.l_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "l_radius") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CBinaryHSPSF11ModelError, 
-	    	"CBinaryHSPSF11Model.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CBinaryHSPSF11ModelError, 
-	    		"CBinaryHSPSF11Model.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CBinaryHSPSF11Model_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CBinaryHSPSF11Model_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",binaryHS_PSF11_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CBinaryHSPSF11Model_readDouble(pars);		
-		
-		return Py_BuildValue("d",binaryHS_PSF11_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CBinaryHSPSF11Model *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CBinaryHSPSF11Model_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CBinaryHSPSF11ModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CBinaryHSPSF11Model",             /*tp_name*/
-    sizeof(CBinaryHSPSF11Model),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CBinaryHSPSF11Model_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CBinaryHSPSF11Model objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CBinaryHSPSF11Model_methods,             /* tp_methods */
-    CBinaryHSPSF11Model_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CBinaryHSPSF11Model_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CBinaryHSPSF11Model_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCBinaryHSPSF11Model(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CBinaryHSPSF11ModelType) < 0)
-        return;
-
-    Py_INCREF(&CBinaryHSPSF11ModelType);
-    PyModule_AddObject(module, "CBinaryHSPSF11Model", (PyObject *)&CBinaryHSPSF11ModelType);
-    
-    d = PyModule_GetDict(module);
-    CBinaryHSPSF11ModelError = PyErr_NewException("CBinaryHSPSF11Model.error", NULL, NULL);
-    PyDict_SetItemString(d, "CBinaryHSPSF11ModelError", CBinaryHSPSF11ModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CCoreShellCylinderModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CCoreShellCylinderModel.c	(revision a8d6888a4aca60748f072915b7116a8daf50636b)
+++ 	(revision )
@@ -1,311 +1,0 @@
-/** CCoreShellCylinderModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY core_shell_cylinder.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "core_shell_cylinder.h"
-
-/// Error object for raised exceptions
-static PyObject * CCoreShellCylinderModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	CoreShellCylinderParameters model_pars;
-} CCoreShellCylinderModel;
-
-
-static void
-CCoreShellCylinderModel_dealloc(CCoreShellCylinderModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CCoreShellCylinderModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CCoreShellCylinderModel *self;
-    
-    self = (CCoreShellCylinderModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CCoreShellCylinderModel_init(CCoreShellCylinderModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",1.570000));
-        PyDict_SetItemString(self->params,"solvent_sld",Py_BuildValue("d",0.000001));
-        PyDict_SetItemString(self->params,"thickness",Py_BuildValue("d",10.000000));
-        PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"length",Py_BuildValue("d",400.000000));
-        PyDict_SetItemString(self->params,"core_sld",Py_BuildValue("d",0.000001));
-        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",20.000000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"shell_sld",Py_BuildValue("d",0.000004));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CCoreShellCylinderModel_members[] = {
-    {"params", T_OBJECT, offsetof(CCoreShellCylinderModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CCoreShellCylinderModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CCoreShellCylinderModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CCoreShellCylinderModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );
-    self->model_pars.solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") );
-    self->model_pars.thickness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thickness") );
-    self->model_pars.axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );
-    self->model_pars.length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") );
-    self->model_pars.core_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_sld") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.shell_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "shell_sld") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCoreShellCylinderModelError, 
-	    	"CCoreShellCylinderModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CCoreShellCylinderModelError, 
-	    		"CCoreShellCylinderModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CCoreShellCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CCoreShellCylinderModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",core_shell_cylinder_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CCoreShellCylinderModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",core_shell_cylinder_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CCoreShellCylinderModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );
-    self->model_pars.solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") );
-    self->model_pars.thickness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thickness") );
-    self->model_pars.axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );
-    self->model_pars.length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") );
-    self->model_pars.core_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_sld") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.shell_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "shell_sld") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCoreShellCylinderModelError, 
-	    	"CCoreShellCylinderModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CCoreShellCylinderModelError, 
-	    		"CCoreShellCylinderModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CCoreShellCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CCoreShellCylinderModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",core_shell_cylinder_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CCoreShellCylinderModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",core_shell_cylinder_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CCoreShellCylinderModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CCoreShellCylinderModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CCoreShellCylinderModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CCoreShellCylinderModel",             /*tp_name*/
-    sizeof(CCoreShellCylinderModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CCoreShellCylinderModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CCoreShellCylinderModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CCoreShellCylinderModel_methods,             /* tp_methods */
-    CCoreShellCylinderModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CCoreShellCylinderModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CCoreShellCylinderModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCCoreShellCylinderModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CCoreShellCylinderModelType) < 0)
-        return;
-
-    Py_INCREF(&CCoreShellCylinderModelType);
-    PyModule_AddObject(module, "CCoreShellCylinderModel", (PyObject *)&CCoreShellCylinderModelType);
-    
-    d = PyModule_GetDict(module);
-    CCoreShellCylinderModelError = PyErr_NewException("CCoreShellCylinderModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CCoreShellCylinderModelError", CCoreShellCylinderModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CCoreShellEllipsoidModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CCoreShellEllipsoidModel.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,311 +1,0 @@
-/** CCoreShellEllipsoidModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY spheroid.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "spheroid.h"
-
-/// Error object for raised exceptions
-static PyObject * CCoreShellEllipsoidModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	SpheroidParameters model_pars;
-} CCoreShellEllipsoidModel;
-
-
-static void
-CCoreShellEllipsoidModel_dealloc(CCoreShellEllipsoidModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CCoreShellEllipsoidModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CCoreShellEllipsoidModel *self;
-    
-    self = (CCoreShellEllipsoidModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CCoreShellEllipsoidModel_init(CCoreShellEllipsoidModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"polar_shell",Py_BuildValue("d",30.000000));
-        PyDict_SetItemString(self->params,"sld_solvent",Py_BuildValue("d",0.000006));
-        PyDict_SetItemString(self->params,"equat_shell",Py_BuildValue("d",250.000000));
-        PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.001000));
-        PyDict_SetItemString(self->params,"equat_core",Py_BuildValue("d",200.000000));
-        PyDict_SetItemString(self->params,"polar_core",Py_BuildValue("d",20.000000));
-        PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000001));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CCoreShellEllipsoidModel_members[] = {
-    {"params", T_OBJECT, offsetof(CCoreShellEllipsoidModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CCoreShellEllipsoidModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CCoreShellEllipsoidModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CCoreShellEllipsoidModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );
-    self->model_pars.polar_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_shell") );
-    self->model_pars.sld_solvent = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_solvent") );
-    self->model_pars.equat_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "equat_shell") );
-    self->model_pars.axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.equat_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "equat_core") );
-    self->model_pars.polar_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_core") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCoreShellEllipsoidModelError, 
-	    	"CCoreShellEllipsoidModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CCoreShellEllipsoidModelError, 
-	    		"CCoreShellEllipsoidModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CCoreShellEllipsoidModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CCoreShellEllipsoidModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",spheroid_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CCoreShellEllipsoidModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",spheroid_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CCoreShellEllipsoidModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );
-    self->model_pars.polar_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_shell") );
-    self->model_pars.sld_solvent = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_solvent") );
-    self->model_pars.equat_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "equat_shell") );
-    self->model_pars.axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.equat_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "equat_core") );
-    self->model_pars.polar_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_core") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCoreShellEllipsoidModelError, 
-	    	"CCoreShellEllipsoidModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CCoreShellEllipsoidModelError, 
-	    		"CCoreShellEllipsoidModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CCoreShellEllipsoidModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CCoreShellEllipsoidModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",spheroid_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CCoreShellEllipsoidModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",spheroid_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CCoreShellEllipsoidModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CCoreShellEllipsoidModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CCoreShellEllipsoidModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CCoreShellEllipsoidModel",             /*tp_name*/
-    sizeof(CCoreShellEllipsoidModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CCoreShellEllipsoidModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CCoreShellEllipsoidModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CCoreShellEllipsoidModel_methods,             /* tp_methods */
-    CCoreShellEllipsoidModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CCoreShellEllipsoidModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CCoreShellEllipsoidModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCCoreShellEllipsoidModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CCoreShellEllipsoidModelType) < 0)
-        return;
-
-    Py_INCREF(&CCoreShellEllipsoidModelType);
-    PyModule_AddObject(module, "CCoreShellEllipsoidModel", (PyObject *)&CCoreShellEllipsoidModelType);
-    
-    d = PyModule_GetDict(module);
-    CCoreShellEllipsoidModelError = PyErr_NewException("CCoreShellEllipsoidModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CCoreShellEllipsoidModelError", CCoreShellEllipsoidModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CCoreShellModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CCoreShellModel.c	(revision a8d6888a4aca60748f072915b7116a8daf50636b)
+++ 	(revision )
@@ -1,302 +1,0 @@
-/** CCoreShellModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY core_shell.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "core_shell.h"
-
-/// Error object for raised exceptions
-static PyObject * CCoreShellModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	CoreShellParameters model_pars;
-} CCoreShellModel;
-
-
-static void
-CCoreShellModel_dealloc(CCoreShellModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CCoreShellModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CCoreShellModel *self;
-    
-    self = (CCoreShellModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CCoreShellModel_init(CCoreShellModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"core_sld",Py_BuildValue("d",0.000001));
-        PyDict_SetItemString(self->params,"thickness",Py_BuildValue("d",10.000000));
-        PyDict_SetItemString(self->params,"solvent_sld",Py_BuildValue("d",0.000003));
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",60.000000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"shell_sld",Py_BuildValue("d",0.000002));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CCoreShellModel_members[] = {
-    {"params", T_OBJECT, offsetof(CCoreShellModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CCoreShellModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CCoreShellModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CCoreShellModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.core_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_sld") );
-    self->model_pars.thickness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thickness") );
-    self->model_pars.solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.shell_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "shell_sld") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCoreShellModelError, 
-	    	"CCoreShellModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CCoreShellModelError, 
-	    		"CCoreShellModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CCoreShellModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CCoreShellModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",core_shell_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CCoreShellModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",core_shell_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CCoreShellModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.core_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_sld") );
-    self->model_pars.thickness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thickness") );
-    self->model_pars.solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.shell_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "shell_sld") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCoreShellModelError, 
-	    	"CCoreShellModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CCoreShellModelError, 
-	    		"CCoreShellModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CCoreShellModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CCoreShellModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",core_shell_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CCoreShellModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",core_shell_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CCoreShellModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CCoreShellModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CCoreShellModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CCoreShellModel",             /*tp_name*/
-    sizeof(CCoreShellModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CCoreShellModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CCoreShellModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CCoreShellModel_methods,             /* tp_methods */
-    CCoreShellModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CCoreShellModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CCoreShellModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCCoreShellModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CCoreShellModelType) < 0)
-        return;
-
-    Py_INCREF(&CCoreShellModelType);
-    PyModule_AddObject(module, "CCoreShellModel", (PyObject *)&CCoreShellModelType);
-    
-    d = PyModule_GetDict(module);
-    CCoreShellModelError = PyErr_NewException("CCoreShellModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CCoreShellModelError", CCoreShellModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CCylinderModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CCylinderModel.c	(revision a8d6888a4aca60748f072915b7116a8daf50636b)
+++ 	(revision )
@@ -1,302 +1,0 @@
-/** CCylinderModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY cylinder.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "cylinder.h"
-
-/// Error object for raised exceptions
-static PyObject * CCylinderModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	CylinderParameters model_pars;
-} CCylinderModel;
-
-
-static void
-CCylinderModel_dealloc(CCylinderModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CCylinderModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CCylinderModel *self;
-    
-    self = (CCylinderModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CCylinderModel_init(CCylinderModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"length",Py_BuildValue("d",400.000000));
-        PyDict_SetItemString(self->params,"cyl_theta",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",20.000000));
-        PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000003));
-        PyDict_SetItemString(self->params,"cyl_phi",Py_BuildValue("d",1.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CCylinderModel_members[] = {
-    {"params", T_OBJECT, offsetof(CCylinderModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CCylinderModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CCylinderModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CCylinderModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") );
-    self->model_pars.cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-    self->model_pars.cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCylinderModelError, 
-	    	"CCylinderModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CCylinderModelError, 
-	    		"CCylinderModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CCylinderModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",cylinder_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CCylinderModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",cylinder_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CCylinderModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") );
-    self->model_pars.cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-    self->model_pars.cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCylinderModelError, 
-	    	"CCylinderModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CCylinderModelError, 
-	    		"CCylinderModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CCylinderModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",cylinder_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CCylinderModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",cylinder_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CCylinderModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CCylinderModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CCylinderModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CCylinderModel",             /*tp_name*/
-    sizeof(CCylinderModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CCylinderModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CCylinderModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CCylinderModel_methods,             /* tp_methods */
-    CCylinderModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CCylinderModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CCylinderModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCCylinderModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CCylinderModelType) < 0)
-        return;
-
-    Py_INCREF(&CCylinderModelType);
-    PyModule_AddObject(module, "CCylinderModel", (PyObject *)&CCylinderModelType);
-    
-    d = PyModule_GetDict(module);
-    CCylinderModelError = PyErr_NewException("CCylinderModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CCylinderModelError", CCylinderModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CDiamCylFunc.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CDiamCylFunc.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,287 +1,0 @@
-/** CDiamCylFunc
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY DiamCyl.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "DiamCyl.h"
-
-/// Error object for raised exceptions
-static PyObject * CDiamCylFuncError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	DiamCyldParameters model_pars;
-} CDiamCylFunc;
-
-
-static void
-CDiamCylFunc_dealloc(CDiamCylFunc* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CDiamCylFunc_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CDiamCylFunc *self;
-    
-    self = (CDiamCylFunc *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CDiamCylFunc_init(CDiamCylFunc *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"length",Py_BuildValue("d",400.000000));
-        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",20.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CDiamCylFunc_members[] = {
-    {"params", T_OBJECT, offsetof(CDiamCylFunc, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CDiamCylFunc, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CDiamCylFunc_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CDiamCylFunc *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CDiamCylFuncError, 
-	    	"CDiamCylFunc.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CDiamCylFuncError, 
-	    		"CDiamCylFunc.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CDiamCylFunc_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CDiamCylFunc_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",DiamCyl_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CDiamCylFunc_readDouble(pars);		
-		
-		return Py_BuildValue("d",DiamCyl_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CDiamCylFunc *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CDiamCylFuncError, 
-	    	"CDiamCylFunc.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CDiamCylFuncError, 
-	    		"CDiamCylFunc.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CDiamCylFunc_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CDiamCylFunc_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",DiamCyl_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CDiamCylFunc_readDouble(pars);		
-		
-		return Py_BuildValue("d",DiamCyl_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CDiamCylFunc *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CDiamCylFunc_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CDiamCylFuncType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CDiamCylFunc",             /*tp_name*/
-    sizeof(CDiamCylFunc),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CDiamCylFunc_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CDiamCylFunc objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CDiamCylFunc_methods,             /* tp_methods */
-    CDiamCylFunc_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CDiamCylFunc_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CDiamCylFunc_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCDiamCylFunc(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CDiamCylFuncType) < 0)
-        return;
-
-    Py_INCREF(&CDiamCylFuncType);
-    PyModule_AddObject(module, "CDiamCylFunc", (PyObject *)&CDiamCylFuncType);
-    
-    d = PyModule_GetDict(module);
-    CDiamCylFuncError = PyErr_NewException("CDiamCylFunc.error", NULL, NULL);
-    PyDict_SetItemString(d, "CDiamCylFuncError", CDiamCylFuncError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CDiamEllip.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CDiamEllip.c	(revision fccfd9001281f0bd9c8235a3620f686039c2196d)
+++ 	(revision )
@@ -1,287 +1,0 @@
-/** CDiamEllip
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY C:\ECLPS\workspace\trunk\sansmodels\src\sans\models\c_extensions\DiamEllip.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "C:\ECLPS\workspace\trunk\sansmodels\src\sans\models\c_extensions\DiamEllip.h"
-
-/// Error object for raised exceptions
-static PyObject * CDiamEllipError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	DiamEllipParameters model_pars;
-} CDiamEllip;
-
-
-static void
-CDiamEllip_dealloc(CDiamEllip* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CDiamEllip_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CDiamEllip *self;
-    
-    self = (CDiamEllip *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CDiamEllip_init(CDiamEllip *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"radius_b",Py_BuildValue("d",400.000000));
-        PyDict_SetItemString(self->params,"radius_a",Py_BuildValue("d",20.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CDiamEllip_members[] = {
-    {"params", T_OBJECT, offsetof(CDiamEllip, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CDiamEllip, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CDiamEllip_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CDiamEllip *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.radius_b = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_b") );
-    self->model_pars.radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CDiamEllipError, 
-	    	"CDiamEllip.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CDiamEllipError, 
-	    		"CDiamEllip.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CDiamEllip_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CDiamEllip_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",C:\ECLPS\workspace\trunk\sansmodels\src\sans\models\c_extensions\DiamEllip_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CDiamEllip_readDouble(pars);		
-		
-		return Py_BuildValue("d",C:\ECLPS\workspace\trunk\sansmodels\src\sans\models\c_extensions\DiamEllip_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CDiamEllip *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.radius_b = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_b") );
-    self->model_pars.radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CDiamEllipError, 
-	    	"CDiamEllip.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CDiamEllipError, 
-	    		"CDiamEllip.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CDiamEllip_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CDiamEllip_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",C:\ECLPS\workspace\trunk\sansmodels\src\sans\models\c_extensions\DiamEllip_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CDiamEllip_readDouble(pars);		
-		
-		return Py_BuildValue("d",C:\ECLPS\workspace\trunk\sansmodels\src\sans\models\c_extensions\DiamEllip_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CDiamEllip *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CDiamEllip_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CDiamEllipType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CDiamEllip",             /*tp_name*/
-    sizeof(CDiamEllip),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CDiamEllip_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CDiamEllip objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CDiamEllip_methods,             /* tp_methods */
-    CDiamEllip_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CDiamEllip_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CDiamEllip_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCDiamEllip(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CDiamEllipType) < 0)
-        return;
-
-    Py_INCREF(&CDiamEllipType);
-    PyModule_AddObject(module, "CDiamEllip", (PyObject *)&CDiamEllipType);
-    
-    d = PyModule_GetDict(module);
-    CDiamEllipError = PyErr_NewException("CDiamEllip.error", NULL, NULL);
-    PyDict_SetItemString(d, "CDiamEllipError", CDiamEllipError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CDiamEllipFunc.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CDiamEllipFunc.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,287 +1,0 @@
-/** CDiamEllipFunc
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY DiamEllip.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "DiamEllip.h"
-
-/// Error object for raised exceptions
-static PyObject * CDiamEllipFuncError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	DiamEllipsParameters model_pars;
-} CDiamEllipFunc;
-
-
-static void
-CDiamEllipFunc_dealloc(CDiamEllipFunc* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CDiamEllipFunc_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CDiamEllipFunc *self;
-    
-    self = (CDiamEllipFunc *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CDiamEllipFunc_init(CDiamEllipFunc *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"radius_b",Py_BuildValue("d",400.000000));
-        PyDict_SetItemString(self->params,"radius_a",Py_BuildValue("d",20.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CDiamEllipFunc_members[] = {
-    {"params", T_OBJECT, offsetof(CDiamEllipFunc, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CDiamEllipFunc, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CDiamEllipFunc_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CDiamEllipFunc *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.radius_b = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_b") );
-    self->model_pars.radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CDiamEllipFuncError, 
-	    	"CDiamEllipFunc.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CDiamEllipFuncError, 
-	    		"CDiamEllipFunc.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CDiamEllipFunc_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CDiamEllipFunc_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",DiamEllip_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CDiamEllipFunc_readDouble(pars);		
-		
-		return Py_BuildValue("d",DiamEllip_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CDiamEllipFunc *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.radius_b = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_b") );
-    self->model_pars.radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CDiamEllipFuncError, 
-	    	"CDiamEllipFunc.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CDiamEllipFuncError, 
-	    		"CDiamEllipFunc.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CDiamEllipFunc_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CDiamEllipFunc_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",DiamEllip_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CDiamEllipFunc_readDouble(pars);		
-		
-		return Py_BuildValue("d",DiamEllip_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CDiamEllipFunc *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CDiamEllipFunc_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CDiamEllipFuncType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CDiamEllipFunc",             /*tp_name*/
-    sizeof(CDiamEllipFunc),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CDiamEllipFunc_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CDiamEllipFunc objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CDiamEllipFunc_methods,             /* tp_methods */
-    CDiamEllipFunc_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CDiamEllipFunc_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CDiamEllipFunc_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCDiamEllipFunc(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CDiamEllipFuncType) < 0)
-        return;
-
-    Py_INCREF(&CDiamEllipFuncType);
-    PyModule_AddObject(module, "CDiamEllipFunc", (PyObject *)&CDiamEllipFuncType);
-    
-    d = PyModule_GetDict(module);
-    CDiamEllipFuncError = PyErr_NewException("CDiamEllipFunc.error", NULL, NULL);
-    PyDict_SetItemString(d, "CDiamEllipFuncError", CDiamEllipFuncError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CEllipsoidModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CEllipsoidModel.c	(revision a8d6888a4aca60748f072915b7116a8daf50636b)
+++ 	(revision )
@@ -1,302 +1,0 @@
-/** CEllipsoidModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY ellipsoid.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "ellipsoid.h"
-
-/// Error object for raised exceptions
-static PyObject * CEllipsoidModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	EllipsoidParameters model_pars;
-} CEllipsoidModel;
-
-
-static void
-CEllipsoidModel_dealloc(CEllipsoidModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CEllipsoidModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CEllipsoidModel *self;
-    
-    self = (CEllipsoidModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CEllipsoidModel_init(CEllipsoidModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",1.570000));
-        PyDict_SetItemString(self->params,"radius_b",Py_BuildValue("d",400.000000));
-        PyDict_SetItemString(self->params,"radius_a",Py_BuildValue("d",20.000000));
-        PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000003));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CEllipsoidModel_members[] = {
-    {"params", T_OBJECT, offsetof(CEllipsoidModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CEllipsoidModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CEllipsoidModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CEllipsoidModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );
-    self->model_pars.radius_b = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_b") );
-    self->model_pars.radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") );
-    self->model_pars.axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CEllipsoidModelError, 
-	    	"CEllipsoidModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CEllipsoidModelError, 
-	    		"CEllipsoidModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CEllipsoidModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CEllipsoidModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",ellipsoid_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CEllipsoidModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",ellipsoid_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CEllipsoidModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );
-    self->model_pars.radius_b = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_b") );
-    self->model_pars.radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") );
-    self->model_pars.axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CEllipsoidModelError, 
-	    	"CEllipsoidModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CEllipsoidModelError, 
-	    		"CEllipsoidModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CEllipsoidModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CEllipsoidModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",ellipsoid_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CEllipsoidModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",ellipsoid_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CEllipsoidModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CEllipsoidModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CEllipsoidModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CEllipsoidModel",             /*tp_name*/
-    sizeof(CEllipsoidModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CEllipsoidModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CEllipsoidModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CEllipsoidModel_methods,             /* tp_methods */
-    CEllipsoidModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CEllipsoidModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CEllipsoidModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCEllipsoidModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CEllipsoidModelType) < 0)
-        return;
-
-    Py_INCREF(&CEllipsoidModelType);
-    PyModule_AddObject(module, "CEllipsoidModel", (PyObject *)&CEllipsoidModelType);
-    
-    d = PyModule_GetDict(module);
-    CEllipsoidModelError = PyErr_NewException("CEllipsoidModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CEllipsoidModelError", CEllipsoidModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CEllipticalCylinderModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CEllipticalCylinderModel.c	(revision a8d6888a4aca60748f072915b7116a8daf50636b)
+++ 	(revision )
@@ -1,308 +1,0 @@
-/** CEllipticalCylinderModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY elliptical_cylinder.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "elliptical_cylinder.h"
-
-/// Error object for raised exceptions
-static PyObject * CEllipticalCylinderModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	EllipticalCylinderParameters model_pars;
-} CEllipticalCylinderModel;
-
-
-static void
-CEllipticalCylinderModel_dealloc(CEllipticalCylinderModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CEllipticalCylinderModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CEllipticalCylinderModel *self;
-    
-    self = (CEllipticalCylinderModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CEllipticalCylinderModel_init(CEllipticalCylinderModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"cyl_psi",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"length",Py_BuildValue("d",400.000000));
-        PyDict_SetItemString(self->params,"r_minor",Py_BuildValue("d",20.000000));
-        PyDict_SetItemString(self->params,"cyl_theta",Py_BuildValue("d",1.570000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"r_ratio",Py_BuildValue("d",1.500000));
-        PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000003));
-        PyDict_SetItemString(self->params,"cyl_phi",Py_BuildValue("d",0.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CEllipticalCylinderModel_members[] = {
-    {"params", T_OBJECT, offsetof(CEllipticalCylinderModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CEllipticalCylinderModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CEllipticalCylinderModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CEllipticalCylinderModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.cyl_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_psi") );
-    self->model_pars.length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") );
-    self->model_pars.r_minor = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_minor") );
-    self->model_pars.cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.r_ratio = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_ratio") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-    self->model_pars.cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CEllipticalCylinderModelError, 
-	    	"CEllipticalCylinderModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CEllipticalCylinderModelError, 
-	    		"CEllipticalCylinderModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CEllipticalCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CEllipticalCylinderModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",elliptical_cylinder_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CEllipticalCylinderModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",elliptical_cylinder_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CEllipticalCylinderModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.cyl_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_psi") );
-    self->model_pars.length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") );
-    self->model_pars.r_minor = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_minor") );
-    self->model_pars.cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.r_ratio = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_ratio") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-    self->model_pars.cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CEllipticalCylinderModelError, 
-	    	"CEllipticalCylinderModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CEllipticalCylinderModelError, 
-	    		"CEllipticalCylinderModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CEllipticalCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CEllipticalCylinderModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",elliptical_cylinder_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CEllipticalCylinderModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",elliptical_cylinder_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CEllipticalCylinderModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CEllipticalCylinderModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CEllipticalCylinderModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CEllipticalCylinderModel",             /*tp_name*/
-    sizeof(CEllipticalCylinderModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CEllipticalCylinderModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CEllipticalCylinderModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CEllipticalCylinderModel_methods,             /* tp_methods */
-    CEllipticalCylinderModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CEllipticalCylinderModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CEllipticalCylinderModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCEllipticalCylinderModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CEllipticalCylinderModelType) < 0)
-        return;
-
-    Py_INCREF(&CEllipticalCylinderModelType);
-    PyModule_AddObject(module, "CEllipticalCylinderModel", (PyObject *)&CEllipticalCylinderModelType);
-    
-    d = PyModule_GetDict(module);
-    CEllipticalCylinderModelError = PyErr_NewException("CEllipticalCylinderModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CEllipticalCylinderModelError", CEllipticalCylinderModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CFlexibleCylinderModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CFlexibleCylinderModel.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,299 +1,0 @@
-/** CFlexibleCylinderModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY flexible_cylinder.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "flexible_cylinder.h"
-
-/// Error object for raised exceptions
-static PyObject * CFlexibleCylinderModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	FlexibleCylinderParameters model_pars;
-} CFlexibleCylinderModel;
-
-
-static void
-CFlexibleCylinderModel_dealloc(CFlexibleCylinderModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CFlexibleCylinderModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CFlexibleCylinderModel *self;
-    
-    self = (CFlexibleCylinderModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CFlexibleCylinderModel_init(CFlexibleCylinderModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"length",Py_BuildValue("d",1000.000000));
-        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",20.000000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000100));
-        PyDict_SetItemString(self->params,"kuhn_length",Py_BuildValue("d",100.000000));
-        PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000005));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CFlexibleCylinderModel_members[] = {
-    {"params", T_OBJECT, offsetof(CFlexibleCylinderModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CFlexibleCylinderModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CFlexibleCylinderModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CFlexibleCylinderModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.kuhn_length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "kuhn_length") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CFlexibleCylinderModelError, 
-	    	"CFlexibleCylinderModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CFlexibleCylinderModelError, 
-	    		"CFlexibleCylinderModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CFlexibleCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CFlexibleCylinderModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",flexible_cylinder_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CFlexibleCylinderModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",flexible_cylinder_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CFlexibleCylinderModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.kuhn_length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "kuhn_length") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CFlexibleCylinderModelError, 
-	    	"CFlexibleCylinderModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CFlexibleCylinderModelError, 
-	    		"CFlexibleCylinderModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CFlexibleCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CFlexibleCylinderModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",flexible_cylinder_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CFlexibleCylinderModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",flexible_cylinder_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CFlexibleCylinderModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CFlexibleCylinderModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CFlexibleCylinderModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CFlexibleCylinderModel",             /*tp_name*/
-    sizeof(CFlexibleCylinderModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CFlexibleCylinderModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CFlexibleCylinderModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CFlexibleCylinderModel_methods,             /* tp_methods */
-    CFlexibleCylinderModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CFlexibleCylinderModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CFlexibleCylinderModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCFlexibleCylinderModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CFlexibleCylinderModelType) < 0)
-        return;
-
-    Py_INCREF(&CFlexibleCylinderModelType);
-    PyModule_AddObject(module, "CFlexibleCylinderModel", (PyObject *)&CFlexibleCylinderModelType);
-    
-    d = PyModule_GetDict(module);
-    CFlexibleCylinderModelError = PyErr_NewException("CFlexibleCylinderModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CFlexibleCylinderModelError", CFlexibleCylinderModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CHardsphereStructure.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CHardsphereStructure.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,287 +1,0 @@
-/** CHardsphereStructure
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY Hardsphere.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "Hardsphere.h"
-
-/// Error object for raised exceptions
-static PyObject * CHardsphereStructureError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	HardsphereParameters model_pars;
-} CHardsphereStructure;
-
-
-static void
-CHardsphereStructure_dealloc(CHardsphereStructure* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CHardsphereStructure_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CHardsphereStructure *self;
-    
-    self = (CHardsphereStructure *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CHardsphereStructure_init(CHardsphereStructure *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",50.000000));
-        PyDict_SetItemString(self->params,"volfraction",Py_BuildValue("d",0.200000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CHardsphereStructure_members[] = {
-    {"params", T_OBJECT, offsetof(CHardsphereStructure, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CHardsphereStructure, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CHardsphereStructure_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CHardsphereStructure *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CHardsphereStructureError, 
-	    	"CHardsphereStructure.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CHardsphereStructureError, 
-	    		"CHardsphereStructure.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CHardsphereStructure_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CHardsphereStructure_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",Hardsphere_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CHardsphereStructure_readDouble(pars);		
-		
-		return Py_BuildValue("d",Hardsphere_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CHardsphereStructure *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CHardsphereStructureError, 
-	    	"CHardsphereStructure.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CHardsphereStructureError, 
-	    		"CHardsphereStructure.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CHardsphereStructure_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CHardsphereStructure_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",Hardsphere_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CHardsphereStructure_readDouble(pars);		
-		
-		return Py_BuildValue("d",Hardsphere_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CHardsphereStructure *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CHardsphereStructure_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CHardsphereStructureType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CHardsphereStructure",             /*tp_name*/
-    sizeof(CHardsphereStructure),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CHardsphereStructure_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CHardsphereStructure objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CHardsphereStructure_methods,             /* tp_methods */
-    CHardsphereStructure_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CHardsphereStructure_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CHardsphereStructure_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCHardsphereStructure(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CHardsphereStructureType) < 0)
-        return;
-
-    Py_INCREF(&CHardsphereStructureType);
-    PyModule_AddObject(module, "CHardsphereStructure", (PyObject *)&CHardsphereStructureType);
-    
-    d = PyModule_GetDict(module);
-    CHardsphereStructureError = PyErr_NewException("CHardsphereStructure.error", NULL, NULL);
-    PyDict_SetItemString(d, "CHardsphereStructureError", CHardsphereStructureError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CHayterMSAStructure.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CHayterMSAStructure.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,299 +1,0 @@
-/** CHayterMSAStructure
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY HayterMSA.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "HayterMSA.h"
-
-/// Error object for raised exceptions
-static PyObject * CHayterMSAStructureError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	HayterMSAParameters model_pars;
-} CHayterMSAStructure;
-
-
-static void
-CHayterMSAStructure_dealloc(CHayterMSAStructure* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CHayterMSAStructure_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CHayterMSAStructure *self;
-    
-    self = (CHayterMSAStructure *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CHayterMSAStructure_init(CHayterMSAStructure *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"temperature",Py_BuildValue("d",318.160000));
-        PyDict_SetItemString(self->params,"saltconc",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"dielectconst",Py_BuildValue("d",71.080000));
-        PyDict_SetItemString(self->params,"volfraction",Py_BuildValue("d",0.019200));
-        PyDict_SetItemString(self->params,"charge",Py_BuildValue("d",19.000000));
-        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",20.750000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CHayterMSAStructure_members[] = {
-    {"params", T_OBJECT, offsetof(CHayterMSAStructure, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CHayterMSAStructure, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CHayterMSAStructure_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CHayterMSAStructure *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.temperature = PyFloat_AsDouble( PyDict_GetItemString(self->params, "temperature") );
-    self->model_pars.saltconc = PyFloat_AsDouble( PyDict_GetItemString(self->params, "saltconc") );
-    self->model_pars.dielectconst = PyFloat_AsDouble( PyDict_GetItemString(self->params, "dielectconst") );
-    self->model_pars.volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
-    self->model_pars.charge = PyFloat_AsDouble( PyDict_GetItemString(self->params, "charge") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CHayterMSAStructureError, 
-	    	"CHayterMSAStructure.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CHayterMSAStructureError, 
-	    		"CHayterMSAStructure.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CHayterMSAStructure_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CHayterMSAStructure_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",HayterMSA_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CHayterMSAStructure_readDouble(pars);		
-		
-		return Py_BuildValue("d",HayterMSA_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CHayterMSAStructure *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.temperature = PyFloat_AsDouble( PyDict_GetItemString(self->params, "temperature") );
-    self->model_pars.saltconc = PyFloat_AsDouble( PyDict_GetItemString(self->params, "saltconc") );
-    self->model_pars.dielectconst = PyFloat_AsDouble( PyDict_GetItemString(self->params, "dielectconst") );
-    self->model_pars.volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
-    self->model_pars.charge = PyFloat_AsDouble( PyDict_GetItemString(self->params, "charge") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CHayterMSAStructureError, 
-	    	"CHayterMSAStructure.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CHayterMSAStructureError, 
-	    		"CHayterMSAStructure.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CHayterMSAStructure_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CHayterMSAStructure_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",HayterMSA_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CHayterMSAStructure_readDouble(pars);		
-		
-		return Py_BuildValue("d",HayterMSA_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CHayterMSAStructure *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CHayterMSAStructure_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CHayterMSAStructureType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CHayterMSAStructure",             /*tp_name*/
-    sizeof(CHayterMSAStructure),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CHayterMSAStructure_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CHayterMSAStructure objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CHayterMSAStructure_methods,             /* tp_methods */
-    CHayterMSAStructure_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CHayterMSAStructure_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CHayterMSAStructure_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCHayterMSAStructure(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CHayterMSAStructureType) < 0)
-        return;
-
-    Py_INCREF(&CHayterMSAStructureType);
-    PyModule_AddObject(module, "CHayterMSAStructure", (PyObject *)&CHayterMSAStructureType);
-    
-    d = PyModule_GetDict(module);
-    CHayterMSAStructureError = PyErr_NewException("CHayterMSAStructure.error", NULL, NULL);
-    PyDict_SetItemString(d, "CHayterMSAStructureError", CHayterMSAStructureError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CHollowCylinderModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CHollowCylinderModel.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,305 +1,0 @@
-/** CHollowCylinderModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY hollow_cylinder.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "hollow_cylinder.h"
-
-/// Error object for raised exceptions
-static PyObject * CHollowCylinderModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	HollowCylinderParameters model_pars;
-} CHollowCylinderModel;
-
-
-static void
-CHollowCylinderModel_dealloc(CHollowCylinderModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CHollowCylinderModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CHollowCylinderModel *self;
-    
-    self = (CHollowCylinderModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CHollowCylinderModel_init(CHollowCylinderModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"core_radius",Py_BuildValue("d",20.000000));
-        PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",1.570000));
-        PyDict_SetItemString(self->params,"length",Py_BuildValue("d",400.000000));
-        PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.010000));
-        PyDict_SetItemString(self->params,"shell_radius",Py_BuildValue("d",30.000000));
-        PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000005));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CHollowCylinderModel_members[] = {
-    {"params", T_OBJECT, offsetof(CHollowCylinderModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CHollowCylinderModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CHollowCylinderModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CHollowCylinderModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.core_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_radius") );
-    self->model_pars.axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );
-    self->model_pars.length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") );
-    self->model_pars.axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.shell_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "shell_radius") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CHollowCylinderModelError, 
-	    	"CHollowCylinderModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CHollowCylinderModelError, 
-	    		"CHollowCylinderModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CHollowCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CHollowCylinderModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",hollow_cylinder_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CHollowCylinderModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",hollow_cylinder_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CHollowCylinderModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.core_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_radius") );
-    self->model_pars.axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );
-    self->model_pars.length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") );
-    self->model_pars.axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.shell_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "shell_radius") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CHollowCylinderModelError, 
-	    	"CHollowCylinderModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CHollowCylinderModelError, 
-	    		"CHollowCylinderModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CHollowCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CHollowCylinderModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",hollow_cylinder_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CHollowCylinderModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",hollow_cylinder_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CHollowCylinderModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CHollowCylinderModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CHollowCylinderModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CHollowCylinderModel",             /*tp_name*/
-    sizeof(CHollowCylinderModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CHollowCylinderModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CHollowCylinderModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CHollowCylinderModel_methods,             /* tp_methods */
-    CHollowCylinderModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CHollowCylinderModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CHollowCylinderModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCHollowCylinderModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CHollowCylinderModelType) < 0)
-        return;
-
-    Py_INCREF(&CHollowCylinderModelType);
-    PyModule_AddObject(module, "CHollowCylinderModel", (PyObject *)&CHollowCylinderModelType);
-    
-    d = PyModule_GetDict(module);
-    CHollowCylinderModelError = PyErr_NewException("CHollowCylinderModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CHollowCylinderModelError", CHollowCylinderModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CLamellarFFHGModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CLamellarFFHGModel.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,302 +1,0 @@
-/** CLamellarFFHGModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY lamellarFF_HG.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "lamellarFF_HG.h"
-
-/// Error object for raised exceptions
-static PyObject * CLamellarFFHGModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	LamellarFF_HGParameters model_pars;
-} CLamellarFFHGModel;
-
-
-static void
-CLamellarFFHGModel_dealloc(CLamellarFFHGModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CLamellarFFHGModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CLamellarFFHGModel *self;
-    
-    self = (CLamellarFFHGModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CLamellarFFHGModel_init(CLamellarFFHGModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"h_thickness",Py_BuildValue("d",10.000000));
-        PyDict_SetItemString(self->params,"sld_tail",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"sld_solvent",Py_BuildValue("d",0.000006));
-        PyDict_SetItemString(self->params,"t_length",Py_BuildValue("d",15.000000));
-        PyDict_SetItemString(self->params,"sld_head",Py_BuildValue("d",0.000003));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CLamellarFFHGModel_members[] = {
-    {"params", T_OBJECT, offsetof(CLamellarFFHGModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CLamellarFFHGModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CLamellarFFHGModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CLamellarFFHGModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.h_thickness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "h_thickness") );
-    self->model_pars.sld_tail = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_tail") );
-    self->model_pars.sld_solvent = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_solvent") );
-    self->model_pars.t_length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "t_length") );
-    self->model_pars.sld_head = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_head") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CLamellarFFHGModelError, 
-	    	"CLamellarFFHGModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CLamellarFFHGModelError, 
-	    		"CLamellarFFHGModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CLamellarFFHGModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CLamellarFFHGModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",lamellarFF_HG_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CLamellarFFHGModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",lamellarFF_HG_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CLamellarFFHGModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.h_thickness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "h_thickness") );
-    self->model_pars.sld_tail = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_tail") );
-    self->model_pars.sld_solvent = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_solvent") );
-    self->model_pars.t_length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "t_length") );
-    self->model_pars.sld_head = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_head") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CLamellarFFHGModelError, 
-	    	"CLamellarFFHGModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CLamellarFFHGModelError, 
-	    		"CLamellarFFHGModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CLamellarFFHGModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CLamellarFFHGModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",lamellarFF_HG_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CLamellarFFHGModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",lamellarFF_HG_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CLamellarFFHGModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CLamellarFFHGModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CLamellarFFHGModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CLamellarFFHGModel",             /*tp_name*/
-    sizeof(CLamellarFFHGModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CLamellarFFHGModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CLamellarFFHGModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CLamellarFFHGModel_methods,             /* tp_methods */
-    CLamellarFFHGModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CLamellarFFHGModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CLamellarFFHGModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCLamellarFFHGModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CLamellarFFHGModelType) < 0)
-        return;
-
-    Py_INCREF(&CLamellarFFHGModelType);
-    PyModule_AddObject(module, "CLamellarFFHGModel", (PyObject *)&CLamellarFFHGModelType);
-    
-    d = PyModule_GetDict(module);
-    CLamellarFFHGModelError = PyErr_NewException("CLamellarFFHGModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CLamellarFFHGModelError", CLamellarFFHGModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CLamellarModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CLamellarModel.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,296 +1,0 @@
-/** CLamellarModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY lamellar.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "lamellar.h"
-
-/// Error object for raised exceptions
-static PyObject * CLamellarModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	LamellarParameters model_pars;
-} CLamellarModel;
-
-
-static void
-CLamellarModel_dealloc(CLamellarModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CLamellarModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CLamellarModel *self;
-    
-    self = (CLamellarModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CLamellarModel_init(CLamellarModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"sld_sol",Py_BuildValue("d",0.000006));
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"bi_thick",Py_BuildValue("d",50.000000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"sld_bi",Py_BuildValue("d",0.000001));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CLamellarModel_members[] = {
-    {"params", T_OBJECT, offsetof(CLamellarModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CLamellarModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CLamellarModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CLamellarModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.sld_sol = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_sol") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.bi_thick = PyFloat_AsDouble( PyDict_GetItemString(self->params, "bi_thick") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.sld_bi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_bi") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CLamellarModelError, 
-	    	"CLamellarModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CLamellarModelError, 
-	    		"CLamellarModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CLamellarModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CLamellarModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",lamellar_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CLamellarModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",lamellar_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CLamellarModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.sld_sol = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_sol") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.bi_thick = PyFloat_AsDouble( PyDict_GetItemString(self->params, "bi_thick") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.sld_bi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_bi") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CLamellarModelError, 
-	    	"CLamellarModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CLamellarModelError, 
-	    		"CLamellarModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CLamellarModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CLamellarModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",lamellar_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CLamellarModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",lamellar_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CLamellarModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CLamellarModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CLamellarModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CLamellarModel",             /*tp_name*/
-    sizeof(CLamellarModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CLamellarModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CLamellarModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CLamellarModel_methods,             /* tp_methods */
-    CLamellarModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CLamellarModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CLamellarModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCLamellarModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CLamellarModelType) < 0)
-        return;
-
-    Py_INCREF(&CLamellarModelType);
-    PyModule_AddObject(module, "CLamellarModel", (PyObject *)&CLamellarModelType);
-    
-    d = PyModule_GetDict(module);
-    CLamellarModelError = PyErr_NewException("CLamellarModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CLamellarModelError", CLamellarModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CLamellarPSHGModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CLamellarPSHGModel.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,311 +1,0 @@
-/** CLamellarPSHGModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY lamellarPS_HG.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "lamellarPS_HG.h"
-
-/// Error object for raised exceptions
-static PyObject * CLamellarPSHGModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	LamellarPSHGParameters model_pars;
-} CLamellarPSHGModel;
-
-
-static void
-CLamellarPSHGModel_dealloc(CLamellarPSHGModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CLamellarPSHGModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CLamellarPSHGModel *self;
-    
-    self = (CLamellarPSHGModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CLamellarPSHGModel_init(CLamellarPSHGModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"n_plates",Py_BuildValue("d",30.000000));
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"deltaT",Py_BuildValue("d",10.000000));
-        PyDict_SetItemString(self->params,"spacing",Py_BuildValue("d",40.000000));
-        PyDict_SetItemString(self->params,"sld_tail",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"sld_solvent",Py_BuildValue("d",0.000006));
-        PyDict_SetItemString(self->params,"caille",Py_BuildValue("d",0.001000));
-        PyDict_SetItemString(self->params,"sld_head",Py_BuildValue("d",0.000002));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.001000));
-        PyDict_SetItemString(self->params,"deltaH",Py_BuildValue("d",2.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CLamellarPSHGModel_members[] = {
-    {"params", T_OBJECT, offsetof(CLamellarPSHGModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CLamellarPSHGModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CLamellarPSHGModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CLamellarPSHGModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.n_plates = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_plates") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.deltaT = PyFloat_AsDouble( PyDict_GetItemString(self->params, "deltaT") );
-    self->model_pars.spacing = PyFloat_AsDouble( PyDict_GetItemString(self->params, "spacing") );
-    self->model_pars.sld_tail = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_tail") );
-    self->model_pars.sld_solvent = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_solvent") );
-    self->model_pars.caille = PyFloat_AsDouble( PyDict_GetItemString(self->params, "caille") );
-    self->model_pars.sld_head = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_head") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.deltaH = PyFloat_AsDouble( PyDict_GetItemString(self->params, "deltaH") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CLamellarPSHGModelError, 
-	    	"CLamellarPSHGModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CLamellarPSHGModelError, 
-	    		"CLamellarPSHGModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CLamellarPSHGModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CLamellarPSHGModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",lamellarPS_HG_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CLamellarPSHGModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",lamellarPS_HG_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CLamellarPSHGModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.n_plates = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_plates") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.deltaT = PyFloat_AsDouble( PyDict_GetItemString(self->params, "deltaT") );
-    self->model_pars.spacing = PyFloat_AsDouble( PyDict_GetItemString(self->params, "spacing") );
-    self->model_pars.sld_tail = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_tail") );
-    self->model_pars.sld_solvent = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_solvent") );
-    self->model_pars.caille = PyFloat_AsDouble( PyDict_GetItemString(self->params, "caille") );
-    self->model_pars.sld_head = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_head") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.deltaH = PyFloat_AsDouble( PyDict_GetItemString(self->params, "deltaH") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CLamellarPSHGModelError, 
-	    	"CLamellarPSHGModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CLamellarPSHGModelError, 
-	    		"CLamellarPSHGModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CLamellarPSHGModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CLamellarPSHGModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",lamellarPS_HG_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CLamellarPSHGModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",lamellarPS_HG_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CLamellarPSHGModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CLamellarPSHGModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CLamellarPSHGModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CLamellarPSHGModel",             /*tp_name*/
-    sizeof(CLamellarPSHGModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CLamellarPSHGModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CLamellarPSHGModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CLamellarPSHGModel_methods,             /* tp_methods */
-    CLamellarPSHGModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CLamellarPSHGModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CLamellarPSHGModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCLamellarPSHGModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CLamellarPSHGModelType) < 0)
-        return;
-
-    Py_INCREF(&CLamellarPSHGModelType);
-    PyModule_AddObject(module, "CLamellarPSHGModel", (PyObject *)&CLamellarPSHGModelType);
-    
-    d = PyModule_GetDict(module);
-    CLamellarPSHGModelError = PyErr_NewException("CLamellarPSHGModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CLamellarPSHGModelError", CLamellarPSHGModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CLamellarPSModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CLamellarPSModel.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,302 +1,0 @@
-/** CLamellarPSModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY lamellarPS.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "lamellarPS.h"
-
-/// Error object for raised exceptions
-static PyObject * CLamellarPSModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	LamellarPSParameters model_pars;
-} CLamellarPSModel;
-
-
-static void
-CLamellarPSModel_dealloc(CLamellarPSModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CLamellarPSModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CLamellarPSModel *self;
-    
-    self = (CLamellarPSModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CLamellarPSModel_init(CLamellarPSModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"n_plates",Py_BuildValue("d",20.000000));
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"spacing",Py_BuildValue("d",400.000000));
-        PyDict_SetItemString(self->params,"caille",Py_BuildValue("d",0.100000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"delta",Py_BuildValue("d",30.000000));
-        PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000005));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CLamellarPSModel_members[] = {
-    {"params", T_OBJECT, offsetof(CLamellarPSModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CLamellarPSModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CLamellarPSModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CLamellarPSModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.n_plates = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_plates") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.spacing = PyFloat_AsDouble( PyDict_GetItemString(self->params, "spacing") );
-    self->model_pars.caille = PyFloat_AsDouble( PyDict_GetItemString(self->params, "caille") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CLamellarPSModelError, 
-	    	"CLamellarPSModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CLamellarPSModelError, 
-	    		"CLamellarPSModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CLamellarPSModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CLamellarPSModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",lamellarPS_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CLamellarPSModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",lamellarPS_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CLamellarPSModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.n_plates = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_plates") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.spacing = PyFloat_AsDouble( PyDict_GetItemString(self->params, "spacing") );
-    self->model_pars.caille = PyFloat_AsDouble( PyDict_GetItemString(self->params, "caille") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CLamellarPSModelError, 
-	    	"CLamellarPSModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CLamellarPSModelError, 
-	    		"CLamellarPSModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CLamellarPSModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CLamellarPSModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",lamellarPS_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CLamellarPSModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",lamellarPS_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CLamellarPSModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CLamellarPSModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CLamellarPSModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CLamellarPSModel",             /*tp_name*/
-    sizeof(CLamellarPSModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CLamellarPSModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CLamellarPSModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CLamellarPSModel_methods,             /* tp_methods */
-    CLamellarPSModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CLamellarPSModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CLamellarPSModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCLamellarPSModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CLamellarPSModelType) < 0)
-        return;
-
-    Py_INCREF(&CLamellarPSModelType);
-    PyModule_AddObject(module, "CLamellarPSModel", (PyObject *)&CLamellarPSModelType);
-    
-    d = PyModule_GetDict(module);
-    CLamellarPSModelError = PyErr_NewException("CLamellarPSModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CLamellarPSModelError", CLamellarPSModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CParallelepipedModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CParallelepipedModel.c	(revision a8d6888a4aca60748f072915b7116a8daf50636b)
+++ 	(revision )
@@ -1,308 +1,0 @@
-/** CParallelepipedModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY parallelepiped.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "parallelepiped.h"
-
-/// Error object for raised exceptions
-static PyObject * CParallelepipedModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	ParallelepipedParameters model_pars;
-} CParallelepipedModel;
-
-
-static void
-CParallelepipedModel_dealloc(CParallelepipedModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CParallelepipedModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CParallelepipedModel *self;
-    
-    self = (CParallelepipedModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CParallelepipedModel_init(CParallelepipedModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"short_a",Py_BuildValue("d",35.000000));
-        PyDict_SetItemString(self->params,"short_b",Py_BuildValue("d",75.000000));
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"long_c",Py_BuildValue("d",400.000000));
-        PyDict_SetItemString(self->params,"parallel_psi",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"parallel_phi",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"parallel_theta",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000005));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CParallelepipedModel_members[] = {
-    {"params", T_OBJECT, offsetof(CParallelepipedModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CParallelepipedModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CParallelepipedModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CParallelepipedModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.short_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "short_a") );
-    self->model_pars.short_b = PyFloat_AsDouble( PyDict_GetItemString(self->params, "short_b") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.long_c = PyFloat_AsDouble( PyDict_GetItemString(self->params, "long_c") );
-    self->model_pars.parallel_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_psi") );
-    self->model_pars.parallel_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_phi") );
-    self->model_pars.parallel_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_theta") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CParallelepipedModelError, 
-	    	"CParallelepipedModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CParallelepipedModelError, 
-	    		"CParallelepipedModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CParallelepipedModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CParallelepipedModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",parallelepiped_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CParallelepipedModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",parallelepiped_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CParallelepipedModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.short_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "short_a") );
-    self->model_pars.short_b = PyFloat_AsDouble( PyDict_GetItemString(self->params, "short_b") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.long_c = PyFloat_AsDouble( PyDict_GetItemString(self->params, "long_c") );
-    self->model_pars.parallel_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_psi") );
-    self->model_pars.parallel_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_phi") );
-    self->model_pars.parallel_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_theta") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CParallelepipedModelError, 
-	    	"CParallelepipedModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CParallelepipedModelError, 
-	    		"CParallelepipedModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CParallelepipedModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CParallelepipedModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",parallelepiped_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CParallelepipedModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",parallelepiped_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CParallelepipedModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CParallelepipedModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CParallelepipedModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CParallelepipedModel",             /*tp_name*/
-    sizeof(CParallelepipedModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CParallelepipedModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CParallelepipedModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CParallelepipedModel_methods,             /* tp_methods */
-    CParallelepipedModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CParallelepipedModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CParallelepipedModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCParallelepipedModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CParallelepipedModelType) < 0)
-        return;
-
-    Py_INCREF(&CParallelepipedModelType);
-    PyModule_AddObject(module, "CParallelepipedModel", (PyObject *)&CParallelepipedModelType);
-    
-    d = PyModule_GetDict(module);
-    CParallelepipedModelError = PyErr_NewException("CParallelepipedModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CParallelepipedModelError", CParallelepipedModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CSphereModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CSphereModel.c	(revision a8d6888a4aca60748f072915b7116a8daf50636b)
+++ 	(revision )
@@ -1,293 +1,0 @@
-/** CSphereModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY sphere.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "sphere.h"
-
-/// Error object for raised exceptions
-static PyObject * CSphereModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	SphereParameters model_pars;
-} CSphereModel;
-
-
-static void
-CSphereModel_dealloc(CSphereModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CSphereModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CSphereModel *self;
-    
-    self = (CSphereModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CSphereModel_init(CSphereModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",60.000000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000001));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CSphereModel_members[] = {
-    {"params", T_OBJECT, offsetof(CSphereModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CSphereModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CSphereModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CSphereModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CSphereModelError, 
-	    	"CSphereModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CSphereModelError, 
-	    		"CSphereModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CSphereModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CSphereModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",sphere_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CSphereModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",sphere_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CSphereModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CSphereModelError, 
-	    	"CSphereModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CSphereModelError, 
-	    		"CSphereModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CSphereModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CSphereModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",sphere_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CSphereModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",sphere_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CSphereModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CSphereModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CSphereModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CSphereModel",             /*tp_name*/
-    sizeof(CSphereModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CSphereModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CSphereModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CSphereModel_methods,             /* tp_methods */
-    CSphereModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CSphereModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CSphereModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCSphereModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CSphereModelType) < 0)
-        return;
-
-    Py_INCREF(&CSphereModelType);
-    PyModule_AddObject(module, "CSphereModel", (PyObject *)&CSphereModelType);
-    
-    d = PyModule_GetDict(module);
-    CSphereModelError = PyErr_NewException("CSphereModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CSphereModelError", CSphereModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CSquareWellStructure.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CSquareWellStructure.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,293 +1,0 @@
-/** CSquareWellStructure
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY SquareWell.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "SquareWell.h"
-
-/// Error object for raised exceptions
-static PyObject * CSquareWellStructureError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	SquareWellParameters model_pars;
-} CSquareWellStructure;
-
-
-static void
-CSquareWellStructure_dealloc(CSquareWellStructure* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CSquareWellStructure_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CSquareWellStructure *self;
-    
-    self = (CSquareWellStructure *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CSquareWellStructure_init(CSquareWellStructure *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",50.000000));
-        PyDict_SetItemString(self->params,"welldepth",Py_BuildValue("d",1.500000));
-        PyDict_SetItemString(self->params,"volfraction",Py_BuildValue("d",0.040000));
-        PyDict_SetItemString(self->params,"wellwidth",Py_BuildValue("d",1.200000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CSquareWellStructure_members[] = {
-    {"params", T_OBJECT, offsetof(CSquareWellStructure, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CSquareWellStructure, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CSquareWellStructure_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CSquareWellStructure *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.welldepth = PyFloat_AsDouble( PyDict_GetItemString(self->params, "welldepth") );
-    self->model_pars.volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
-    self->model_pars.wellwidth = PyFloat_AsDouble( PyDict_GetItemString(self->params, "wellwidth") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CSquareWellStructureError, 
-	    	"CSquareWellStructure.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CSquareWellStructureError, 
-	    		"CSquareWellStructure.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CSquareWellStructure_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CSquareWellStructure_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",SquareWell_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CSquareWellStructure_readDouble(pars);		
-		
-		return Py_BuildValue("d",SquareWell_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CSquareWellStructure *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.welldepth = PyFloat_AsDouble( PyDict_GetItemString(self->params, "welldepth") );
-    self->model_pars.volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
-    self->model_pars.wellwidth = PyFloat_AsDouble( PyDict_GetItemString(self->params, "wellwidth") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CSquareWellStructureError, 
-	    	"CSquareWellStructure.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CSquareWellStructureError, 
-	    		"CSquareWellStructure.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CSquareWellStructure_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CSquareWellStructure_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",SquareWell_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CSquareWellStructure_readDouble(pars);		
-		
-		return Py_BuildValue("d",SquareWell_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CSquareWellStructure *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CSquareWellStructure_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CSquareWellStructureType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CSquareWellStructure",             /*tp_name*/
-    sizeof(CSquareWellStructure),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CSquareWellStructure_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CSquareWellStructure objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CSquareWellStructure_methods,             /* tp_methods */
-    CSquareWellStructure_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CSquareWellStructure_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CSquareWellStructure_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCSquareWellStructure(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CSquareWellStructureType) < 0)
-        return;
-
-    Py_INCREF(&CSquareWellStructureType);
-    PyModule_AddObject(module, "CSquareWellStructure", (PyObject *)&CSquareWellStructureType);
-    
-    d = PyModule_GetDict(module);
-    CSquareWellStructureError = PyErr_NewException("CSquareWellStructure.error", NULL, NULL);
-    PyDict_SetItemString(d, "CSquareWellStructureError", CSquareWellStructureError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CStackedDisksModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CStackedDisksModel.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,317 +1,0 @@
-/** CStackedDisksModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY stacked_disks.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "stacked_disks.h"
-
-/// Error object for raised exceptions
-static PyObject * CStackedDisksModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	StackedDisksParameters model_pars;
-} CStackedDisksModel;
-
-
-static void
-CStackedDisksModel_dealloc(CStackedDisksModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CStackedDisksModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CStackedDisksModel *self;
-    
-    self = (CStackedDisksModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CStackedDisksModel_init(CStackedDisksModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"core_sld",Py_BuildValue("d",0.000004));
-        PyDict_SetItemString(self->params,"core_thick",Py_BuildValue("d",10.000000));
-        PyDict_SetItemString(self->params,"layer_thick",Py_BuildValue("d",15.000000));
-        PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"layer_sld",Py_BuildValue("d",-0.000000));
-        PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"solvent_sld",Py_BuildValue("d",0.000005));
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",0.010000));
-        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",3000.000000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.001000));
-        PyDict_SetItemString(self->params,"sigma_d",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"n_stacking",Py_BuildValue("d",1.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CStackedDisksModel_members[] = {
-    {"params", T_OBJECT, offsetof(CStackedDisksModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CStackedDisksModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CStackedDisksModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CStackedDisksModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.core_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_sld") );
-    self->model_pars.core_thick = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_thick") );
-    self->model_pars.layer_thick = PyFloat_AsDouble( PyDict_GetItemString(self->params, "layer_thick") );
-    self->model_pars.axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );
-    self->model_pars.layer_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "layer_sld") );
-    self->model_pars.axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );
-    self->model_pars.solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.sigma_d = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sigma_d") );
-    self->model_pars.n_stacking = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_stacking") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CStackedDisksModelError, 
-	    	"CStackedDisksModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CStackedDisksModelError, 
-	    		"CStackedDisksModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CStackedDisksModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CStackedDisksModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",stacked_disks_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CStackedDisksModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",stacked_disks_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CStackedDisksModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.core_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_sld") );
-    self->model_pars.core_thick = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_thick") );
-    self->model_pars.layer_thick = PyFloat_AsDouble( PyDict_GetItemString(self->params, "layer_thick") );
-    self->model_pars.axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );
-    self->model_pars.layer_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "layer_sld") );
-    self->model_pars.axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );
-    self->model_pars.solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.sigma_d = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sigma_d") );
-    self->model_pars.n_stacking = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_stacking") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CStackedDisksModelError, 
-	    	"CStackedDisksModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CStackedDisksModelError, 
-	    		"CStackedDisksModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CStackedDisksModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CStackedDisksModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",stacked_disks_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CStackedDisksModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",stacked_disks_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CStackedDisksModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CStackedDisksModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CStackedDisksModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CStackedDisksModel",             /*tp_name*/
-    sizeof(CStackedDisksModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CStackedDisksModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CStackedDisksModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CStackedDisksModel_methods,             /* tp_methods */
-    CStackedDisksModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CStackedDisksModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CStackedDisksModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCStackedDisksModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CStackedDisksModelType) < 0)
-        return;
-
-    Py_INCREF(&CStackedDisksModelType);
-    PyModule_AddObject(module, "CStackedDisksModel", (PyObject *)&CStackedDisksModelType);
-    
-    d = PyModule_GetDict(module);
-    CStackedDisksModelError = PyErr_NewException("CStackedDisksModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CStackedDisksModelError", CStackedDisksModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CStickyHSStructure.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CStickyHSStructure.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,293 +1,0 @@
-/** CStickyHSStructure
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY StickyHS.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "StickyHS.h"
-
-/// Error object for raised exceptions
-static PyObject * CStickyHSStructureError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	StickyHSParameters model_pars;
-} CStickyHSStructure;
-
-
-static void
-CStickyHSStructure_dealloc(CStickyHSStructure* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CStickyHSStructure_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CStickyHSStructure *self;
-    
-    self = (CStickyHSStructure *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CStickyHSStructure_init(CStickyHSStructure *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",50.000000));
-        PyDict_SetItemString(self->params,"stickiness",Py_BuildValue("d",0.200000));
-        PyDict_SetItemString(self->params,"volfraction",Py_BuildValue("d",0.100000));
-        PyDict_SetItemString(self->params,"perturb",Py_BuildValue("d",0.050000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CStickyHSStructure_members[] = {
-    {"params", T_OBJECT, offsetof(CStickyHSStructure, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CStickyHSStructure, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CStickyHSStructure_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CStickyHSStructure *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.stickiness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "stickiness") );
-    self->model_pars.volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
-    self->model_pars.perturb = PyFloat_AsDouble( PyDict_GetItemString(self->params, "perturb") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CStickyHSStructureError, 
-	    	"CStickyHSStructure.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CStickyHSStructureError, 
-	    		"CStickyHSStructure.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CStickyHSStructure_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CStickyHSStructure_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",StickyHS_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CStickyHSStructure_readDouble(pars);		
-		
-		return Py_BuildValue("d",StickyHS_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CStickyHSStructure *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
-    self->model_pars.stickiness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "stickiness") );
-    self->model_pars.volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
-    self->model_pars.perturb = PyFloat_AsDouble( PyDict_GetItemString(self->params, "perturb") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CStickyHSStructureError, 
-	    	"CStickyHSStructure.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CStickyHSStructureError, 
-	    		"CStickyHSStructure.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CStickyHSStructure_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CStickyHSStructure_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",StickyHS_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CStickyHSStructure_readDouble(pars);		
-		
-		return Py_BuildValue("d",StickyHS_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CStickyHSStructure *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CStickyHSStructure_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CStickyHSStructureType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CStickyHSStructure",             /*tp_name*/
-    sizeof(CStickyHSStructure),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CStickyHSStructure_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CStickyHSStructure objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CStickyHSStructure_methods,             /* tp_methods */
-    CStickyHSStructure_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CStickyHSStructure_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CStickyHSStructure_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCStickyHSStructure(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CStickyHSStructureType) < 0)
-        return;
-
-    Py_INCREF(&CStickyHSStructureType);
-    PyModule_AddObject(module, "CStickyHSStructure", (PyObject *)&CStickyHSStructureType);
-    
-    d = PyModule_GetDict(module);
-    CStickyHSStructureError = PyErr_NewException("CStickyHSStructure.error", NULL, NULL);
-    PyDict_SetItemString(d, "CStickyHSStructureError", CStickyHSStructureError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CTriaxialEllipsoidModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CTriaxialEllipsoidModel.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,308 +1,0 @@
-/** CTriaxialEllipsoidModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY triaxial_ellipsoid.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "triaxial_ellipsoid.h"
-
-/// Error object for raised exceptions
-static PyObject * CTriaxialEllipsoidModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	TriaxialEllipsoidParameters model_pars;
-} CTriaxialEllipsoidModel;
-
-
-static void
-CTriaxialEllipsoidModel_dealloc(CTriaxialEllipsoidModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CTriaxialEllipsoidModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CTriaxialEllipsoidModel *self;
-    
-    self = (CTriaxialEllipsoidModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CTriaxialEllipsoidModel_init(CTriaxialEllipsoidModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"axis_psi",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"semi_axisA",Py_BuildValue("d",35.000000));
-        PyDict_SetItemString(self->params,"semi_axisB",Py_BuildValue("d",100.000000));
-        PyDict_SetItemString(self->params,"semi_axisC",Py_BuildValue("d",400.000000));
-        PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000005));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CTriaxialEllipsoidModel_members[] = {
-    {"params", T_OBJECT, offsetof(CTriaxialEllipsoidModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CTriaxialEllipsoidModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CTriaxialEllipsoidModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CTriaxialEllipsoidModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.axis_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_psi") );
-    self->model_pars.axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );
-    self->model_pars.semi_axisA = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisA") );
-    self->model_pars.semi_axisB = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisB") );
-    self->model_pars.semi_axisC = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisC") );
-    self->model_pars.axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CTriaxialEllipsoidModelError, 
-	    	"CTriaxialEllipsoidModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CTriaxialEllipsoidModelError, 
-	    		"CTriaxialEllipsoidModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CTriaxialEllipsoidModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CTriaxialEllipsoidModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",triaxial_ellipsoid_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CTriaxialEllipsoidModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",triaxial_ellipsoid_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CTriaxialEllipsoidModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.axis_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_psi") );
-    self->model_pars.axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );
-    self->model_pars.semi_axisA = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisA") );
-    self->model_pars.semi_axisB = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisB") );
-    self->model_pars.semi_axisC = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisC") );
-    self->model_pars.axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CTriaxialEllipsoidModelError, 
-	    	"CTriaxialEllipsoidModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CTriaxialEllipsoidModelError, 
-	    		"CTriaxialEllipsoidModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CTriaxialEllipsoidModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CTriaxialEllipsoidModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",triaxial_ellipsoid_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CTriaxialEllipsoidModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",triaxial_ellipsoid_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CTriaxialEllipsoidModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CTriaxialEllipsoidModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CTriaxialEllipsoidModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CTriaxialEllipsoidModel",             /*tp_name*/
-    sizeof(CTriaxialEllipsoidModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CTriaxialEllipsoidModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CTriaxialEllipsoidModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CTriaxialEllipsoidModel_methods,             /* tp_methods */
-    CTriaxialEllipsoidModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CTriaxialEllipsoidModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CTriaxialEllipsoidModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCTriaxialEllipsoidModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CTriaxialEllipsoidModelType) < 0)
-        return;
-
-    Py_INCREF(&CTriaxialEllipsoidModelType);
-    PyModule_AddObject(module, "CTriaxialEllipsoidModel", (PyObject *)&CTriaxialEllipsoidModelType);
-    
-    d = PyModule_GetDict(module);
-    CTriaxialEllipsoidModelError = PyErr_NewException("CTriaxialEllipsoidModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CTriaxialEllipsoidModelError", CTriaxialEllipsoidModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CVesicleModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CVesicleModel.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,299 +1,0 @@
-/** CVesicleModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY vesicle.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * @author   M.Doucet / UTK
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-#include "vesicle.h"
-
-/// Error object for raised exceptions
-static PyObject * CVesicleModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	VesicleParameters model_pars;
-} CVesicleModel;
-
-
-static void
-CVesicleModel_dealloc(CVesicleModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CVesicleModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CVesicleModel *self;
-    
-    self = (CVesicleModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CVesicleModel_init(CVesicleModel *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        // Initialize parameter dictionary
-        PyDict_SetItemString(self->params,"core_sld",Py_BuildValue("d",0.000006));
-        PyDict_SetItemString(self->params,"core_radius",Py_BuildValue("d",100.000000));
-        PyDict_SetItemString(self->params,"thickness",Py_BuildValue("d",30.000000));
-        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"shell_sld",Py_BuildValue("d",0.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CVesicleModel_members[] = {
-    {"params", T_OBJECT, offsetof(CVesicleModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CVesicleModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CVesicleModel_readDouble(PyObject *p) {
-    if (PyFloat_Check(p)==1) {
-        return (double)(((PyFloatObject *)(p))->ob_fval);
-    } else if (PyInt_Check(p)==1) {
-        return (double)(((PyIntObject *)(p))->ob_ival);
-    } else if (PyLong_Check(p)==1) {
-        return (double)PyLong_AsLong(p);
-    } else {
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(CVesicleModel *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.core_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_sld") );
-    self->model_pars.core_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_radius") );
-    self->model_pars.thickness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thickness") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.shell_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "shell_sld") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CVesicleModelError, 
-	    	"CVesicleModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(q,phi)
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CVesicleModelError, 
-	    		"CVesicleModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the q and phi values at which
-	    // to evaluate I(q,phi)
-	    q_value = CVesicleModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CVesicleModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",vesicle_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CVesicleModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",vesicle_analytical_1D(&(self->model_pars),q_value));
-	}	
-}
-
-/**
- * Function to call to evaluate model in cartesian coordinates
- * @param args: input q or [qx, qy]]
- * @return: function value
- */
-static PyObject * runXY(CVesicleModel *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	// Reader parameter dictionary
-    self->model_pars.core_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_sld") );
-    self->model_pars.core_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_radius") );
-    self->model_pars.thickness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thickness") );
-    self->model_pars.scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") );
-    self->model_pars.background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );
-    self->model_pars.shell_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "shell_sld") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CVesicleModelError, 
-	    	"CVesicleModel.run expects a q value.");
-		return NULL;
-	}
-	  
-	// Check params
-	if( PyList_Check(pars)==1) {
-		
-		// Length of list should be 2 for I(qx, qy))
-	    npars = PyList_GET_SIZE(pars); 
-	    if(npars!=2) {
-	    	PyErr_SetString(CVesicleModelError, 
-	    		"CVesicleModel.run expects a double or a list of dimension 2.");
-	    	return NULL;
-	    }
-	    // We have a vector q, get the qx and qy values at which
-	    // to evaluate I(qx,qy)
-	    qx_value = CVesicleModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CVesicleModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",vesicle_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CVesicleModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",vesicle_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CVesicleModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CVesicleModel_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given Q or Q, phi"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given Q or Qx, Qy"},
-    {"reset",    (PyCFunction)reset   , METH_VARARGS,
-      "Reset pair correlation"},
-    //{"numerical_1D",      (PyCFunction)numerical_1D     , METH_VARARGS,
-    //  "Evaluate the 1D model at a given Q"},
-   {NULL}
-};
-
-static PyTypeObject CVesicleModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CVesicleModel",             /*tp_name*/
-    sizeof(CVesicleModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CVesicleModel_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    0,                         /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CVesicleModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CVesicleModel_methods,             /* tp_methods */
-    CVesicleModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CVesicleModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CVesicleModel_new,                 /* tp_new */
-};
-
-
-static PyMethodDef module_methods[] = {
-    {NULL} 
-};
-
-/**
- * Function used to add the model class to a module
- * @param module: module to add the class to
- */ 
-void addCVesicleModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CVesicleModelType) < 0)
-        return;
-
-    Py_INCREF(&CVesicleModelType);
-    PyModule_AddObject(module, "CVesicleModel", (PyObject *)&CVesicleModelType);
-    
-    d = PyModule_GetDict(module);
-    CVesicleModelError = PyErr_NewException("CVesicleModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CVesicleModelError", CVesicleModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/binaryHS.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/binaryHS.c	(revision 3d25331f0e8a822fc6c59f15883b1cd21463b567)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/**
- * Scattering model for a sphere
- * @author: Gervaise B alina / UTK
- */
-
-#include "binaryHS.h"
-#include "libSphere.h"
-#include <math.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the binary hard sphere
- * @param q: q-value
- * @return: function value
- */
-double binaryHS_analytical_1D(BinaryHSParameters *pars, double q) {
-	double dp[8];
-	
-	dp[0] = pars->l_radius;
-	dp[1] = pars->s_radius;
-	dp[2] = pars->vol_frac_ls;
-	dp[3] = pars->vol_frac_ss;
-	dp[4] = pars->ls_sld;
-	dp[5] = pars->ss_sld;
-	dp[6] = pars->solvent_sld;
-	dp[7] = pars->background;
-	
-	return BinaryHS(dp, q);
-}
-    
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the binary hard sphere
- * @param q: q-value
- * @return: function value
- */
-double binaryHS_analytical_2D(BinaryHSParameters *pars, double q, double phi) {
-	return binaryHS_analytical_1D(pars,q);
-}
-
-double binaryHS_analytical_2DXY(BinaryHSParameters *pars, double qx, double qy){
-	return binaryHS_analytical_1D(pars,sqrt(qx*qx+qy*qy));	
-}
Index: sansmodels/src/sans/models/c_extensions/binaryHS.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/binaryHS.h	(revision 4cbaf3560d19e19647ad025a9ea3239a0d1934a7)
+++ sansmodels/src/sans/models/c_extensions/binaryHS.h	(revision 2399b2aa02ce10301917e5d3d2e5923f497c877c)
@@ -58,9 +58,9 @@
 
 /// 1D scattering function
-double binaryHS_analytical_1D(BinaryHSParameters *pars, double q);
+//double binaryHS_analytical_1D(BinaryHSParameters *pars, double q);
 
 /// 2D scattering function
-double binaryHS_analytical_2D(BinaryHSParameters *pars, double q, double phi);
-double binaryHS_analytical_2DXY(BinaryHSParameters *pars, double qx, double qy);
+//double binaryHS_analytical_2D(BinaryHSParameters *pars, double q, double phi);
+//double binaryHS_analytical_2DXY(BinaryHSParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/core_shell.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/core_shell.c	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/**
- * Scattering model for a core-shell sphere
- * @author: Mathieu Doucet / UTK
- */
-
-#include "core_shell.h"
-#include "libSphere.h"
-#include <math.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the core-shell
- * @param q: q-value
- * @return: function value
- */
-double core_shell_analytical_1D(CoreShellParameters *pars, double q) {
-	double dp[7];
-	
-	dp[0] = pars->scale;
-	dp[1] = pars->radius;
-	dp[2] = pars->thickness;
-	dp[3] = pars->core_sld;
-	dp[4] = pars->shell_sld;
-	dp[5] = pars->solvent_sld;
-	dp[6] = pars->background;
-	
-	return CoreShellForm(dp, q);
-}
-    
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the core-shell
- * @param q: q-value
- * @return: function value
- */
-double core_shell_analytical_2D(CoreShellParameters *pars, double q, double phi) {
-	return core_shell_analytical_1D(pars,q);
-}
-
-double core_shell_analytical_2DXY(CoreShellParameters *pars, double qx, double qy){
-	return core_shell_analytical_1D(pars,sqrt(qx*qx+qy*qy));	
-}
Index: sansmodels/src/sans/models/c_extensions/core_shell.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/core_shell.h	(revision 27972c1dfdd57a50946a99914051e1713c997e78)
+++ sansmodels/src/sans/models/c_extensions/core_shell.h	(revision 2399b2aa02ce10301917e5d3d2e5923f497c877c)
@@ -48,9 +48,9 @@
 
 /// 1D scattering function
-double core_shell_analytical_1D(CoreShellParameters *pars, double q);
+//double core_shell_analytical_1D(CoreShellParameters *pars, double q);
 
 /// 2D scattering function
-double core_shell_analytical_2D(CoreShellParameters *pars, double q, double phi);
-double core_shell_analytical_2DXY(CoreShellParameters *pars, double qx, double qy);
+//double core_shell_analytical_2D(CoreShellParameters *pars, double q, double phi);
+//double core_shell_analytical_2DXY(CoreShellParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/corefourshell.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/corefourshell.c	(revision 339ce675656e3ab89eff7b84d8292a2e0ffe6109)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/**
- * Scattering model for a corefourshell sphere
- */
-
-#include "corefourshell.h"
-#include "libSphere.h"
-#include <math.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the corefourshell
- * @param q: q-value
- * @return: function value
- */
-double corefourshell_analytical_1D(CoreFourShellParameters *pars, double q) {
-	double dp[13];
-
-	dp[0] = pars->scale;
-	dp[1] = pars->rad_core0;
-	dp[2] = pars->sld_core0;
-	dp[3] = pars->thick_shell1;
-	dp[4] = pars->sld_shell1;
-	dp[5] = pars->thick_shell2;
-	dp[6] = pars->sld_shell2;
-	dp[7] = pars->thick_shell3;
-	dp[8] = pars->sld_shell3;
-	dp[9] = pars->thick_shell4;
-	dp[10] = pars->sld_shell4;
-	dp[11] = pars->sld_solv;
-	dp[12] = pars->background;
-
-	return FourShell(dp, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the corefourshell
- * @param q: q-value
- * @return: function value
- */
-double corefourshell_analytical_2D(CoreFourShellParameters *pars, double q, double phi) {
-	return corefourshell_analytical_1D(pars,q);
-}
-
-double corefourshell_analytical_2DXY(CoreFourShellParameters *pars, double qx, double qy){
-	return corefourshell_analytical_1D(pars,sqrt(qx*qx+qy*qy));
-}
Index: sansmodels/src/sans/models/c_extensions/corefourshell.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/corefourshell.h	(revision 339ce675656e3ab89eff7b84d8292a2e0ffe6109)
+++ sansmodels/src/sans/models/c_extensions/corefourshell.h	(revision 2399b2aa02ce10301917e5d3d2e5923f497c877c)
@@ -76,9 +76,9 @@
 
 /// 1D scattering function
-double corefourshell_analytical_1D(CoreFourShellParameters *pars, double q);
+//double corefourshell_analytical_1D(CoreFourShellParameters *pars, double q);
 
 /// 2D scattering function
-double corefourshell_analytical_2D(CoreFourShellParameters *pars, double q, double phi);
-double corefourshell_analytical_2DXY(CoreFourShellParameters *pars, double qx, double qy);
+//double corefourshell_analytical_2D(CoreFourShellParameters *pars, double q, double phi);
+//double corefourshell_analytical_2DXY(CoreFourShellParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/fractal.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/fractal.c	(revision c724ccd87499a21402fee0d11d517066f99ddf9b)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/**
- * Fractal scattering model
- */
-
-#include "fractal.h"
-#include "libTwoPhase.h"
-#include <math.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the fractal
- * @param q: q-value
- * @return: function value
- */
-double fractal_analytical_1D(FractalParameters *pars, double q) {
-	double dp[7];
-
-	dp[0] = pars->scale;
-	dp[1] = pars->radius;
-	dp[2] = pars->fractal_dim;
-	dp[3] = pars->cor_length;
-	dp[4] = pars->sldBlock;
-	dp[5] = pars->sldSolv;
-	dp[6] = pars->background;
-
-	return Fractal(dp, fabs(q));
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the fractal
- * @param q: q-value
- * @return: function value
- */
-double fractal_analytical_2D(FractalParameters *pars, double q, double phi) {
-	return fractal_analytical_1D(pars,q);
-}
-
-double fractal_analytical_2DXY(FractalParameters *pars, double qx, double qy){
-	return fractal_analytical_1D(pars,sqrt(qx*qx+qy*qy));
-}
Index: sansmodels/src/sans/models/c_extensions/fractal.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/fractal.h	(revision c724ccd87499a21402fee0d11d517066f99ddf9b)
+++ sansmodels/src/sans/models/c_extensions/fractal.h	(revision 2399b2aa02ce10301917e5d3d2e5923f497c877c)
@@ -55,9 +55,9 @@
 
 /// 1D scattering function
-double fractal_analytical_1D(FractalParameters *pars, double q);
+//double fractal_analytical_1D(FractalParameters *pars, double q);
 
 /// 2D scattering function
-double fractal_analytical_2D(FractalParameters *pars, double q, double phi);
-double fractal_analytical_2DXY(FractalParameters *pars, double qx, double qy);
+//double fractal_analytical_2D(FractalParameters *pars, double q, double phi);
+//double fractal_analytical_2DXY(FractalParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/lamellarFF_HG.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/lamellarFF_HG.c	(revision b4679dee5e210d6a4a960aa3eada337f6dbac554)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/**
- * Scattering model for the form factor from a lyotropic lamellar phase
- * @author: Gervaise B. Alina / UTK
- */
-
-#include "lamellarFF_HG.h"
-#include <math.h>
-#include "libCylinder.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the form factor from a lyotropic lamellar phase
- * @param q: q-value
- * @return: function value
- */
-double lamellarFF_HG_analytical_1D(LamellarFF_HGParameters *pars, double q) {
-	double dp[7];
-
-	// Fill paramater array
-	dp[0] = pars->scale;
-	dp[1] = pars->t_length;
-	dp[2] = pars->h_thickness;
-	dp[3] = pars->sld_tail;
-	dp[4] = pars->sld_head;
-	dp[5] = pars->sld_solvent;
-	dp[6] = pars->background;
-
-	// Call library function to evaluate model
-	return LamellarFF_HG(dp, q);
-}
-
-double lamellarFF_HG_analytical_2D(LamellarFF_HGParameters *pars, double q, double phi){
-	return lamellarFF_HG_analytical_1D(pars,q);
-}
-double lamellarFF_HG_analytical_2DXY(LamellarFF_HGParameters *pars, double qx, double qy){
-	return lamellarFF_HG_analytical_1D(pars,sqrt(qx*qx+qy*qy));
-}
Index: sansmodels/src/sans/models/c_extensions/lamellarFF_HG.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/lamellarFF_HG.h	(revision 27972c1dfdd57a50946a99914051e1713c997e78)
+++ sansmodels/src/sans/models/c_extensions/lamellarFF_HG.h	(revision 2399b2aa02ce10301917e5d3d2e5923f497c877c)
@@ -44,9 +44,9 @@
 
 /// 1D scattering function
-double lamellarFF_HG_analytical_1D(LamellarFF_HGParameters *pars, double q);
+//double lamellarFF_HG_analytical_1D(LamellarFF_HGParameters *pars, double q);
 
 /// 2D scattering function
-double lamellarFF_HG_analytical_2D(LamellarFF_HGParameters *pars, double q, double phi);
-double lamellarFF_HG_analytical_2DXY(LamellarFF_HGParameters *pars, double qx, double qy);
+//double lamellarFF_HG_analytical_2D(LamellarFF_HGParameters *pars, double q, double phi);
+//double lamellarFF_HG_analytical_2DXY(LamellarFF_HGParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/lamellarPC.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/lamellarPC.c	(revision d5b6a9d7cd9e26b5f9e28e55e8cf848a40de6ae9)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/**
- * Scattering model for a lamellar ParaCrystal
- */
-
-#include "lamellarPC.h"
-#include <math.h>
-#include "libCylinder.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of a lamellar ParaCrystal Model
- * @param q: q-value
- * @return: function value
- */
-double lamellarPC_analytical_1D(LamellarPCParameters *pars, double q) {
-	double dp[8];
-
-	// Fill paramater array
-	dp[0] = pars->scale;
-	dp[1] = pars->thickness;
-	dp[2] = pars->Nlayers;
-	dp[3] = pars->spacing;
-	dp[4] = pars->pd_spacing;
-	dp[5] = pars->sld_layer;
-	dp[6] = pars->sld_solvent;
-	dp[7] = pars->background;
-
-	// Call library function to evaluate model
-	return Lamellar_ParaCrystal(dp, q);
-}
-
-double lamellarPC_analytical_2D(LamellarPCParameters *pars, double q, double phi){
-	return lamellarPC_analytical_1D(pars,q);
-}
-double lamellarPC_analytical_2DXY(LamellarPCParameters *pars, double qx, double qy){
-	return lamellarPC_analytical_1D(pars,sqrt(qx*qx+qy*qy));
-}
Index: sansmodels/src/sans/models/c_extensions/lamellarPC.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/lamellarPC.h	(revision d5b6a9d7cd9e26b5f9e28e55e8cf848a40de6ae9)
+++ sansmodels/src/sans/models/c_extensions/lamellarPC.h	(revision 2399b2aa02ce10301917e5d3d2e5923f497c877c)
@@ -50,9 +50,9 @@
 
 /// 1D scattering function
-double lamellarPC_analytical_1D(LamellarPCParameters *pars, double q);
+//double lamellarPC_analytical_1D(LamellarPCParameters *pars, double q);
 
 /// 2D scattering function
-double lamellarPC_analytical_2D(LamellarPCParameters *pars, double q, double phi);
-double lamellarPC_analytical_2DXY(LamellarPCParameters *pars, double qx, double qy);
+//double lamellarPC_analytical_2D(LamellarPCParameters *pars, double q, double phi);
+//double lamellarPC_analytical_2DXY(LamellarPCParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/lamellarPS_HG.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/lamellarPS_HG.c	(revision 96b593847bbd8eb6072269e750a93261a4f743b3)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/**
- * Scattering model for a lamellar
- * TODO: Add 2D analysis
- */
-
-#include "lamellarPS_HG.h"
-#include <math.h>
-#include "libCylinder.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the lamellar
- * @param q: q-value
- * @return: function value
- */
-double lamellarPS_HG_analytical_1D(LamellarPSHGParameters *pars, double q) {
-	double dp[10];
-
-	// Fill paramater array
-	dp[0] = pars->scale;
-	dp[1] = pars->spacing;
-	dp[2] = pars->deltaT;
-	dp[3] = pars->deltaH;
-	dp[4] = pars->sld_tail;
-	dp[5] = pars->sld_head;
-	dp[6] = pars->sld_solvent;
-	dp[7] = pars->n_plates;
-	dp[8] = pars->caille;
-	dp[9] = pars->background;
-
-	// Call library function to evaluate model
-	return LamellarPS_HG(dp, q);
-}
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the lamellar
- * @param q: q-value
- * @return: function value
- */
-double lamellarPS_HG_analytical_2DXY(LamellarPSHGParameters *pars, double qx, double qy) {
-    return lamellarPS_HG_analytical_1D(pars, sqrt(qx*qx+qy*qy));
-}
-
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the lamellar
- * @param q: q-value
- * @param phi: angle phi
- * @return: function value
- */
-double lamellarPS_HG_analytical_2D(LamellarPSHGParameters *pars, double q, double phi) {
-    return lamellarPS_HG_analytical_1D(pars, q);
-}
-
Index: sansmodels/src/sans/models/c_extensions/lamellarPS_HG.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/lamellarPS_HG.h	(revision 27972c1dfdd57a50946a99914051e1713c997e78)
+++ sansmodels/src/sans/models/c_extensions/lamellarPS_HG.h	(revision 2399b2aa02ce10301917e5d3d2e5923f497c877c)
@@ -69,9 +69,9 @@
 
 /// 1D scattering function
-double lamellarPS_HG_analytical_1D(LamellarPSHGParameters *pars, double q);
+//double lamellarPS_HG_analytical_1D(LamellarPSHGParameters *pars, double q);
 
 /// 2D scattering function
-double lamellarPS_HG_analytical_2D(LamellarPSHGParameters *pars, double q, double phi);
-double lamellarPS_HG_analytical_2DXY(LamellarPSHGParameters *pars, double qx, double qy);
+//double lamellarPS_HG_analytical_2D(LamellarPSHGParameters *pars, double q, double phi);
+//double lamellarPS_HG_analytical_2DXY(LamellarPSHGParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/multishell.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/multishell.c	(revision 3d25331f0e8a822fc6c59f15883b1cd21463b567)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/**
- * Scattering model for a sphere
- * @author: Gervaise B alina / UTK
- */
-
-#include "multishell.h"
-#include "libSphere.h"
-#include <math.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the multishell
- * @param q: q-value
- * @return: function value
- */
-double multishell_analytical_1D(MultiShellParameters *pars, double q) {
-	double dp[8];
-	
-	dp[0] = pars->scale;
-	dp[1] = pars->core_radius;
-	dp[2] = pars->s_thickness;
-	dp[3] = pars->w_thickness;
-	dp[4] = pars->core_sld;
-	dp[5] = pars->shell_sld;
-	dp[6] = pars->n_pairs;
-	dp[7] = pars->background;
-	
-	return MultiShell(dp, q);
-}
-    
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the multishell
- * @param q: q-value
- * @return: function value
- */
-double multishell_analytical_2D(MultiShellParameters *pars, double q, double phi) {
-	return multishell_analytical_1D(pars,q);
-}
-
-double multishell_analytical_2DXY(MultiShellParameters *pars, double qx, double qy){
-	return multishell_analytical_1D(pars,sqrt(qx*qx+qy*qy));	
-}
Index: sansmodels/src/sans/models/c_extensions/multishell.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/multishell.h	(revision 27972c1dfdd57a50946a99914051e1713c997e78)
+++ sansmodels/src/sans/models/c_extensions/multishell.h	(revision 2399b2aa02ce10301917e5d3d2e5923f497c877c)
@@ -58,9 +58,9 @@
 
 /// 1D scattering function
-double multishell_analytical_1D(MultiShellParameters *pars, double q);
+//double multishell_analytical_1D(MultiShellParameters *pars, double q);
 
 /// 2D scattering function
-double multishell_analytical_2D(MultiShellParameters *pars, double q, double phi);
-double multishell_analytical_2DXY(MultiShellParameters *pars, double qx, double qy);
+//double multishell_analytical_2D(MultiShellParameters *pars, double q, double phi);
+//double multishell_analytical_2DXY(MultiShellParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/sphere.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/sphere.c	(revision f10063e8f3c53d2be93abaea9c0d3d4f3061d444)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/**
- * Scattering model for a sphere
- * @author: Mathieu Doucet / UTK
- */
-
-#include "sphere.h"
-#include "libSphere.h"
-#include <math.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the sphere
- * @param q: q-value
- * @return: function value
- */
-double sphere_analytical_1D(SphereParameters *pars, double q) {
-	double dp[5];
-
-	dp[0] = pars->scale;
-	dp[1] = pars->radius;
-	dp[2] = pars->sldSph;
-	dp[3] = pars->sldSolv;
-	dp[4] = pars->background;
-
-	return SphereForm(dp, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the sphere
- * @param q: q-value
- * @return: function value
- */
-double sphere_analytical_2D(SphereParameters *pars, double q, double phi) {
-	return sphere_analytical_1D(pars,q);
-}
-
-double sphere_analytical_2DXY(SphereParameters *pars, double qx, double qy){
-	return sphere_analytical_1D(pars,sqrt(qx*qx+qy*qy));
-}
Index: sansmodels/src/sans/models/c_extensions/sphere.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/sphere.h	(revision f10063e8f3c53d2be93abaea9c0d3d4f3061d444)
+++ sansmodels/src/sans/models/c_extensions/sphere.h	(revision 2399b2aa02ce10301917e5d3d2e5923f497c877c)
@@ -44,9 +44,9 @@
 
 /// 1D scattering function
-double sphere_analytical_1D(SphereParameters *pars, double q);
+//double sphere_analytical_1D(SphereParameters *pars, double q);
 
 /// 2D scattering function
-double sphere_analytical_2D(SphereParameters *pars, double q, double phi);
-double sphere_analytical_2DXY(SphereParameters *pars, double qx, double qy);
+//double sphere_analytical_2D(SphereParameters *pars, double q, double phi);
+//double sphere_analytical_2DXY(SphereParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/vesicle.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/vesicle.c	(revision e2afadff3f4263f27adf3503adb9ffba97b1e122)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/**
- * Scattering model for a sphere
- * @author: Gervaise B alina / UTK
- */
-
-#include "vesicle.h"
-#include "libSphere.h"
-#include <math.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the vesicle
- * @param q: q-value
- * @return: function value
- */
-double vesicle_analytical_1D(VesicleParameters *pars, double q) {
-	double dp[6];
-
-	dp[0] = pars->scale;
-	dp[1] = pars->radius;
-	dp[2] = pars->thickness;
-	dp[3] = pars->core_sld;
-	dp[4] = pars->shell_sld;
-	dp[5] = pars->background;
-
-
-	return VesicleForm(dp, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the vesicle
- * @param q: q-value
- * @return: function value
- */
-double vesicle_analytical_2D(VesicleParameters *pars, double q, double phi) {
-	return vesicle_analytical_1D(pars,q);
-}
-
-double vesicle_analytical_2DXY(VesicleParameters *pars, double qx, double qy){
-	return vesicle_analytical_1D(pars,sqrt(qx*qx+qy*qy));
-}
Index: sansmodels/src/sans/models/c_extensions/vesicle.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/vesicle.h	(revision 27972c1dfdd57a50946a99914051e1713c997e78)
+++ sansmodels/src/sans/models/c_extensions/vesicle.h	(revision 2399b2aa02ce10301917e5d3d2e5923f497c877c)
@@ -46,9 +46,9 @@
 
 /// 1D scattering function
-double vesicle_analytical_1D(VesicleParameters *pars, double q);
+//double vesicle_analytical_1D(VesicleParameters *pars, double q);
 
 /// 2D scattering function
-double vesicle_analytical_2D(VesicleParameters *pars, double q, double phi);
-double vesicle_analytical_2DXY(VesicleParameters *pars, double qx, double qy);
+//double vesicle_analytical_2D(VesicleParameters *pars, double q, double phi);
+//double vesicle_analytical_2DXY(VesicleParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/model_func_ext.cpp
===================================================================
--- sansmodels/src/sans/models/model_func_ext.cpp	(revision 2399b2aa02ce10301917e5d3d2e5923f497c877c)
+++ sansmodels/src/sans/models/model_func_ext.cpp	(revision 2399b2aa02ce10301917e5d3d2e5923f497c877c)
@@ -0,0 +1,840 @@
+#ifdef __CPLUSPLUS__
+extern "C" {
+#endif
+
+#ifndef __GNUC__
+#pragma warning(disable: 4275)
+#pragma warning(disable: 4101)
+
+#endif
+#include "Python.h"
+#include "compile.h"
+#include "frameobject.h"
+#include <complex>
+#include <math.h>
+#include <string>
+#include "scxx/object.h"
+#include "scxx/list.h"
+#include "scxx/tuple.h"
+#include "scxx/dict.h"
+#include <iostream>
+#include <stdio.h>
+#include "numpy/arrayobject.h"
+
+
+
+
+// global None value for use in functions.
+namespace py {
+object None = object(Py_None);
+}
+
+const char* find_type(PyObject* py_obj)
+{
+    if(py_obj == NULL) return "C NULL value";
+    if(PyCallable_Check(py_obj)) return "callable";
+    if(PyString_Check(py_obj)) return "string";
+    if(PyInt_Check(py_obj)) return "int";
+    if(PyFloat_Check(py_obj)) return "float";
+    if(PyDict_Check(py_obj)) return "dict";
+    if(PyList_Check(py_obj)) return "list";
+    if(PyTuple_Check(py_obj)) return "tuple";
+    if(PyFile_Check(py_obj)) return "file";
+    if(PyModule_Check(py_obj)) return "module";
+
+    //should probably do more intergation (and thinking) on these.
+    if(PyCallable_Check(py_obj) && PyInstance_Check(py_obj)) return "callable";
+    if(PyInstance_Check(py_obj)) return "instance";
+    if(PyCallable_Check(py_obj)) return "callable";
+    return "unkown type";
+}
+
+void throw_error(PyObject* exc, const char* msg)
+{
+ //printf("setting python error: %s\n",msg);
+  PyErr_SetString(exc, msg);
+  //printf("throwing error\n");
+  throw 1;
+}
+
+void handle_bad_type(PyObject* py_obj, const char* good_type, const char* var_name)
+{
+    char msg[500];
+    sprintf(msg,"received '%s' type instead of '%s' for variable '%s'",
+            find_type(py_obj),good_type,var_name);
+    throw_error(PyExc_TypeError,msg);
+}
+
+void handle_conversion_error(PyObject* py_obj, const char* good_type, const char* var_name)
+{
+    char msg[500];
+    sprintf(msg,"Conversion Error:, received '%s' type instead of '%s' for variable '%s'",
+            find_type(py_obj),good_type,var_name);
+    throw_error(PyExc_TypeError,msg);
+}
+
+
+class int_handler
+{
+public:
+    int convert_to_int(PyObject* py_obj, const char* name)
+    {
+        // Incref occurs even if conversion fails so that
+        // the decref in cleanup_code has a matching incref.
+        
+        if (!py_obj || !PyInt_Check(py_obj))
+            handle_conversion_error(py_obj,"int", name);
+        return (int) PyInt_AsLong(py_obj);
+    }
+
+    int py_to_int(PyObject* py_obj, const char* name)
+    {
+        // !! Pretty sure INCREF should only be called on success since
+        // !! py_to_xxx is used by the user -- not the code generator.
+        if (!py_obj || !PyInt_Check(py_obj))
+            handle_bad_type(py_obj,"int", name);
+        
+        return (int) PyInt_AsLong(py_obj);
+    }
+};
+
+int_handler x__int_handler = int_handler();
+#define convert_to_int(py_obj,name) \
+        x__int_handler.convert_to_int(py_obj,name)
+#define py_to_int(py_obj,name) \
+        x__int_handler.py_to_int(py_obj,name)
+
+
+PyObject* int_to_py(PyObject* obj)
+{
+    return (PyObject*) obj;
+}
+
+
+class float_handler
+{
+public:
+    double convert_to_float(PyObject* py_obj, const char* name)
+    {
+        // Incref occurs even if conversion fails so that
+        // the decref in cleanup_code has a matching incref.
+        
+        if (!py_obj || !PyFloat_Check(py_obj))
+            handle_conversion_error(py_obj,"float", name);
+        return PyFloat_AsDouble(py_obj);
+    }
+
+    double py_to_float(PyObject* py_obj, const char* name)
+    {
+        // !! Pretty sure INCREF should only be called on success since
+        // !! py_to_xxx is used by the user -- not the code generator.
+        if (!py_obj || !PyFloat_Check(py_obj))
+            handle_bad_type(py_obj,"float", name);
+        
+        return PyFloat_AsDouble(py_obj);
+    }
+};
+
+float_handler x__float_handler = float_handler();
+#define convert_to_float(py_obj,name) \
+        x__float_handler.convert_to_float(py_obj,name)
+#define py_to_float(py_obj,name) \
+        x__float_handler.py_to_float(py_obj,name)
+
+
+PyObject* float_to_py(PyObject* obj)
+{
+    return (PyObject*) obj;
+}
+
+
+class complex_handler
+{
+public:
+    std::complex<double> convert_to_complex(PyObject* py_obj, const char* name)
+    {
+        // Incref occurs even if conversion fails so that
+        // the decref in cleanup_code has a matching incref.
+        
+        if (!py_obj || !PyComplex_Check(py_obj))
+            handle_conversion_error(py_obj,"complex", name);
+        return std::complex<double>(PyComplex_RealAsDouble(py_obj),PyComplex_ImagAsDouble(py_obj));
+    }
+
+    std::complex<double> py_to_complex(PyObject* py_obj, const char* name)
+    {
+        // !! Pretty sure INCREF should only be called on success since
+        // !! py_to_xxx is used by the user -- not the code generator.
+        if (!py_obj || !PyComplex_Check(py_obj))
+            handle_bad_type(py_obj,"complex", name);
+        
+        return std::complex<double>(PyComplex_RealAsDouble(py_obj),PyComplex_ImagAsDouble(py_obj));
+    }
+};
+
+complex_handler x__complex_handler = complex_handler();
+#define convert_to_complex(py_obj,name) \
+        x__complex_handler.convert_to_complex(py_obj,name)
+#define py_to_complex(py_obj,name) \
+        x__complex_handler.py_to_complex(py_obj,name)
+
+
+PyObject* complex_to_py(PyObject* obj)
+{
+    return (PyObject*) obj;
+}
+
+
+class unicode_handler
+{
+public:
+    Py_UNICODE* convert_to_unicode(PyObject* py_obj, const char* name)
+    {
+        // Incref occurs even if conversion fails so that
+        // the decref in cleanup_code has a matching incref.
+        Py_XINCREF(py_obj);
+        if (!py_obj || !PyUnicode_Check(py_obj))
+            handle_conversion_error(py_obj,"unicode", name);
+        return PyUnicode_AS_UNICODE(py_obj);
+    }
+
+    Py_UNICODE* py_to_unicode(PyObject* py_obj, const char* name)
+    {
+        // !! Pretty sure INCREF should only be called on success since
+        // !! py_to_xxx is used by the user -- not the code generator.
+        if (!py_obj || !PyUnicode_Check(py_obj))
+            handle_bad_type(py_obj,"unicode", name);
+        Py_XINCREF(py_obj);
+        return PyUnicode_AS_UNICODE(py_obj);
+    }
+};
+
+unicode_handler x__unicode_handler = unicode_handler();
+#define convert_to_unicode(py_obj,name) \
+        x__unicode_handler.convert_to_unicode(py_obj,name)
+#define py_to_unicode(py_obj,name) \
+        x__unicode_handler.py_to_unicode(py_obj,name)
+
+
+PyObject* unicode_to_py(PyObject* obj)
+{
+    return (PyObject*) obj;
+}
+
+
+class string_handler
+{
+public:
+    std::string convert_to_string(PyObject* py_obj, const char* name)
+    {
+        // Incref occurs even if conversion fails so that
+        // the decref in cleanup_code has a matching incref.
+        Py_XINCREF(py_obj);
+        if (!py_obj || !PyString_Check(py_obj))
+            handle_conversion_error(py_obj,"string", name);
+        return std::string(PyString_AsString(py_obj));
+    }
+
+    std::string py_to_string(PyObject* py_obj, const char* name)
+    {
+        // !! Pretty sure INCREF should only be called on success since
+        // !! py_to_xxx is used by the user -- not the code generator.
+        if (!py_obj || !PyString_Check(py_obj))
+            handle_bad_type(py_obj,"string", name);
+        Py_XINCREF(py_obj);
+        return std::string(PyString_AsString(py_obj));
+    }
+};
+
+string_handler x__string_handler = string_handler();
+#define convert_to_string(py_obj,name) \
+        x__string_handler.convert_to_string(py_obj,name)
+#define py_to_string(py_obj,name) \
+        x__string_handler.py_to_string(py_obj,name)
+
+
+               PyObject* string_to_py(std::string s)
+               {
+                   return PyString_FromString(s.c_str());
+               }
+               
+class list_handler
+{
+public:
+    py::list convert_to_list(PyObject* py_obj, const char* name)
+    {
+        // Incref occurs even if conversion fails so that
+        // the decref in cleanup_code has a matching incref.
+        
+        if (!py_obj || !PyList_Check(py_obj))
+            handle_conversion_error(py_obj,"list", name);
+        return py::list(py_obj);
+    }
+
+    py::list py_to_list(PyObject* py_obj, const char* name)
+    {
+        // !! Pretty sure INCREF should only be called on success since
+        // !! py_to_xxx is used by the user -- not the code generator.
+        if (!py_obj || !PyList_Check(py_obj))
+            handle_bad_type(py_obj,"list", name);
+        
+        return py::list(py_obj);
+    }
+};
+
+list_handler x__list_handler = list_handler();
+#define convert_to_list(py_obj,name) \
+        x__list_handler.convert_to_list(py_obj,name)
+#define py_to_list(py_obj,name) \
+        x__list_handler.py_to_list(py_obj,name)
+
+
+PyObject* list_to_py(PyObject* obj)
+{
+    return (PyObject*) obj;
+}
+
+
+class dict_handler
+{
+public:
+    py::dict convert_to_dict(PyObject* py_obj, const char* name)
+    {
+        // Incref occurs even if conversion fails so that
+        // the decref in cleanup_code has a matching incref.
+        
+        if (!py_obj || !PyDict_Check(py_obj))
+            handle_conversion_error(py_obj,"dict", name);
+        return py::dict(py_obj);
+    }
+
+    py::dict py_to_dict(PyObject* py_obj, const char* name)
+    {
+        // !! Pretty sure INCREF should only be called on success since
+        // !! py_to_xxx is used by the user -- not the code generator.
+        if (!py_obj || !PyDict_Check(py_obj))
+            handle_bad_type(py_obj,"dict", name);
+        
+        return py::dict(py_obj);
+    }
+};
+
+dict_handler x__dict_handler = dict_handler();
+#define convert_to_dict(py_obj,name) \
+        x__dict_handler.convert_to_dict(py_obj,name)
+#define py_to_dict(py_obj,name) \
+        x__dict_handler.py_to_dict(py_obj,name)
+
+
+PyObject* dict_to_py(PyObject* obj)
+{
+    return (PyObject*) obj;
+}
+
+
+class tuple_handler
+{
+public:
+    py::tuple convert_to_tuple(PyObject* py_obj, const char* name)
+    {
+        // Incref occurs even if conversion fails so that
+        // the decref in cleanup_code has a matching incref.
+        
+        if (!py_obj || !PyTuple_Check(py_obj))
+            handle_conversion_error(py_obj,"tuple", name);
+        return py::tuple(py_obj);
+    }
+
+    py::tuple py_to_tuple(PyObject* py_obj, const char* name)
+    {
+        // !! Pretty sure INCREF should only be called on success since
+        // !! py_to_xxx is used by the user -- not the code generator.
+        if (!py_obj || !PyTuple_Check(py_obj))
+            handle_bad_type(py_obj,"tuple", name);
+        
+        return py::tuple(py_obj);
+    }
+};
+
+tuple_handler x__tuple_handler = tuple_handler();
+#define convert_to_tuple(py_obj,name) \
+        x__tuple_handler.convert_to_tuple(py_obj,name)
+#define py_to_tuple(py_obj,name) \
+        x__tuple_handler.py_to_tuple(py_obj,name)
+
+
+PyObject* tuple_to_py(PyObject* obj)
+{
+    return (PyObject*) obj;
+}
+
+
+class file_handler
+{
+public:
+    FILE* convert_to_file(PyObject* py_obj, const char* name)
+    {
+        // Incref occurs even if conversion fails so that
+        // the decref in cleanup_code has a matching incref.
+        Py_XINCREF(py_obj);
+        if (!py_obj || !PyFile_Check(py_obj))
+            handle_conversion_error(py_obj,"file", name);
+        return PyFile_AsFile(py_obj);
+    }
+
+    FILE* py_to_file(PyObject* py_obj, const char* name)
+    {
+        // !! Pretty sure INCREF should only be called on success since
+        // !! py_to_xxx is used by the user -- not the code generator.
+        if (!py_obj || !PyFile_Check(py_obj))
+            handle_bad_type(py_obj,"file", name);
+        Py_XINCREF(py_obj);
+        return PyFile_AsFile(py_obj);
+    }
+};
+
+file_handler x__file_handler = file_handler();
+#define convert_to_file(py_obj,name) \
+        x__file_handler.convert_to_file(py_obj,name)
+#define py_to_file(py_obj,name) \
+        x__file_handler.py_to_file(py_obj,name)
+
+
+               PyObject* file_to_py(FILE* file, char* name, char* mode)
+               {
+                   return (PyObject*) PyFile_FromFile(file, name, mode, fclose);
+               }
+               
+class instance_handler
+{
+public:
+    py::object convert_to_instance(PyObject* py_obj, const char* name)
+    {
+        // Incref occurs even if conversion fails so that
+        // the decref in cleanup_code has a matching incref.
+        
+        if (!py_obj || !PyInstance_Check(py_obj))
+            handle_conversion_error(py_obj,"instance", name);
+        return py::object(py_obj);
+    }
+
+    py::object py_to_instance(PyObject* py_obj, const char* name)
+    {
+        // !! Pretty sure INCREF should only be called on success since
+        // !! py_to_xxx is used by the user -- not the code generator.
+        if (!py_obj || !PyInstance_Check(py_obj))
+            handle_bad_type(py_obj,"instance", name);
+        
+        return py::object(py_obj);
+    }
+};
+
+instance_handler x__instance_handler = instance_handler();
+#define convert_to_instance(py_obj,name) \
+        x__instance_handler.convert_to_instance(py_obj,name)
+#define py_to_instance(py_obj,name) \
+        x__instance_handler.py_to_instance(py_obj,name)
+
+
+PyObject* instance_to_py(PyObject* obj)
+{
+    return (PyObject*) obj;
+}
+
+
+class numpy_size_handler
+{
+public:
+    void conversion_numpy_check_size(PyArrayObject* arr_obj, int Ndims,
+                                     const char* name)
+    {
+        if (arr_obj->nd != Ndims)
+        {
+            char msg[500];
+            sprintf(msg,"Conversion Error: received '%d' dimensional array instead of '%d' dimensional array for variable '%s'",
+                    arr_obj->nd,Ndims,name);
+            throw_error(PyExc_TypeError,msg);
+        }
+    }
+
+    void numpy_check_size(PyArrayObject* arr_obj, int Ndims, const char* name)
+    {
+        if (arr_obj->nd != Ndims)
+        {
+            char msg[500];
+            sprintf(msg,"received '%d' dimensional array instead of '%d' dimensional array for variable '%s'",
+                    arr_obj->nd,Ndims,name);
+            throw_error(PyExc_TypeError,msg);
+        }
+    }
+};
+
+numpy_size_handler x__numpy_size_handler = numpy_size_handler();
+#define conversion_numpy_check_size x__numpy_size_handler.conversion_numpy_check_size
+#define numpy_check_size x__numpy_size_handler.numpy_check_size
+
+
+class numpy_type_handler
+{
+public:
+    void conversion_numpy_check_type(PyArrayObject* arr_obj, int numeric_type,
+                                     const char* name)
+    {
+        // Make sure input has correct numeric type.
+        int arr_type = arr_obj->descr->type_num;
+        if (PyTypeNum_ISEXTENDED(numeric_type))
+        {
+        char msg[80];
+        sprintf(msg, "Conversion Error: extended types not supported for variable '%s'",
+                name);
+        throw_error(PyExc_TypeError, msg);
+        }
+        if (!PyArray_EquivTypenums(arr_type, numeric_type))
+        {
+
+        const char* type_names[23] = {"bool", "byte", "ubyte","short", "ushort",
+                                "int", "uint", "long", "ulong", "longlong", "ulonglong",
+                                "float", "double", "longdouble", "cfloat", "cdouble",
+                                "clongdouble", "object", "string", "unicode", "void", "ntype",
+                                "unknown"};
+        char msg[500];
+        sprintf(msg,"Conversion Error: received '%s' typed array instead of '%s' typed array for variable '%s'",
+                type_names[arr_type],type_names[numeric_type],name);
+        throw_error(PyExc_TypeError,msg);
+        }
+    }
+
+    void numpy_check_type(PyArrayObject* arr_obj, int numeric_type, const char* name)
+    {
+        // Make sure input has correct numeric type.
+        int arr_type = arr_obj->descr->type_num;
+        if (PyTypeNum_ISEXTENDED(numeric_type))
+        {
+        char msg[80];
+        sprintf(msg, "Conversion Error: extended types not supported for variable '%s'",
+                name);
+        throw_error(PyExc_TypeError, msg);
+        }
+        if (!PyArray_EquivTypenums(arr_type, numeric_type))
+        {
+            const char* type_names[23] = {"bool", "byte", "ubyte","short", "ushort",
+                                    "int", "uint", "long", "ulong", "longlong", "ulonglong",
+                                    "float", "double", "longdouble", "cfloat", "cdouble",
+                                    "clongdouble", "object", "string", "unicode", "void", "ntype",
+                                    "unknown"};
+            char msg[500];
+            sprintf(msg,"received '%s' typed array instead of '%s' typed array for variable '%s'",
+                    type_names[arr_type],type_names[numeric_type],name);
+            throw_error(PyExc_TypeError,msg);
+        }
+    }
+};
+
+numpy_type_handler x__numpy_type_handler = numpy_type_handler();
+#define conversion_numpy_check_type x__numpy_type_handler.conversion_numpy_check_type
+#define numpy_check_type x__numpy_type_handler.numpy_check_type
+
+
+class numpy_handler
+{
+public:
+    PyArrayObject* convert_to_numpy(PyObject* py_obj, const char* name)
+    {
+        // Incref occurs even if conversion fails so that
+        // the decref in cleanup_code has a matching incref.
+        Py_XINCREF(py_obj);
+        if (!py_obj || !PyArray_Check(py_obj))
+            handle_conversion_error(py_obj,"numpy", name);
+        return (PyArrayObject*) py_obj;
+    }
+
+    PyArrayObject* py_to_numpy(PyObject* py_obj, const char* name)
+    {
+        // !! Pretty sure INCREF should only be called on success since
+        // !! py_to_xxx is used by the user -- not the code generator.
+        if (!py_obj || !PyArray_Check(py_obj))
+            handle_bad_type(py_obj,"numpy", name);
+        Py_XINCREF(py_obj);
+        return (PyArrayObject*) py_obj;
+    }
+};
+
+numpy_handler x__numpy_handler = numpy_handler();
+#define convert_to_numpy(py_obj,name) \
+        x__numpy_handler.convert_to_numpy(py_obj,name)
+#define py_to_numpy(py_obj,name) \
+        x__numpy_handler.py_to_numpy(py_obj,name)
+
+
+PyObject* numpy_to_py(PyObject* obj)
+{
+    return (PyObject*) obj;
+}
+
+
+class catchall_handler
+{
+public:
+    py::object convert_to_catchall(PyObject* py_obj, const char* name)
+    {
+        // Incref occurs even if conversion fails so that
+        // the decref in cleanup_code has a matching incref.
+        
+        if (!py_obj || !(py_obj))
+            handle_conversion_error(py_obj,"catchall", name);
+        return py::object(py_obj);
+    }
+
+    py::object py_to_catchall(PyObject* py_obj, const char* name)
+    {
+        // !! Pretty sure INCREF should only be called on success since
+        // !! py_to_xxx is used by the user -- not the code generator.
+        if (!py_obj || !(py_obj))
+            handle_bad_type(py_obj,"catchall", name);
+        
+        return py::object(py_obj);
+    }
+};
+
+catchall_handler x__catchall_handler = catchall_handler();
+#define convert_to_catchall(py_obj,name) \
+        x__catchall_handler.convert_to_catchall(py_obj,name)
+#define py_to_catchall(py_obj,name) \
+        x__catchall_handler.py_to_catchall(py_obj,name)
+
+
+PyObject* catchall_to_py(PyObject* obj)
+{
+    return (PyObject*) obj;
+}
+
+
+
+static PyObject* multifunctionalmodel(PyObject*self, PyObject* args, PyObject* kywds)
+{
+    py::object return_val;
+    int exception_occured = 0;
+    PyObject *py_local_dict = NULL;
+    static char *kwlist[] = {"x","n","rad_core","sld","thick","slope","fun_type","local_dict", NULL};
+    PyObject *py_x, *py_n, *py_rad_core, *py_sld, *py_thick, *py_slope, *py_fun_type;
+    int x_used, n_used, rad_core_used, sld_used, thick_used, slope_used, fun_type_used;
+    py_x = py_n = py_rad_core = py_sld = py_thick = py_slope = py_fun_type = NULL;
+    x_used= n_used= rad_core_used= sld_used= thick_used= slope_used= fun_type_used = 0;
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kywds,"OOOOOOO|O:multifunctionalmodel",kwlist,&py_x, &py_n, &py_rad_core, &py_sld, &py_thick, &py_slope, &py_fun_type, &py_local_dict))
+       return NULL;
+    try                              
+    {                                
+        py_x = py_x;
+        double x = convert_to_float(py_x,"x");
+        x_used = 1;
+        py_n = py_n;
+        int n = convert_to_int(py_n,"n");
+        n_used = 1;
+        py_rad_core = py_rad_core;
+        double rad_core = convert_to_float(py_rad_core,"rad_core");
+        rad_core_used = 1;
+        py_sld = py_sld;
+        PyArrayObject* sld_array = convert_to_numpy(py_sld,"sld");
+        conversion_numpy_check_type(sld_array,PyArray_DOUBLE,"sld");
+        #define SLD1(i) (*((double*)(sld_array->data + (i)*Ssld[0])))
+        #define SLD2(i,j) (*((double*)(sld_array->data + (i)*Ssld[0] + (j)*Ssld[1])))
+        #define SLD3(i,j,k) (*((double*)(sld_array->data + (i)*Ssld[0] + (j)*Ssld[1] + (k)*Ssld[2])))
+        #define SLD4(i,j,k,l) (*((double*)(sld_array->data + (i)*Ssld[0] + (j)*Ssld[1] + (k)*Ssld[2] + (l)*Ssld[3])))
+        npy_intp* Nsld = sld_array->dimensions;
+        npy_intp* Ssld = sld_array->strides;
+        int Dsld = sld_array->nd;
+        double* sld = (double*) sld_array->data;
+        sld_used = 1;
+        py_thick = py_thick;
+        PyArrayObject* thick_array = convert_to_numpy(py_thick,"thick");
+        conversion_numpy_check_type(thick_array,PyArray_DOUBLE,"thick");
+        #define THICK1(i) (*((double*)(thick_array->data + (i)*Sthick[0])))
+        #define THICK2(i,j) (*((double*)(thick_array->data + (i)*Sthick[0] + (j)*Sthick[1])))
+        #define THICK3(i,j,k) (*((double*)(thick_array->data + (i)*Sthick[0] + (j)*Sthick[1] + (k)*Sthick[2])))
+        #define THICK4(i,j,k,l) (*((double*)(thick_array->data + (i)*Sthick[0] + (j)*Sthick[1] + (k)*Sthick[2] + (l)*Sthick[3])))
+        npy_intp* Nthick = thick_array->dimensions;
+        npy_intp* Sthick = thick_array->strides;
+        int Dthick = thick_array->nd;
+        double* thick = (double*) thick_array->data;
+        thick_used = 1;
+        py_slope = py_slope;
+        PyArrayObject* slope_array = convert_to_numpy(py_slope,"slope");
+        conversion_numpy_check_type(slope_array,PyArray_DOUBLE,"slope");
+        #define SLOPE1(i) (*((double*)(slope_array->data + (i)*Sslope[0])))
+        #define SLOPE2(i,j) (*((double*)(slope_array->data + (i)*Sslope[0] + (j)*Sslope[1])))
+        #define SLOPE3(i,j,k) (*((double*)(slope_array->data + (i)*Sslope[0] + (j)*Sslope[1] + (k)*Sslope[2])))
+        #define SLOPE4(i,j,k,l) (*((double*)(slope_array->data + (i)*Sslope[0] + (j)*Sslope[1] + (k)*Sslope[2] + (l)*Sslope[3])))
+        npy_intp* Nslope = slope_array->dimensions;
+        npy_intp* Sslope = slope_array->strides;
+        int Dslope = slope_array->nd;
+        double* slope = (double*) slope_array->data;
+        slope_used = 1;
+        py_fun_type = py_fun_type;
+        PyArrayObject* fun_type_array = convert_to_numpy(py_fun_type,"fun_type");
+        conversion_numpy_check_type(fun_type_array,PyArray_LONG,"fun_type");
+        #define FUN_TYPE1(i) (*((long*)(fun_type_array->data + (i)*Sfun_type[0])))
+        #define FUN_TYPE2(i,j) (*((long*)(fun_type_array->data + (i)*Sfun_type[0] + (j)*Sfun_type[1])))
+        #define FUN_TYPE3(i,j,k) (*((long*)(fun_type_array->data + (i)*Sfun_type[0] + (j)*Sfun_type[1] + (k)*Sfun_type[2])))
+        #define FUN_TYPE4(i,j,k,l) (*((long*)(fun_type_array->data + (i)*Sfun_type[0] + (j)*Sfun_type[1] + (k)*Sfun_type[2] + (l)*Sfun_type[3])))
+        npy_intp* Nfun_type = fun_type_array->dimensions;
+        npy_intp* Sfun_type = fun_type_array->strides;
+        int Dfun_type = fun_type_array->nd;
+        long* fun_type = (long*) fun_type_array->data;
+        fun_type_used = 1;
+        /*<function call here>*/     
+        
+                            double bes,fun,alpha,beta,f,vol,qr,r,contr,f2;
+                            double pi;
+                            int i,j;
+            
+                            pi = 4.0 * atan(1.0);  
+                            f = 0.0;
+                            r = rad_core;
+                            for (i =0; i<= n+1; i++){
+                                switch(fun_type[i])
+                                {
+                                    case 'exp' :
+                                                contr = sld[i]*exp(-slope[i]*r);
+                                                for (j=0; j<2; j++){
+                                                    if ( i == 0 && j == 0){
+                                                        continue;
+                                                        }
+                                                    if (i == n+1 && j == 1){
+                                                        continue;
+                                                        }
+                                                    if ( j == 1){
+                                                        r += thick[i];
+                                                        }
+                                                    qr = x * r;
+                                                    alpha = slope[i] * r;
+                                                    fun = 0.0;
+                                                    if(qr == 0.0){
+                                                        bes = - 1.0;
+                                                        }
+                                                    else{
+                                                        if (fabs(slope[i]) > 0.0 ){
+                                                            fun = 3.0 * ((alpha*alpha - qr * qr) * sin(beta) - 2.0 * alpha * qr * cos(qr))/ ((alpha * alpha + qr * qr) * (alpha * alpha + qr * qr) * qr);
+                                                            bes = -3.0 * (alpha * sin(qr) - qr * cos(qr)) / ((alpha * alpha + qr * qr) * qr);
+                                                            }
+                                                        else {
+                                                            bes = - 3.0 * (sin(qr) - qr * cos(qr)) / (qr * qr * qr);
+                                                            }
+                                                        }
+                                                    contr *= exp(alpha);
+                                                    if (j == 1){
+                                                        bes = - bes;
+                                                        fun = - fun;
+                                                        }                            
+                                                    vol = 4.0 * pi / 3.0 * r * r * r;
+                                                    f += vol * contr * (bes + fun); 
+                                                    }
+                                                    break;
+                                    default :
+                                                contr = sld[i]-slope[i]*r;
+                                                for (j=0; j<2; j++){
+                                                    if ( i == 0 && j == 0){
+                                                        continue;
+                                                        }
+                                                    if (i == n+1 && j == 1){
+                                                        continue;
+                                                        }
+                                                    if ( j == 1){
+                                                        r += thick[i];
+                                                        }
+                                                    qr = x * r;
+                                                    fun = 0.0;
+                                                    if(qr == 0.0){
+                                                        bes = - 1.0;
+                                                        }
+                                                    else{
+                                                        bes = - 3.0 * (sin(qr) - qr * cos(qr)) / (qr * qr * qr);
+                                                        if (fabs(slope[i]) > 0.0 ){
+                                                            fun = -3.0 * r * (2.0*qr*sin(qr)-((qr*qr)-2.0)*cos(qr))/(qr * qr * qr * qr);
+                                                            }
+                                                        }
+                                                    if (j == 1){
+                                                        bes = - bes;
+                                                        fun = - fun;
+                                                        }                            
+                                                    vol = 4.0 * pi / 3.0 * r * r * r;
+                                                    f += vol * (bes * contr + fun * slope[i]); 
+                                                    }
+                                                    break;
+        
+                                        }
+                                }  
+                            f2 = f * f / vol * 1.0e8;
+                            return_val=f2;
+        if(py_local_dict)                                  
+        {                                                  
+            py::dict local_dict = py::dict(py_local_dict); 
+        }                                                  
+    
+    }                                
+    catch(...)                       
+    {                                
+        return_val =  py::object();      
+        exception_occured = 1;       
+    }                                
+    /*cleanup code*/                     
+    if(sld_used)
+    {
+        Py_XDECREF(py_sld);
+        #undef SLD1
+        #undef SLD2
+        #undef SLD3
+        #undef SLD4
+    }
+    if(thick_used)
+    {
+        Py_XDECREF(py_thick);
+        #undef THICK1
+        #undef THICK2
+        #undef THICK3
+        #undef THICK4
+    }
+    if(slope_used)
+    {
+        Py_XDECREF(py_slope);
+        #undef SLOPE1
+        #undef SLOPE2
+        #undef SLOPE3
+        #undef SLOPE4
+    }
+    if(fun_type_used)
+    {
+        Py_XDECREF(py_fun_type);
+        #undef FUN_TYPE1
+        #undef FUN_TYPE2
+        #undef FUN_TYPE3
+        #undef FUN_TYPE4
+    }
+    if(!(PyObject*)return_val && !exception_occured)
+    {
+                                  
+        return_val = Py_None;            
+    }
+                                  
+    return return_val.disown();           
+}                                
+
+
+static PyMethodDef compiled_methods[] = 
+{
+    {"multifunctionalmodel",(PyCFunction)multifunctionalmodel , METH_VARARGS|METH_KEYWORDS},
+    {NULL,      NULL}        /* Sentinel */
+};
+
+PyMODINIT_FUNC initmodel_func_ext(void)
+{
+    
+    Py_Initialize();
+    import_array();
+    PyImport_ImportModule("numpy");
+    (void) Py_InitModule("model_func_ext", compiled_methods);
+}
+
+#ifdef __CPLUSCPLUS__
+}
+#endif
