Index: sansmodels/src/sans/models/c_extensions/CGaussian.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CGaussian.c	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ 	(revision )
@@ -1,290 +1,0 @@
-/** CGaussian
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY gaussian.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 "gaussian.h"
-
-/// Error object for raised exceptions
-static PyObject * CGaussianError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	GaussianParameters model_pars;
-} CGaussian;
-
-
-static void
-CGaussian_dealloc(CGaussian* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CGaussian_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CGaussian *self;
-    
-    self = (CGaussian *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CGaussian_init(CGaussian *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,"sigma",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"center",Py_BuildValue("d",0.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CGaussian_members[] = {
-    {"params", T_OBJECT, offsetof(CGaussian, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CGaussian, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CGaussian_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(CGaussian *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.sigma = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sigma") );
-    self->model_pars.center = PyFloat_AsDouble( PyDict_GetItemString(self->params, "center") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CGaussianError, 
-	    	"CGaussian.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(CGaussianError, 
-	    		"CGaussian.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 = CGaussian_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CGaussian_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",gaussian_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CGaussian_readDouble(pars);		
-		
-		return Py_BuildValue("d",gaussian_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(CGaussian *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.sigma = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sigma") );
-    self->model_pars.center = PyFloat_AsDouble( PyDict_GetItemString(self->params, "center") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CGaussianError, 
-	    	"CGaussian.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(CGaussianError, 
-	    		"CGaussian.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 = CGaussian_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CGaussian_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",gaussian_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CGaussian_readDouble(pars);		
-		
-		return Py_BuildValue("d",gaussian_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CGaussian *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CGaussian_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 CGaussianType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CGaussian",             /*tp_name*/
-    sizeof(CGaussian),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CGaussian_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*/
-    "CGaussian objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CGaussian_methods,             /* tp_methods */
-    CGaussian_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CGaussian_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CGaussian_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 addCGaussian(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CGaussianType) < 0)
-        return;
-
-    Py_INCREF(&CGaussianType);
-    PyModule_AddObject(module, "CGaussian", (PyObject *)&CGaussianType);
-    
-    d = PyModule_GetDict(module);
-    CGaussianError = PyErr_NewException("CGaussian.error", NULL, NULL);
-    PyDict_SetItemString(d, "CGaussianError", CGaussianError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CLogNormal.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CLogNormal.c	(revision a352912951ed8d327d5624fd9d6c1202fe32c0ee)
+++ 	(revision )
@@ -1,290 +1,0 @@
-/** CLogNormal
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY logNormal.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 "logNormal.h"
-
-/// Error object for raised exceptions
-static PyObject * CLogNormalError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	LogNormalParameters model_pars;
-} CLogNormal;
-
-
-static void
-CLogNormal_dealloc(CLogNormal* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CLogNormal_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CLogNormal *self;
-    
-    self = (CLogNormal *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CLogNormal_init(CLogNormal *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,"sigma",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"center",Py_BuildValue("d",0.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CLogNormal_members[] = {
-    {"params", T_OBJECT, offsetof(CLogNormal, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CLogNormal, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CLogNormal_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(CLogNormal *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.sigma = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sigma") );
-    self->model_pars.center = PyFloat_AsDouble( PyDict_GetItemString(self->params, "center") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CLogNormalError, 
-	    	"CLogNormal.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(CLogNormalError, 
-	    		"CLogNormal.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 = CLogNormal_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CLogNormal_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",logNormal_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CLogNormal_readDouble(pars);		
-		
-		return Py_BuildValue("d",logNormal_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(CLogNormal *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.sigma = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sigma") );
-    self->model_pars.center = PyFloat_AsDouble( PyDict_GetItemString(self->params, "center") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CLogNormalError, 
-	    	"CLogNormal.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(CLogNormalError, 
-	    		"CLogNormal.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 = CLogNormal_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CLogNormal_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",logNormal_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CLogNormal_readDouble(pars);		
-		
-		return Py_BuildValue("d",logNormal_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CLogNormal *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CLogNormal_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 CLogNormalType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CLogNormal",             /*tp_name*/
-    sizeof(CLogNormal),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CLogNormal_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*/
-    "CLogNormal objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CLogNormal_methods,             /* tp_methods */
-    CLogNormal_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CLogNormal_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CLogNormal_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 addCLogNormal(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CLogNormalType) < 0)
-        return;
-
-    Py_INCREF(&CLogNormalType);
-    PyModule_AddObject(module, "CLogNormal", (PyObject *)&CLogNormalType);
-    
-    d = PyModule_GetDict(module);
-    CLogNormalError = PyErr_NewException("CLogNormal.error", NULL, NULL);
-    PyDict_SetItemString(d, "CLogNormalError", CLogNormalError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CLorentzian.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CLorentzian.c	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ 	(revision )
@@ -1,290 +1,0 @@
-/** CLorentzian
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY lorentzian.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 "lorentzian.h"
-
-/// Error object for raised exceptions
-static PyObject * CLorentzianError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	LorentzianParameters model_pars;
-} CLorentzian;
-
-
-static void
-CLorentzian_dealloc(CLorentzian* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CLorentzian_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CLorentzian *self;
-    
-    self = (CLorentzian *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CLorentzian_init(CLorentzian *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,"center",Py_BuildValue("d",0.000000));
-        PyDict_SetItemString(self->params,"gamma",Py_BuildValue("d",1.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CLorentzian_members[] = {
-    {"params", T_OBJECT, offsetof(CLorentzian, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CLorentzian, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CLorentzian_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(CLorentzian *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.center = PyFloat_AsDouble( PyDict_GetItemString(self->params, "center") );
-    self->model_pars.gamma = PyFloat_AsDouble( PyDict_GetItemString(self->params, "gamma") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CLorentzianError, 
-	    	"CLorentzian.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(CLorentzianError, 
-	    		"CLorentzian.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 = CLorentzian_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CLorentzian_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",lorentzian_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CLorentzian_readDouble(pars);		
-		
-		return Py_BuildValue("d",lorentzian_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(CLorentzian *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.center = PyFloat_AsDouble( PyDict_GetItemString(self->params, "center") );
-    self->model_pars.gamma = PyFloat_AsDouble( PyDict_GetItemString(self->params, "gamma") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CLorentzianError, 
-	    	"CLorentzian.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(CLorentzianError, 
-	    		"CLorentzian.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 = CLorentzian_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CLorentzian_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",lorentzian_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CLorentzian_readDouble(pars);		
-		
-		return Py_BuildValue("d",lorentzian_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CLorentzian *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CLorentzian_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 CLorentzianType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CLorentzian",             /*tp_name*/
-    sizeof(CLorentzian),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CLorentzian_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*/
-    "CLorentzian objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CLorentzian_methods,             /* tp_methods */
-    CLorentzian_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CLorentzian_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CLorentzian_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 addCLorentzian(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CLorentzianType) < 0)
-        return;
-
-    Py_INCREF(&CLorentzianType);
-    PyModule_AddObject(module, "CLorentzian", (PyObject *)&CLorentzianType);
-    
-    d = PyModule_GetDict(module);
-    CLorentzianError = PyErr_NewException("CLorentzian.error", NULL, NULL);
-    PyDict_SetItemString(d, "CLorentzianError", CLorentzianError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CMultiShellModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CMultiShellModel.c	(revision e0a8a3ccbb7fa14ab3d063bb6214bb4828593f76)
+++ 	(revision )
@@ -1,305 +1,0 @@
-/** CMultiShellModel
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY multishell.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 "multishell.h"
-
-/// Error object for raised exceptions
-static PyObject * CMultiShellModelError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	MultiShellParameters model_pars;
-} CMultiShellModel;
-
-
-static void
-CMultiShellModel_dealloc(CMultiShellModel* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CMultiShellModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CMultiShellModel *self;
-    
-    self = (CMultiShellModel *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CMultiShellModel_init(CMultiShellModel *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",60.000000));
-        PyDict_SetItemString(self->params,"n_pairs",Py_BuildValue("d",2.000000));
-        PyDict_SetItemString(self->params,"w_thickness",Py_BuildValue("d",10.000000));
-        PyDict_SetItemString(self->params,"s_thickness",Py_BuildValue("d",10.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 CMultiShellModel_members[] = {
-    {"params", T_OBJECT, offsetof(CMultiShellModel, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CMultiShellModel, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CMultiShellModel_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(CMultiShellModel *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.n_pairs = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_pairs") );
-    self->model_pars.w_thickness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "w_thickness") );
-    self->model_pars.s_thickness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "s_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(CMultiShellModelError, 
-	    	"CMultiShellModel.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(CMultiShellModelError, 
-	    		"CMultiShellModel.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 = CMultiShellModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CMultiShellModel_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",multishell_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CMultiShellModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",multishell_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(CMultiShellModel *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.n_pairs = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_pairs") );
-    self->model_pars.w_thickness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "w_thickness") );
-    self->model_pars.s_thickness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "s_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(CMultiShellModelError, 
-	    	"CMultiShellModel.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(CMultiShellModelError, 
-	    		"CMultiShellModel.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 = CMultiShellModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CMultiShellModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",multishell_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CMultiShellModel_readDouble(pars);		
-		
-		return Py_BuildValue("d",multishell_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CMultiShellModel *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CMultiShellModel_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 CMultiShellModelType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CMultiShellModel",             /*tp_name*/
-    sizeof(CMultiShellModel),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CMultiShellModel_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*/
-    "CMultiShellModel objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CMultiShellModel_methods,             /* tp_methods */
-    CMultiShellModel_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CMultiShellModel_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CMultiShellModel_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 addCMultiShellModel(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CMultiShellModelType) < 0)
-        return;
-
-    Py_INCREF(&CMultiShellModelType);
-    PyModule_AddObject(module, "CMultiShellModel", (PyObject *)&CMultiShellModelType);
-    
-    d = PyModule_GetDict(module);
-    CMultiShellModelError = PyErr_NewException("CMultiShellModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CMultiShellModelError", CMultiShellModelError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/CSchulz.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CSchulz.c	(revision eba988511d86410985b5a1c35ce70dd3968132a8)
+++ 	(revision )
@@ -1,290 +1,0 @@
-/** CSchulz
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY schulz.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 "schulz.h"
-
-/// Error object for raised exceptions
-static PyObject * CSchulzError = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	SchulzParameters model_pars;
-} CSchulz;
-
-
-static void
-CSchulz_dealloc(CSchulz* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    
-
-}
-
-static PyObject *
-CSchulz_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    CSchulz *self;
-    
-    self = (CSchulz *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-CSchulz_init(CSchulz *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,"sigma",Py_BuildValue("d",1.000000));
-        PyDict_SetItemString(self->params,"center",Py_BuildValue("d",0.000000));
-
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        
-
-    }
-    return 0;
-}
-
-static PyMemberDef CSchulz_members[] = {
-    {"params", T_OBJECT, offsetof(CSchulz, params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof(CSchulz, log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double CSchulz_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(CSchulz *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.sigma = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sigma") );
-    self->model_pars.center = PyFloat_AsDouble( PyDict_GetItemString(self->params, "center") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CSchulzError, 
-	    	"CSchulz.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(CSchulzError, 
-	    		"CSchulz.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 = CSchulz_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CSchulz_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",schulz_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = CSchulz_readDouble(pars);		
-		
-		return Py_BuildValue("d",schulz_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(CSchulz *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.sigma = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sigma") );
-    self->model_pars.center = PyFloat_AsDouble( PyDict_GetItemString(self->params, "center") );
-
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CSchulzError, 
-	    	"CSchulz.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(CSchulzError, 
-	    		"CSchulz.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 = CSchulz_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CSchulz_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",schulz_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = CSchulz_readDouble(pars);		
-		
-		return Py_BuildValue("d",schulz_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset(CSchulz *self, PyObject *args) {
-    
-
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef CSchulz_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 CSchulzType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "CSchulz",             /*tp_name*/
-    sizeof(CSchulz),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)CSchulz_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*/
-    "CSchulz objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    CSchulz_methods,             /* tp_methods */
-    CSchulz_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)CSchulz_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    CSchulz_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 addCSchulz(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&CSchulzType) < 0)
-        return;
-
-    Py_INCREF(&CSchulzType);
-    PyModule_AddObject(module, "CSchulz", (PyObject *)&CSchulzType);
-    
-    d = PyModule_GetDict(module);
-    CSchulzError = PyErr_NewException("CSchulz.error", NULL, NULL);
-    PyDict_SetItemString(d, "CSchulzError", CSchulzError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/DiamCyl.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/DiamCyl.c	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ 	(revision )
@@ -1,38 +1,0 @@
-/**
- * SquareWell Structure factor
- * @author: Jae Hie Cho / UTK
- */
-
-#include "DiamCyl.h"
-#include "libStructureFactor.h"
-#include <math.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the DiaEllip
- * @param q: q-value ; NOT used
- * @return: 2 virial coefficient value
- */
-double DiamCyld_analytical_1D(DiamCyldParameters *pars, double q) {
-	double cylh;
-	double cylr;
-
-	cylr = pars->radius;
-	cylh = pars->length;
-	return DiamCyl(cylh, cylr);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the RadiEllip
- * @param q: q-value
- * @return: function value
- */
-double DiamCyld_analytical_2D(DiamCyldParameters *pars, double q, double phi) {
-	return DiamCyld_analytical_1D(pars,q);
-}
-
-double DiamCyld_analytical_2DXY(DiamCyldParameters *pars, double qx, double qy){
-	return DiamCyld_analytical_1D(pars,sqrt(qx*qx+qy*qy));
-}
Index: sansmodels/src/sans/models/c_extensions/DiamCyl.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/DiamCyl.h	(revision cabe74bf343c045ec7fcc1de8a7fdc9065ccb5cb)
+++ sansmodels/src/sans/models/c_extensions/DiamCyl.h	(revision e369627df1a0b85dc6129d8e7ee7ed8fe1db27e9)
@@ -30,9 +30,9 @@
 
 /// 1D scattering function
-double DiamCyld_analytical_1D(DiamCyldParameters *pars, double q);
+//double DiamCyld_analytical_1D(DiamCyldParameters *pars, double q);
 
 /// 2D scattering function
-double DiamCyld_analytical_2D(DiamCyldParameters *pars, double q, double phi);
-double DiamCyld_analytical_2DXY(DiamCyldParameters *pars, double qx, double qy);
+//double DiamCyld_analytical_2D(DiamCyldParameters *pars, double q, double phi);
+//double DiamCyld_analytical_2DXY(DiamCyldParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/DiamEllip.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/DiamEllip.c	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/**
- * SquareWell Structure factor
- * @author: Jae Hie Cho / UTK
- */
-
-#include "DiamEllip.h"
-#include "libStructureFactor.h"
-#include <math.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the DiaEllip
- * @param q: q-value
- * @return: 2 virial coefficient value
- */
-double DiamEllips_analytical_1D(DiamEllipsParameters *pars, double q) {
-	double ell_a, ell_b;
-
-	ell_a = pars->radius_a;
-	ell_b = pars->radius_b;
-	return DiamEllip(ell_a, ell_b);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the RadiEllip
- * @param q: q-value
- * @return: function value
- */
-double DiamEllips_analytical_2D(DiamEllipsParameters *pars, double q, double phi) {
-	return DiamEllips_analytical_1D(pars,q);
-}
-
-double DiamEllips_analytical_2DXY(DiamEllipsParameters *pars, double qx, double qy){
-	return DiamEllips_analytical_1D(pars,sqrt(qx*qx+qy*qy));
-}
Index: sansmodels/src/sans/models/c_extensions/DiamEllip.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/DiamEllip.h	(revision cabe74bf343c045ec7fcc1de8a7fdc9065ccb5cb)
+++ sansmodels/src/sans/models/c_extensions/DiamEllip.h	(revision e369627df1a0b85dc6129d8e7ee7ed8fe1db27e9)
@@ -34,9 +34,9 @@
 
 /// 1D scattering function
-double DiamEllips_analytical_1D(DiamEllipsParameters *pars, double q);
+//double DiamEllips_analytical_1D(DiamEllipsParameters *pars, double q);
 
 /// 2D scattering function
-double DiamEllips_analytical_2D(DiamEllipsParameters *pars, double q, double phi);
-double DiamEllips_analytical_2DXY(DiamEllipsParameters *pars, double qx, double qy);
+//double DiamEllips_analytical_2D(DiamEllipsParameters *pars, double q, double phi);
+//double DiamEllips_analytical_2DXY(DiamEllipsParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/Hardsphere.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/Hardsphere.c	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/**
- * Structure factor for a hardsphere
- * @author: Jae Hie Cho / UTK
- */
-
-#include "Hardsphere.h"
-#include "libStructureFactor.h"
-#include <math.h>
-#include <stdio.h>
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the HardsphereStructure
- * @param q: q-value
- * @return: function value
- */
-double Hardsphere_analytical_1D(HardsphereParameters *pars, double q) {
-	double dp[2];
-	if (q == 0){
-		return 0.2;
-	}
-	dp[0] = pars->effect_radius;
-	dp[1] = pars->volfraction;
-	return HardSphereStruct(dp, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the HardsphereStructure
- * @param q: q-value
- * @return: function value
- */
-double Hardsphere_analytical_2D(HardsphereParameters *pars, double q, double phi) {
-	return Hardsphere_analytical_1D(pars,q);
-}
-
-double Hardsphere_analytical_2DXY(HardsphereParameters *pars, double qx, double qy){
-	return Hardsphere_analytical_1D(pars,sqrt(qx*qx+qy*qy));
-}
Index: sansmodels/src/sans/models/c_extensions/Hardsphere.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/Hardsphere.h	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_extensions/Hardsphere.h	(revision e369627df1a0b85dc6129d8e7ee7ed8fe1db27e9)
@@ -36,9 +36,9 @@
 
 /// 1D scattering function
-double Hardsphere_analytical_1D(HardsphereParameters *pars, double q);
+//double Hardsphere_analytical_1D(HardsphereParameters *pars, double q);
 
 /// 2D scattering function
-double Hardsphere_analytical_2D(HardsphereParameters *pars, double q, double phi);
-double Hardsphere_analytical_2DXY(HardsphereParameters *pars, double qx, double qy);
+//double Hardsphere_analytical_2D(HardsphereParameters *pars, double q, double phi);
+//double Hardsphere_analytical_2DXY(HardsphereParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/HayterMSA.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/HayterMSA.c	(revision c724ccd87499a21402fee0d11d517066f99ddf9b)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/**
- * SquareWell Structure factor
- * @author: Jae Hie Cho / UTK
- */
-
-#include "HayterMSA.h"
-#include "libStructureFactor.h"
-#include <math.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the HayterPenfoldMSA
- * @param q: q-value
- * @return: function value
- */
-
-double HayterMSA_analytical_1D(HayterMSAParameters *pars, double q) {
-	double dp[6];
-	//Hayer takes diameter.
-	dp[0] = 2.0 * pars->effect_radius;
-	dp[1] = fabs(pars->charge);
-	dp[2] = pars->volfraction;
-	dp[3] = pars->temperature;
-	dp[4] = pars->saltconc;
-	dp[5] = pars->dielectconst;
-
-	return HayterPenfoldMSA(dp, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the HayterPenfoldMSA
- * @param q: q-value
- * @return: function value
- */
-double HayterMSA_analytical_2D(HayterMSAParameters *pars, double q, double phi) {
-	return HayterMSA_analytical_1D(pars,q);
-}
-
-double HayterMSA_analytical_2DXY(HayterMSAParameters *pars, double qx, double qy){
-	return HayterMSA_analytical_1D(pars,sqrt(qx*qx+qy*qy));
-}
Index: sansmodels/src/sans/models/c_extensions/HayterMSA.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/HayterMSA.h	(revision 8b677ec179ed4330f2cd7aa10775e6423875e7ad)
+++ sansmodels/src/sans/models/c_extensions/HayterMSA.h	(revision e369627df1a0b85dc6129d8e7ee7ed8fe1db27e9)
@@ -51,9 +51,9 @@
 
 /// 1D scattering function
-double HayterMSA_analytical_1D(HayterMSAParameters *pars, double q);
+//double HayterMSA_analytical_1D(HayterMSAParameters *pars, double q);
 
 /// 2D scattering function
-double HayterMSA_analytical_2D(HayterMSAParameters *pars, double q, double phi);
-double HayterMSA_analytical_2DXY(HayterMSAParameters *pars, double qx, double qy);
+//double HayterMSA_analytical_2D(HayterMSAParameters *pars, double q, double phi);
+//double HayterMSA_analytical_2DXY(HayterMSAParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/SquareWell.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/SquareWell.c	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/**
- * SquareWell Structure factor
- * @author: Jae Hie Cho / UTK
- */
-
-#include "SquareWell.h"
-#include "libStructureFactor.h"
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the SquareWellStruct
- * @param q: q-value
- * @return: function value
- */
-double SquareWell_analytical_1D(SquareWellParameters *pars, double q) {
-	double dp[4];
-
-	dp[0] = pars->effect_radius;
-	dp[1] = pars->volfraction;
-	dp[2] = pars->welldepth;
-	dp[3] = pars->wellwidth;
-
-	return SquareWellStruct(dp, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the SquareWellStruct
- * @param q: q-value
- * @return: function value
- */
-double SquareWell_analytical_2D(SquareWellParameters *pars, double q, double phi) {
-	return SquareWell_analytical_1D(pars,q);
-}
-
-double SquareWell_analytical_2DXY(SquareWellParameters *pars, double qx, double qy){
-	return SquareWell_analytical_1D(pars,sqrt(qx*qx+qy*qy));
-}
Index: sansmodels/src/sans/models/c_extensions/SquareWell.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/SquareWell.h	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_extensions/SquareWell.h	(revision e369627df1a0b85dc6129d8e7ee7ed8fe1db27e9)
@@ -49,9 +49,9 @@
 
 /// 1D scattering function
-double SquareWell_analytical_1D(SquareWellParameters *pars, double q);
+//double SquareWell_analytical_1D(SquareWellParameters *pars, double q);
 
 /// 2D scattering function
-double SquareWell_analytical_2D(SquareWellParameters *pars, double q, double phi);
-double SquareWell_analytical_2DXY(SquareWellParameters *pars, double qx, double qy);
+//double SquareWell_analytical_2D(SquareWellParameters *pars, double q, double phi);
+//double SquareWell_analytical_2DXY(SquareWellParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/StickyHS.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/StickyHS.c	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/**
- * Structure factor for a hardsphere
- * @author: Jae Hie Cho / UTK
- */
-
-#include "StickyHS.h"
-#include "libStructureFactor.h"
-#include <math.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the StickyHS_struct
- * @param q: q-value
- * @return: function value
- */
-double StickyHS_analytical_1D(StickyHSParameters *pars, double q) {
-	double dp[4];
-
-	dp[0] = pars->effect_radius;
-	dp[1] = pars->volfraction;
-	dp[2] = pars->perturb;
-	dp[3] = pars->stickiness;
-	return StickyHS_Struct(dp, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the StickyHS_struct
- * @param q: q-value
- * @return: function value
- */
-double StickyHS_analytical_2D(StickyHSParameters *pars, double q, double phi) {
-	return StickyHS_analytical_1D(pars,q);
-}
-
-double StickyHS_analytical_2DXY(StickyHSParameters *pars, double qx, double qy){
-	return StickyHS_analytical_1D(pars,sqrt(qx*qx+qy*qy));
-}
Index: sansmodels/src/sans/models/c_extensions/StickyHS.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/StickyHS.h	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_extensions/StickyHS.h	(revision e369627df1a0b85dc6129d8e7ee7ed8fe1db27e9)
@@ -46,9 +46,9 @@
 
 /// 1D scattering function
-double StickyHS_analytical_1D(StickyHSParameters *pars, double q);
+//double StickyHS_analytical_1D(StickyHSParameters *pars, double q);
 
 /// 2D scattering function
-double StickyHS_analytical_2D(StickyHSParameters *pars, double q, double phi);
-double StickyHS_analytical_2DXY(StickyHSParameters *pars, double qx, double qy);
+//double StickyHS_analytical_2D(StickyHSParameters *pars, double q, double phi);
+//double StickyHS_analytical_2DXY(StickyHSParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/WrapperGenerator.py
===================================================================
--- sansmodels/src/sans/models/c_extensions/WrapperGenerator.py	(revision 9316609c953db33f23a48a9b91ce5b283ea935f4)
+++ 	(revision )
@@ -1,374 +1,0 @@
-#!/usr/bin/env python
-""" WrapperGenerator class to generate model code automatically.
-"""
-
-import os, sys
-import re
-
-class WrapperGenerator:
-    """ Python wrapper generator for C models
-    
-        The developer must provide a header file describing 
-        the new model.
-        
-        To provide the name of the Python class to be
-        generated, the .h file must contain the following 
-        string in the comments:
-        
-        // [PYTHONCLASS] = my_model
-        
-        where my_model must be replaced by the name of the
-        class that you want to import from sans.models.
-        (example: [PYTHONCLASS] = MyModel
-          will create a class MyModel in sans.models.MyModel.
-          It will also create a class CMyModel in 
-          sans_extension.c_models.)
-          
-        Also in comments, each parameter of the params 
-        dictionary must be declared with a default value
-        in the following way:
-        
-        // [DEFAULT]=param_name=default_value
-        
-        (example:
-            //  [DEFAULT]=radius=20.0
-        )
-          
-        See cylinder.h for an example.
-        
-        
-        A .c file corresponding to the .h file should also
-        be provided (example: my_model.h, my_model.c).
-    
-        The .h file should define two function definitions. For example,
-        cylinder.h defines the following:
-        
-            /// 1D scattering function
-            double cylinder_analytical_1D(CylinderParameters *pars, double q);
-            
-            /// 2D scattering function
-            double cylinder_analytical_2D(CylinderParameters *pars, double q, double phi);
-            
-        The .c file implements those functions.
-        
-        @author: Mathieu Doucet / UTK
-        @contact: mathieu.doucet@nist.gov
-    """
-    
-    def __init__(self, filename):
-        """ Initialization """
-        
-        ## Name of .h file to generate wrapper from
-        self.file = filename
-        
-        # Info read from file
-        
-        ## Name of python class to write
-        self.pythonClass = None
-        ## Parser in struct section
-        self.inStruct = False
-        ## Name of struct for the c object
-        self.structName = None
-        ## Dictionary of parameters
-        self.params = {}
-        ## ModelCalculation module flag
-        self.modelCalcFlag = False
-        ## List of default parameters (text)
-        self.default_list = ""
-        ##description
-        self.description=''
-        ## Dictionary of units
-        self.details = ""
-        
-    def __repr__(self):
-        """ Simple output for printing """
-        
-        rep  = "Python class: %s\n" % self.pythonClass
-        rep += "  struc name: %s\n" % self.structName
-        rep += "  params:     %s\n" % self.params
-        rep += "  description: %s\n"% self.description
-        return rep
-        
-    def read(self):
-        """ Reads in the .h file to catch parameters of the wrapper """
-        
-        # Check if the file is there
-        if not os.path.isfile(self.file):
-            raise ValueError, "File %s is not a regular file" % self.file
-        
-        # Read file
-        f = open(self.file,'r')
-        buf = f.read()
-       
-        self.default_list = "List of default parameters:\n"
-        #lines = string.split(buf,'\n')
-        lines = buf.split('\n')
-        self.details  = "## Parameter details [units, min, max]\n"
-        self.details += "        self.details = {}\n"
-        # Catch Description
-        key = "[DESCRIPTION]"
-        find_description= 0
-        temp=""
-        for line in lines:
-            if line.count(key)>0 :
-                
-                try:
-                    find_description= 1
-                    index = line.index(key)
-                    toks = line[index:].split("=",1 )
-                    temp=toks[1].lstrip().rstrip()
-                    text='text'
-                    key2="<%s>"%text.lower()
-                    if re.match(key2,temp)!=None:
-                        #index2 = line.index(key2)
-                        #temp = temp[index2:]
-                        toks2=temp.split(key2,1)
-                        self.description=toks2[1]
-                        text='text'
-                        key2="</%s>"%text.lower()
-                        if re.search(key2,toks2[1])!=None:
-                            temp=toks2[1].split(key2,1)
-                            self.description=temp[0]
-                            break
-                        #print self.description
-                    else:
-                        self.description=temp
-                        break
-                except:
-                     raise ValueError, "Could not parse file %s" % self.file
-            elif find_description==1:
-                text='text'
-                key2="</%s>"%text.lower()
-                #print "second line",line,key2,re.search(key2,line)
-                if re.search(key2,line)!=None:
-                    tok=line.split(key2,1)
-                    temp=tok[0].split("//",1)
-                    self.description+=tok[1].lstrip().rstrip()
-                    break
-                else:
-                    #if re.search("*",line)!=None:
-                    #    temp=line.split("*",1)
-                    #    self.description+='\n'+temp[1].lstrip().rstrip()
-                    if re.search("//",line)!=None:
-                        temp=line.split("//",1)
-                        self.description+='\n\t\t'+temp[1].lstrip().rstrip()
-                        
-                    else:
-                        self.description+='\n\t\t'+line.lstrip().rstrip()
-                    
-                
-        for line in lines:
-            
-            # Catch class name
-            key = "[PYTHONCLASS]"
-            if line.count(key)>0:
-                try:
-                    index = line.index(key)
-                    #toks = string.split( line[index:], "=" )
-                    toks = line[index:].split("=" )
-                    self.pythonClass = toks[1].lstrip().rstrip()
-                except:
-                    raise ValueError, "Could not parse file %s" % self.file
-                
-            # Catch struct name
-            if line.count("typedef struct")>0:
-                # We are entering a struct block
-                self.inStruct = True
-            
-            if self.inStruct and line.count("}")>0:
-                # We are exiting a struct block
-                self.inStruct = False
-    
-                # Catch the name of the struct
-                index = line.index("}")
-                #toks = string.split(line[index+1:],";")
-                toks = line[index+1:].split(";")
-                # Catch pointer definition
-                #toks2 = string.split(toks[0],',')
-                toks2 = toks[0].split(',')
-                self.structName = toks2[0].lstrip().rstrip()
-          
-            # Catch struct content
-            key = "[DEFAULT]"
-            if self.inStruct and line.count(key)>0:
-                # Found a new parameter
-                try:
-                    index = line.index(key)
-                    toks = line[index:].split("=")
-                    toks2 = toks[2].split()
-                    val = float(toks2[0])
-                    self.params[toks[1]] = val
-                    #self.pythonClass = toks[1].lstrip().rstrip()
-                    units = ""
-                    if len(toks2) >= 2:
-                        units = toks2[1]
-                    self.default_list += "         %-15s = %s %s\n" % \
-                        (toks[1], val, units)
-                    
-                    # Check for min and max
-                    min = "None"
-                    max = "None"
-                    if len(toks2) == 4:
-                        min = toks2[2]
-                        max = toks2[3]
-                    
-                    self.details += "        self.details['%s'] = ['%s', %s, %s]\n" % \
-                        (toks[1].lstrip().rstrip(), units.lstrip().rstrip(), min, max)
-                except:
-                    raise ValueError, "Could not parse input file %s \n  %s" % \
-                        (self.file, sys.exc_value)
-                
-                
-            # Catch need for numerical calculations
-            key = "CalcParameters calcPars"
-            if line.count(key)>0:
-                self.modelCalcFlag = True
-            
-                
-                
-    def write_c_wrapper(self):
-        """ Writes the C file to create the python extension class 
-            The file is written in C[PYTHONCLASS].c
-        """
-        
-        file = open("C"+self.pythonClass+'.c', 'w')
-        template = open("classTemplate.txt", 'r')
-        
-        tmp_buf = template.read()
-        #tmp_lines = string.split(tmp_buf,'\n')
-        tmp_lines = tmp_buf.split('\n')
-        
-        for tmp_line in tmp_lines:
-            
-            # Catch class name
-            newline = self.replaceToken(tmp_line, 
-                                        "[PYTHONCLASS]", 'C'+self.pythonClass)
-            ##catch description
-            #newline = self.replaceToken(tmp_line, 
-            #                            "[DESCRIPTION]", self.description)
-            # Catch class name
-            newline = self.replaceToken(newline, 
-                                        "[MODELSTRUCT]", self.structName)
-            
-            # Dictionary initialization
-            param_str = "// Initialize parameter dictionary\n"
-            for par in self.params:
-                param_str += "        PyDict_SetItemString(self->params,\"%s\",Py_BuildValue(\"d\",%f));\n" % \
-                    (par, self.params[par])
-                
-            newline = self.replaceToken(newline,
-                                        "[INITDICTIONARY]", param_str)
-            
-            # Read dictionary
-            param_str = "// Reader parameter dictionary\n"
-            for par in self.params:
-                param_str += "    self->model_pars.%s = PyFloat_AsDouble( PyDict_GetItemString(self->params, \"%s\") );\n" % \
-                    (par, par)
-                
-            newline = self.replaceToken(newline, "[READDICTIONARY]", param_str)
-                
-            # Name of .c file
-            #toks = string.split(self.file,'.')
-            toks = self.file.split('.')
-            newline = self.replaceToken(newline, "[C_FILENAME]", toks[0])
-            
-            # Include file
-            newline = self.replaceToken(newline, 
-                                        "[INCLUDE_FILE]", self.file)           
-                
-            # Numerical calcs dealloc
-            dealloc_str = "\n"
-            if self.modelCalcFlag:
-                dealloc_str = "    modelcalculations_dealloc(&(self->model_pars.calcPars));\n"
-            newline = self.replaceToken(newline, 
-                                        "[NUMERICAL_DEALLOC]", dealloc_str)     
-                
-            # Numerical calcs init
-            init_str = "\n"
-            if self.modelCalcFlag:
-                init_str = "        modelcalculations_init(&(self->model_pars.calcPars));\n"
-            newline = self.replaceToken(newline, 
-                                        "[NUMERICAL_INIT]", init_str)     
-                
-            # Numerical calcs reset
-            reset_str = "\n"
-            if self.modelCalcFlag:
-                reset_str = "modelcalculations_reset(&(self->model_pars.calcPars));\n"
-            newline = self.replaceToken(newline, 
-                                        "[NUMERICAL_RESET]", reset_str)     
-                
-            # Write new line to the wrapper .c file
-            file.write(newline+'\n')
-            
-            
-        file.close()
-        
-    def write_python_wrapper(self):
-        """ Writes the python file to create the python extension class 
-            The file is written in ../[PYTHONCLASS].py
-        """
-        
-        file = open("../"+self.pythonClass+'.py', 'w')
-        template = open("modelTemplate.txt", 'r')
-        
-        tmp_buf = template.read()
-        tmp_lines = tmp_buf.split('\n')
-        
-        for tmp_line in tmp_lines:
-            
-            # Catch class name
-            newline = self.replaceToken(tmp_line, 
-                                        "[CPYTHONCLASS]", 'C'+self.pythonClass)
-            
-            # Catch class name
-            newline = self.replaceToken(newline, 
-                                        "[PYTHONCLASS]", self.pythonClass)
-            
-            # Include file
-            newline = self.replaceToken(newline, 
-                                        "[INCLUDE_FILE]", self.file)    
-                   
-            # Include file
-            newline = self.replaceToken(newline, 
-                                        "[DEFAULT_LIST]", self.default_list)
-            # Model Description
-            newline = self.replaceToken(newline, 
-                                        "[DESCRIPTION]", self.description)
-            # Parameter details
-            newline = self.replaceToken(newline, 
-                                        "[PAR_DETAILS]", self.details)
-            #print"write",tmp_line 
-            # Write new line to the wrapper .c file
-            file.write(newline+'\n')
-           
-        file.close()
-        
-        
-    def replaceToken(self, line, key, value): #pylint: disable-msg=R0201
-        """ Replace a token in the template file 
-            @param line: line of text to inspect
-            @param key: token to look for
-            @param value: string value to replace the token with
-            @return: new string value
-        """
-        lenkey = len(key)
-        newline = line
-        while newline.count(key)>0:
-            index = newline.index(key)
-            newline = newline[:index]+value+newline[index+lenkey:]
-        return newline
-        
-        
-# main
-if __name__ == '__main__':
-    if len(sys.argv)>1:
-        print "Will look for file %s" % sys.argv[1]
-        app = WrapperGenerator(sys.argv[1])
-    else:
-        app = WrapperGenerator("test.h")
-    app.read()
-    app.write_c_wrapper()
-    app.write_python_wrapper()
-    print app
-   
-# End of file        
Index: sansmodels/src/sans/models/c_extensions/binaryHS_PSF11.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/binaryHS_PSF11.c	(revision 2c4b289dd897e67655e7c208484ad09f086d1094)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/**
- * Scattering model for a sphere
- * @author: Gervaise B alina / UTK
- */
-
-#include "binaryHS_PSF11.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_PSF11_analytical_1D(BinaryHSPSF11Parameters *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_PSF11(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_PSF11_analytical_2D(BinaryHSPSF11Parameters *pars, double q, double phi) {
-	return binaryHS_PSF11_analytical_1D(pars,q);
-}
-
-double binaryHS_PSF11_analytical_2DXY(BinaryHSPSF11Parameters *pars, double qx, double qy){
-	return binaryHS_PSF11_analytical_1D(pars,sqrt(qx*qx+qy*qy));	
-}
Index: sansmodels/src/sans/models/c_extensions/binaryHS_PSF11.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/binaryHS_PSF11.h	(revision 27972c1dfdd57a50946a99914051e1713c997e78)
+++ 	(revision )
@@ -1,69 +1,0 @@
-#if !defined(binaryHS_PSF11_h)
-#define binaryHS_PSF11_h
-
-/**
- * Structure definition for binary hard sphere parameters
-
-	[PYTHONCLASS] = BinaryHSPSF11Model
-	[DISP_PARAMS] = l_radius,s_radius
-	[DESCRIPTION] =<text>
-						Model parameters:
-
-						l_radius : large radius of the binary hard sphere
-						s_radius : small radius of the binary hard sphere
-						vol_frac_ls : volume fraction of large spheres
-						vol_frac_ss : volume fraction of small spheres
-						ls_sld: large sphere  scattering length density
-						ss_sld: small sphere scattering length density
-						solvent_sld: solvent scattering length density
-						background: incoherent background
-               </text>
-	[FIXED]= l_radius.width;s_radius.width
-	[ORIENTATION_PARAMS]= <text> </text>
- */
-typedef struct {
-
-	///	large radius of the binary hard sphere [A]
-    //  [DEFAULT]=l_radius= 160.0 [A]
-    double l_radius;
-
-    ///	small radius of the binary hard sphere [A]
-    //  [DEFAULT]=s_radius= 25.0 [A]
-    double s_radius;
-
-	///	volume fraction of large spheres
-    //  [DEFAULT]=vol_frac_ls= 0.2
-    double vol_frac_ls;
-
-	///	volume fraction of small spheres
-    //  [DEFAULT]=vol_frac_ss= 0.2
-    double vol_frac_ss;
-
-	///	large sphere scattering length density [1/A^(2)]
-    //  [DEFAULT]=ls_sld= 3.5e-6 [1/A^(2)]
-    double ls_sld;
-
-	///	lsmall sphere scattering length density [1/A^(2)]
-    //  [DEFAULT]=ss_sld= 5e-7 [1/A^(2)]
-    double ss_sld;
-
-    ///	solvent scattering length density [1/A^(2)]
-    //  [DEFAULT]=solvent_sld= 6.36e-6 [1/A^(2)]
-    double solvent_sld;
-
-	/// Incoherent Background [1/cm]
-	//  [DEFAULT]=background=0.001 [1/cm]
-	double background;
-
-} BinaryHSPSF11Parameters;
-
-
-
-/// 1D scattering function
-double binaryHS_PSF11_analytical_1D(BinaryHSPSF11Parameters *pars, double q);
-
-/// 2D scattering function
-double binaryHS_PSF11_analytical_2D(BinaryHSPSF11Parameters *pars, double q, double phi);
-double binaryHS_PSF11_analytical_2DXY(BinaryHSPSF11Parameters *pars, double qx, double qy);
-
-#endif
Index: sansmodels/src/sans/models/c_extensions/c_models.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/c_models.c	(revision c724ccd87499a21402fee0d11d517066f99ddf9b)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/** c_models
- *
- * Module containing all SANS model extensions
- *
- * @author   M.Doucet / UTK
- */
-#include <Python.h>
-#define PY_ARRAY_UNIQUE_SYMBOL PyArray_API_sans
-#include "arrayobject.h"
-/**
- * Define empty module
- */
-static PyMethodDef module_methods[] = {
-    {NULL}
-};
-
-
-#ifndef PyMODINIT_FUNC	/* declarations for DLL import/export */
-#define PyMODINIT_FUNC void
-#endif
-PyMODINIT_FUNC
-initc_models(void)
-{
-    PyObject* m;
-
-    m = Py_InitModule3("c_models", module_methods,
-                       "C extension module for SANS scattering models.");
-
-	import_array();
-	addCCylinderModel(m);
-	addCParallelepipedModel(m);
-	addCCoreShellCylinderModel(m);
-	addCCoreShellModel(m);
-	addCCoreFourShellModel(m);
-	addCEllipsoidModel(m);
-	addCSphereModel(m);
-	addCFuzzySphereModel(m);
-	addCHardsphereStructure(m);
-	addCStickyHSStructure(m);
-	addCHayterMSAStructure(m);
-	addCSquareWellStructure(m);
-	addCDiamEllipFunc(m);
-	addCDiamCylFunc(m);
-	addCEllipticalCylinderModel(m);
-	addCTriaxialEllipsoidModel(m);
-	addCFlexibleCylinderModel(m);
-	addCFlexCylEllipXModel(m);
-	addCStackedDisksModel(m);
-	addCLamellarPSModel(m);
-	addCLamellarPSHGModel(m);
-	addCProlateModel(m);
-	addCOblateModel(m);
-	addCLamellarModel(m);
-	addCLamellarFFHGModel(m);
-	addDisperser(m);
-	addCGaussian(m);
-	addCSchulz(m);
-	addCLogNormal(m);
-	addCLorentzian(m);
-	addCHollowCylinderModel(m);
-	addCMultiShellModel(m);
-	addCVesicleModel(m);
-	addCBinaryHSModel(m);
-	addCBinaryHSPSF11Model(m);
-	addCPoly_GaussCoil(m);
-	addCFractalModel(m);
-
-}
Index: sansmodels/src/sans/models/c_extensions/classTemplate.txt
===================================================================
--- sansmodels/src/sans/models/c_extensions/classTemplate.txt	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ 	(revision )
@@ -1,274 +1,0 @@
-/** [PYTHONCLASS]
- *
- * C extension 
- *
- * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY [INCLUDE_FILE]
- *          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 "[INCLUDE_FILE]"
-
-/// Error object for raised exceptions
-static PyObject * [PYTHONCLASS]Error = NULL;
-
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Parameters
-    PyObject * params;
-    /// Log for unit testing
-    PyObject * log;
-    /// Model parameters
-	[MODELSTRUCT] model_pars;
-} [PYTHONCLASS];
-
-
-static void
-[PYTHONCLASS]_dealloc([PYTHONCLASS]* self)
-{
-    self->ob_type->tp_free((PyObject*)self);
-    [NUMERICAL_DEALLOC]
-}
-
-static PyObject *
-[PYTHONCLASS]_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    [PYTHONCLASS] *self;
-    
-    self = ([PYTHONCLASS] *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-static int
-[PYTHONCLASS]_init([PYTHONCLASS] *self, PyObject *args, PyObject *kwds)
-{
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-        [INITDICTIONARY]
-         
-        // Create empty log
-        self->log = PyDict_New();
-        
-        [NUMERICAL_INIT]
-    }
-    return 0;
-}
-
-static PyMemberDef [PYTHONCLASS]_members[] = {
-    {"params", T_OBJECT, offsetof([PYTHONCLASS], params), 0,
-     "Parameters"},
-    {"log", T_OBJECT, offsetof([PYTHONCLASS], log), 0,
-     "Log"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
-    @param p PyObject
-    @return double
-*/
-double [PYTHONCLASS]_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([PYTHONCLASS] *self, PyObject *args) {
-	double q_value, phi_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	[READDICTIONARY]
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString([PYTHONCLASS]Error, 
-	    	"[PYTHONCLASS].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([PYTHONCLASS]Error, 
-	    		"[PYTHONCLASS].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 = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,1));
-	    // Skip zero
-	    if (q_value==0) {
-	    	return Py_BuildValue("d",0.0);
-	    }
-		return Py_BuildValue("d",[C_FILENAME]_analytical_2D(&(self->model_pars),q_value,phi_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		q_value = [PYTHONCLASS]_readDouble(pars);		
-		
-		return Py_BuildValue("d",[C_FILENAME]_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([PYTHONCLASS] *self, PyObject *args) {
-	double qx_value, qy_value;
-	PyObject* pars;
-	int npars;
-	
-	// Get parameters
-	
-	[READDICTIONARY]
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString([PYTHONCLASS]Error, 
-	    	"[PYTHONCLASS].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([PYTHONCLASS]Error, 
-	    		"[PYTHONCLASS].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 = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",[C_FILENAME]_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
-
-	} else {
-
-		// We have a scalar q, we will evaluate I(q)
-		qx_value = [PYTHONCLASS]_readDouble(pars);		
-		
-		return Py_BuildValue("d",[C_FILENAME]_analytical_1D(&(self->model_pars),qx_value));
-	}	
-}
-
-static PyObject * reset([PYTHONCLASS] *self, PyObject *args) {
-    [NUMERICAL_RESET]
-    return Py_BuildValue("d",0.0);
-}
-
-
-static PyMethodDef [PYTHONCLASS]_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 [PYTHONCLASS]Type = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "[PYTHONCLASS]",             /*tp_name*/
-    sizeof([PYTHONCLASS]),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)[PYTHONCLASS]_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*/
-    "[PYTHONCLASS] objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    [PYTHONCLASS]_methods,             /* tp_methods */
-    [PYTHONCLASS]_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)[PYTHONCLASS]_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    [PYTHONCLASS]_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 add[PYTHONCLASS](PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&[PYTHONCLASS]Type) < 0)
-        return;
-
-    Py_INCREF(&[PYTHONCLASS]Type);
-    PyModule_AddObject(module, "[PYTHONCLASS]", (PyObject *)&[PYTHONCLASS]Type);
-    
-    d = PyModule_GetDict(module);
-    [PYTHONCLASS]Error = PyErr_NewException("[PYTHONCLASS].error", NULL, NULL);
-    PyDict_SetItemString(d, "[PYTHONCLASS]Error", [PYTHONCLASS]Error);
-}
Index: sansmodels/src/sans/models/c_extensions/disperser.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/disperser.c	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ 	(revision )
@@ -1,470 +1,0 @@
-/** 
- * Disperser
- * 
- * Python class that takes a model and averages its output
- * for a distribution of its parameters.
- * 
- * The parameters to be varied are specified at instantiation time.
- * The distributions are Gaussian, with std deviations specified for
- * each parameter at instantiation time.
- * 
- * @author   M.Doucet / UTK 
- */
- 
-#include <Python.h>
-#include "structmember.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <time.h>
-
-/// Error object for raised exceptions
-static PyObject * DisperserError = NULL;
-
-// Class definition
-typedef struct {
-    PyObject_HEAD
-    /// Dictionary of parameters for this class
-    PyObject * params;
-    /// Model object to disperse
-    PyObject * model;
-    /// Array of original values
-    double * centers;
-    /// Number of parameters to disperse
-    int n_pars;
-    /// Coordinate system flag
-    int cylindrical;
-} Disperser;
-
-// Function definitions
-double disperseParam(Disperser *self, int iPar, PyObject * pars);
-double Disperser_readDouble(PyObject *p);
-
-/**
- * Function to deallocate memory for the object
- */
-static void
-Disperser_dealloc(Disperser * self) {
-    free(self->centers);
-    self->ob_type->tp_free((PyObject*)self);
-}
-
-/**
- * Function to create a new Disperser object
- */
-static PyObject *
-Disperser_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    Disperser *self;
-    
-    self = (Disperser *)type->tp_alloc(type, 0);
-   
-    return (PyObject *)self;
-}
-
-/**
- * Initialization of the object (__init__)
- */
-static int
-Disperser_init(Disperser *self, PyObject *args, PyObject *kwds)
-{
-	PyObject * model;
-	PyObject * paramList;
-	PyObject * sigmaList;
-	
-    if (self != NULL) {
-    	
-    	// Create parameters
-        self->params = PyDict_New();
-        
-		// Get input
-		if ( !PyArg_ParseTuple(args,"OOO",&model, &paramList, &sigmaList) ) {
-		    PyErr_SetString(DisperserError, 
-		    	"Disperser: could not parse to initialize. Need Disperser(model, paramList, sigmaList)");
-			return -1;
-		}
-
-		// Check that the lists are of the right type
-		if( PyList_Check(paramList)!=1 || PyList_Check(sigmaList)!=1 ) {
-			PyErr_SetString(DisperserError,
-				"Disperser: bad input parameters; did not find lists.");
-			return -1;
-		}
-		
-		// Check that the list lengths are compatible
-		if( PyList_GET_SIZE(paramList) != PyList_GET_SIZE(sigmaList) ) {
-			PyErr_SetString(DisperserError,
-				"Disperser: supplied lists are not of the same length.");
-			return -1;
-		} 
-		
-		// Set the data members
-		self->model = model;
-		
-		// Number of parameters to disperse
-		// Let run() find out since values can change
-		self->n_pars = 0;
-
-		// Set default coordinate system as cartesian
-		self->cylindrical = 0;
-
-        // Initialize parameter dictionary
-        // Store the list of parameter names (strings)
-        PyDict_SetItemString(self->params,"paramList", paramList);
-        
-        // Store the list of std deviations (floats)
-        PyDict_SetItemString(self->params,"sigmaList", sigmaList);
-        
-        // Set the default number of points to average over
-        PyDict_SetItemString(self->params,"n_pts",Py_BuildValue("i",25));
-    }
-    return 0;
-}
-
-/**
- * List of member to make public
- * Only the parameters and the model are available to python users
- */
-static PyMemberDef Disperser_members[] = {
-    {"params", T_OBJECT, offsetof(Disperser, params), 0,
-     "Parameters"},
-    {"model", T_OBJECT, offsetof(Disperser, model), 0,
-     "Model to disperse"},
-    {NULL}  /* Sentinel */
-};
-
-/** Read double from PyObject
- *	TODO: THIS SHOULD REALLY BE ELSEWHERE!
- *   @param p PyObject
- *   @return double
- */
-double Disperser_readDouble(PyObject *p) {
-	double value = 0.0;
-	
-    if (PyFloat_Check(p)==1) {
-        value = (double)(((PyFloatObject *)(p))->ob_fval);
-        //Py_DECREF(p);
-        return value;
-    } else if (PyInt_Check(p)==1) {
-        value = (double)(((PyIntObject *)(p))->ob_ival);
-    	//Py_DECREF(p);
-        return value;
-    } else if (PyLong_Check(p)==1) {
-        value = (double)PyLong_AsLong(p);
-    	//Py_DECREF(p);
-        return value;
-    } else {
-    	//Py_DECREF(p);    	
-        return 0.0;
-    }
-}
-
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [qx,qy]
- * @return: function value
- */
-static PyObject * runXY(Disperser *self, PyObject *args) {
-	PyObject* pars;
-	int n_pts;
-	int i;
-	double value;
-	PyObject * result;
-	PyObject * temp;
-	
-	// Get parameters
-	
-	// Check that the lists are of the right type
-	if( PyList_Check(PyDict_GetItemString(self->params, "paramList"))!=1 
-		|| PyList_Check(PyDict_GetItemString(self->params, "sigmaList"))!=1 ) {
-		PyErr_SetString(DisperserError,
-			"Disperser: bad input parameters; did not find lists.");
-		return NULL;
-	}
-
-	// Reader parameter dictionary
-    n_pts = PyInt_AsLong( PyDict_GetItemString(self->params, "n_pts") );
-    
-	// Check that the list lengths are compatible
-	if( PyList_GET_SIZE(PyDict_GetItemString(self->params, "paramList")) 
-		!= PyList_GET_SIZE(PyDict_GetItemString(self->params, "sigmaList")) ) {
-		PyErr_SetString(DisperserError,
-			"Disperser: supplied lists are not of the same length.");
-		return NULL;
-	} 
-
-    // Number of parameters to disperse
-    self->n_pars = PyList_GET_SIZE(PyDict_GetItemString(self->params, "paramList"));
-    
-    // Allocate memory for centers
-    free(self->centers);
-    self->centers = (double *)malloc(self->n_pars * sizeof(double));
-	if(self->centers==NULL) {
-	    PyErr_SetString(DisperserError, 
-	    	"Disperser.run could not allocate memory.");
-		return NULL;
-	}
-    
-    // Store initial values of those parameters    
-    for( i=0; i<self->n_pars; i++ ) {
-    	result = PyObject_CallMethod(self->model, "getParam", "(O)", 
-    		PyList_GetItem( PyDict_GetItemString(self->params, "paramList"), i ));
-    		
-    	if( result == NULL ) {
-		    PyErr_SetString(DisperserError, 
-		    	"Disperser.run could not get current parameter values.");
-    		return NULL;
-    	} else {
-    		self->centers[i] = Disperser_readDouble(result);
-    		Py_DECREF(result);
-    	}; 
-    }
-	
-	// Get input and determine whether we have to supply a 1D or 2D return value.
-	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(DisperserError, 
-	    	"Disperser.run expects a q value.");
-		return NULL;
-	}    
-        
-    // Evaluate or calculate average
-    if( self->n_pars > 0 ) {
-		value = disperseParam(self, 0, pars);
-    } else {
-    	 if (self->cylindrical==1) {
-    	 	result = PyObject_CallMethod(self->model, "run", "(O)",pars);
-    	 } else {
-    	 	result = PyObject_CallMethod(self->model, "runXY", "(O)",pars);
-    	 }
-    	 
-    	 if( result == NULL ) {
-		    PyErr_SetString(DisperserError, 
-		    	"Disperser.run failed.");
-    		return NULL; 	 	
-    	 } else {
-    		Py_DECREF(result);
-    	 	return result;
-    	 }
-    }
-    
-    // Put back the original model parameter values
-    for( i=0; i<self->n_pars; i++ ) {
-    	// Maybe we need to decref the double here?
-    	temp = Py_BuildValue("d", self->centers[i]);
-    	result = PyObject_CallMethod(self->model, "setParam", "(OO)", 
-    		PyList_GetItem( PyDict_GetItemString(self->params, "paramList"), i ),
-    		temp );
-    	Py_DECREF(temp);
-    		
-    	if( result == NULL ) {
-		    PyErr_SetString(DisperserError, 
-		    	"Disperser.run could not set back original parameter values.");
-    		return NULL;
-    	} else {
-    		Py_DECREF(result);
-    	}; 
-    }
-    
-	return Py_BuildValue("d",value);    	
-
-}
-
-/**
- * Function to call to evaluate model
- * @param args: input q or [q,phi]
- * @return: function value
- */
-static PyObject * run(Disperser *self, PyObject *args) {
-	PyObject * output;
-	self->cylindrical = 1;
-	output = runXY(self, args);
-	self->cylindrical = 0;
-	return output;
-}
-
-
-
-
-/**
- * Gaussian weight
- * @param mean: mean value of the Gaussian
- * @param sigma: standard deviation of the Gaussian
- * @param x: value at which the Gaussian is evaluated
- * @return: value of the Gaussian
- */
-double gaussian_weight(double mean, double sigma, double x) {
-	double vary, expo_value;
-    vary = x-mean;
-    expo_value = -vary*vary/(2*sigma*sigma);
-    //return 1.0;
-    return exp(expo_value);
-}
-
-/**
- * @param iPar: ID of parameter to disperse
- * @param pars: input parameter to the evaluation function
- */
-double disperseParam(Disperser *self, int iPar, PyObject * pars) {
-	double sigma;
-	double min_value, max_value;
-	double step;
-	double prev_value;
-	double value_sum;
-	double gauss_sum;
-	double gauss_value;
-	double func_value;
-	double error_sys;
-	double value;
-	int i, n_pts;
-	PyObject *result;
-	PyObject *temp;
-	
-	
-    n_pts = PyInt_AsLong( PyDict_GetItemString(self->params, "n_pts") );
-    
-	// If we exhausted the parameter array, simply evaluate
-    // the model
-    if( iPar < self->n_pars ) {
-            
-		// Average over Gaussian distribution (2 sigmas)
-        value_sum = 0.0;
-        gauss_sum = 0.0;
-            
-        // Get the standard deviation for this parameter
-        sigma = Disperser_readDouble(PyList_GetItem( PyDict_GetItemString(self->params, "sigmaList"), iPar ));
-            
-        // Average over 4 sigmas wide
-        min_value = self->centers[iPar] - 2*sigma;
-        max_value = self->centers[iPar] + 2*sigma;
-            
-        // Calculate step size
-        step = (max_value - min_value)/(n_pts-1);
-            
-        // If we are not changing the parameter, just return the 
-        // value of the function
-        if (step == 0.0) {
-            return disperseParam(self, iPar+1, pars);
-        }
-            
-        // Compute average
-        prev_value = 0.0;
-        error_sys  = 0.0;
-        for( i=0; i<n_pts; i++ ) {
-            // Set the parameter value           
-            value = min_value + (double)i*step;
-                
-            temp = Py_BuildValue("d", value);
-    		result = PyObject_CallMethod(self->model, "setParam", "(OO)",
-    			PyList_GetItem( PyDict_GetItemString(self->params, "paramList"), iPar ), 
-    				temp);
-    		Py_DECREF(temp);
-    			
-		    if( result == NULL ) {
-	  	 	 	printf("Could not set param %i\n", iPar);
-	    	 	// return a value that will create an NAN
-	    	 	return 0.0/(step-step);
-		    } else {
-		    	Py_DECREF(result);
-		    }
-                
-			gauss_value = gaussian_weight(self->centers[iPar], sigma, value);
-            func_value = disperseParam(self, iPar+1, pars);
-
-            value_sum += gauss_value * func_value;
-        	gauss_sum += gauss_value;	
-        }   
-        return value_sum/gauss_sum;
-        
-    } else {
-    	 if (self->cylindrical==1) {
-    	 	result = PyObject_CallMethod(self->model, "run", "(O)",pars);
-    	 } else {
-    	 	result = PyObject_CallMethod(self->model, "runXY", "(O)",pars);
-    	 }
-    	 if( result == NULL ) {
-    	 	printf("Model.run() could not return\n");
-    	 	// return a value that will create an NAN
-    	 	return 0.0/(step-step);
-    	 } else {
-    	 	value = Disperser_readDouble(result);    	 	
-    	 	Py_DECREF(result);
-    	 	return value;
-    	 }
-    }
-	
-}
-
-static PyMethodDef Disperser_methods[] = {
-    {"run",      (PyCFunction)run     , METH_VARARGS,
-      "Evaluate the model at a given input value"},
-    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
-      "Evaluate the model at a given input value"},
-   {NULL}
-};
-
-static PyTypeObject DisperserType = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "Disperser",             /*tp_name*/
-    sizeof(Disperser),             /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)Disperser_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*/
-    "Disperser objects",           /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
-    Disperser_methods,             /* tp_methods */
-    Disperser_members,             /* tp_members */
-    0,                         /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    (initproc)Disperser_init,      /* tp_init */
-    0,                         /* tp_alloc */
-    Disperser_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 addDisperser(PyObject *module) {
-	PyObject *d;
-	
-    if (PyType_Ready(&DisperserType) < 0)
-        return;
-
-    Py_INCREF(&DisperserType);
-    PyModule_AddObject(module, "Disperser", (PyObject *)&DisperserType);
-    
-    d = PyModule_GetDict(module);
-    DisperserError = PyErr_NewException("Disperser.error", NULL, NULL);
-    PyDict_SetItemString(d, "DisperserError", DisperserError);
-}
-
Index: sansmodels/src/sans/models/c_extensions/gaussian.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/gaussian.c	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/**
- * Gaussian function
- */
-
-#include "gaussian.h"
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-
-/**
- * Function to evaluate 1D Gaussian function.
- * The function is normalized to the 'scale' parameter.
- * 
- * f(x)=scale * 1/(sigma^2*2pi)e^(-(x-mu)^2/2sigma^2)
- * 
- * @param pars: parameters of the gaussian
- * @param x: x-value
- * @return: function value
- */
-double gaussian_analytical_1D(GaussianParameters *pars, double x) {
-	double sigma2 = pow(pars->sigma, 2);	
-	return pars->scale / sigma2 * exp( -pow((x-pars->center), 2) / (2*sigma2));
-}
-
-/**
- * Function to evaluate 2D Gaussian  function
- * The function is normalized to the 'scale' parameter.
- * 
- * f(x,y) = Gaussian(x) * Gaussian(y)
- * 
- * where both Gaussians share the same parameters.
- * 
- * @param pars: parameters of the gaussian
- * @param x: x-value
- * @param y: y-value
- * @return: function value
- */
-double gaussian_analytical_2DXY(GaussianParameters *pars, double x, double y) {
-    return gaussian_analytical_1D(pars, x) * gaussian_analytical_1D(pars, y);
-} 
-
-/**
- * Function to evaluate 2D Gaussian  function
- * The function is normalized to the 'scale' parameter.
- * 
- * f(x,y) = Gaussian(x) * Gaussian(y)
- * 
- * where both Gaussians share the same parameters.
- * 
- * @param pars: parameters of the gaussian
- * @param length: length of the (x,y) vector
- * @param phi: angle relative to x
- * @return: function value
- */
-double gaussian_analytical_2D(GaussianParameters *pars, double length, double phi) {
-    return gaussian_analytical_2DXY(pars, length*cos(phi), length*sin(phi));
-} 
Index: sansmodels/src/sans/models/c_extensions/gaussian.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/gaussian.h	(revision 96672c05d2a444bfc0ce599c2ae50b1825f6e049)
+++ 	(revision )
@@ -1,31 +1,0 @@
-#if !defined(gaussian_h)
-#define gaussian_h
-
-/** Structure definition for Gaussian parameters.
- * The Gaussian is normalized to the 'scale' parameter.
- *  
- * f(x)=scale * 1/(sigma^2*2pi)e^(-(x-mu)^2/2sigma^2)
- * 
- * [PYTHONCLASS] = Gaussian
- * [DESCRIPTION] = <text>f(x)=scale * 1/(sigma^2*2pi)e^(-(x-mu)^2/2sigma^2)</text>
- */
-typedef struct {
-    /// Scale factor 
-    //  [DEFAULT]=scale=1.0
-    double scale;
-    /// Standard deviation
-    //  [DEFAULT]=sigma=1 
-    double sigma;
-    /// Center of the Gaussian distribution
-    //  [DEFAULT]=center=0.0 
-    double center;
-} GaussianParameters;
-
-/// 1D scattering function
-double gaussian_analytical_1D(GaussianParameters *pars, double x);
-
-/// 2D scattering function
-double gaussian_analytical_2D(GaussianParameters *pars, double x, double phi);
-double gaussian_analytical_2DXY(GaussianParameters *pars, double x, double y);
-
-#endif
Index: sansmodels/src/sans/models/c_extensions/logNormal.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/logNormal.c	(revision eba988511d86410985b5a1c35ce70dd3968132a8)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/**
- * log normal function
- */
-
-#include "logNormal.h"
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-
-/**
- * Function to evaluate 1D Log normal function.
- * The function is normalized to the 'scale' parameter.
- * 
- * f(x)=scale * 1/(sigma*math.sqrt(2pi))e^(-1/2*((math.log(x)-mu)/sigma)^2)
- * 
- * @param pars: parameters of the log normal 
- * @param x: x-value
- * @return: function value
- */
-double logNormal_analytical_1D(LogNormalParameters *pars, double x) {
-	double sigma2 = pow(pars->sigma, 2);	
-	return pars->scale / (x*sigma2) * exp( -pow((log(x) -pars->center), 2) / (2*sigma2));
-}
-
-/**
- * Function to evaluate 2D log normal  function
- * The function is normalized to the 'scale' parameter.
- * 
- * f(x,y) = LogNormal(x) * Lognormal(y)
- * 
- * where both Gaussians share the same parameters.
- * 
- * @param pars: parameters of the log normal 
- * @param x: x-value
- * @param y: y-value
- * @return: function value
- */
-double logNormal_analytical_2DXY(LogNormalParameters *pars, double x, double y) {
-    return logNormal_analytical_1D(pars, x) * logNormal_analytical_1D(pars, y);
-} 
-
-/**
- * Function to evaluate 2D log normal  function
- * The function is normalized to the 'scale' parameter.
- * 
- * f(x,y) = Lognormal(x) * Lognormal(y)
- * 
- * where both log normal s share the same parameters.
- * 
- * @param pars: parameters of the log normal
- * @param length: length of the (x,y) vector
- * @param phi: angle relative to x
- * @return: function value
- */
-double logNormal_analytical_2D(LogNormalParameters *pars, double length, double phi) {
-    return logNormal_analytical_2DXY(pars, length*cos(phi), length*sin(phi));
-} 
Index: sansmodels/src/sans/models/c_extensions/logNormal.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/logNormal.h	(revision eba988511d86410985b5a1c35ce70dd3968132a8)
+++ 	(revision )
@@ -1,31 +1,0 @@
-#if !defined(logNormal_h)
-#define logNormal_h
-
-/** Structure definition for Gaussian parameters.
- * The Log normal is normalized to the 'scale' parameter.
- *  
- * f(x)=scale * 1/(sigma*math.sqrt(2pi))e^(-1/2*((math.log(x)-mu)/sigma)^2)
- *
- * [PYTHONCLASS] = LogNormal
- * [DESCRIPTION] = <text>f(x)=scale * 1/(sigma*math.sqrt(2pi))e^(-1/2*((math.log(x)-mu)/sigma)^2)</text>
- */
-typedef struct {
-    /// Scale factor 
-    //  [DEFAULT]=scale=1.0
-    double scale;
-    /// Standard deviation
-    //  [DEFAULT]=sigma=1 
-    double sigma;
-    /// Center of the Log Normal distribution
-    //  [DEFAULT]=center=0.0 
-    double center;
-} LogNormalParameters;
-
-/// 1D scattering function
-double logNormal_analytical_1D(LogNormalParameters *pars, double x);
-
-/// 2D scattering function
-double logNormal_analytical_2D(LogNormalParameters *pars, double x, double phi);
-double logNormal_analytical_2DXY(LogNormalParameters *pars, double x, double y);
-
-#endif
Index: sansmodels/src/sans/models/c_extensions/lorentzian.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/lorentzian.c	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ 	(revision )
@@ -1,59 +1,0 @@
-/**
- * Lorentzian function
- */
-
-#include "lorentzian.h"
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-
-/**
- * Function to evaluate 1D Lorentzian function.
- * The function is normalized to the 'scale' parameter.
- * 
- * f(x)=scale * 1/pi 0.5gamma / [ (x-x_0)^2 + (0.5gamma)^2 ]
- * 
- * @param pars: parameters of the Lorentzian
- * @param x: x-value
- * @return: function value
- */
-double lorentzian_analytical_1D(LorentzianParameters *pars, double x) {
-	double delta2 = pow( (x-pars->center), 2);
-	return pars->scale / acos(-1.0) * 0.5*pars->gamma /
-		(delta2 + 0.25*pars->gamma*pars->gamma);
-}
-
-/**
- * Function to evaluate 2D Lorentzian  function
- * The function is normalized to the 'scale' parameter.
- * 
- * f(x,y) = Lorentzian(x) * Lorentzian(y)
- * 
- * where both Lorentzians share the same parameters.
- * 
- * @param pars: parameters of the Lorentzian
- * @param x: x-value
- * @param y: y-value
- * @return: function value
- */
-double lorentzian_analytical_2DXY(LorentzianParameters *pars, double x, double y) {
-    return lorentzian_analytical_1D(pars, x) * lorentzian_analytical_1D(pars, y);
-} 
-
-/**
- * Function to evaluate 2D Lorentzian  function
- * The function is normalized to the 'scale' parameter.
- * 
- * f(x,y) = Lorentzian(x) * Lorentzian(y)
- * 
- * where both Lorentzians share the same parameters.
- * 
- * @param pars: parameters of the Lorentzian
- * @param length: length of the (x,y) vector
- * @param phi: angle relative to x
- * @return: function value
- */
-double lorentzian_analytical_2D(LorentzianParameters *pars, double length, double phi) {
-    return lorentzian_analytical_2DXY(pars, length*cos(phi), length*sin(phi));
-} 
Index: sansmodels/src/sans/models/c_extensions/lorentzian.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/lorentzian.h	(revision 96672c05d2a444bfc0ce599c2ae50b1825f6e049)
+++ 	(revision )
@@ -1,31 +1,0 @@
-#if !defined(lorentzian_h)
-#define lorentzian_h
-
-/** Structure definition for Lorentzian parameters.
- * The Lorentzian is normalized to the 'scale' parameter.
- *  
- * f(x)=scale * 1/pi 0.5gamma / [ (x-x_0)^2 + (0.5gamma)^2 ]
- * 
- * [PYTHONCLASS] = Lorentzian
- * [DESCRIPTION] = <text>f(x)=scale * 1/pi 0.5gamma / [ (x-x_0)^2 + (0.5gamma)^2 ]</text>
- */
-typedef struct {
-    /// Scale factor 
-    //  [DEFAULT]=scale=1.0
-    double scale;
-    /// Width
-    //  [DEFAULT]=gamma=1.0
-    double gamma;
-    /// Center of the Lorentzian distribution
-    //  [DEFAULT]=center=0.0 
-    double center;
-} LorentzianParameters;
-
-/// 1D lorentzian function
-double lorentzian_analytical_1D(LorentzianParameters *pars, double x);
-
-/// 2D lorentzian function
-double lorentzian_analytical_2D(LorentzianParameters *pars, double x, double phi);
-double lorentzian_analytical_2DXY(LorentzianParameters *pars, double x, double y);
-
-#endif
Index: sansmodels/src/sans/models/c_extensions/modelTemplate.txt
===================================================================
--- sansmodels/src/sans/models/c_extensions/modelTemplate.txt	(revision 9316609c953db33f23a48a9b91ce5b283ea935f4)
+++ 	(revision )
@@ -1,58 +1,0 @@
-#!/usr/bin/env python
-""" Provide functionality for a C extension model
-
-	WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- 	         DO NOT MODIFY THIS FILE, MODIFY [INCLUDE_FILE]
- 	         AND RE-RUN THE GENERATOR SCRIPT
-
-    @author: Mathieu Doucet / UTK
-    @contact: mathieu.doucet@nist.gov
-"""
-
-from sans.models.BaseComponent import BaseComponent
-from sans_extension.c_models import [CPYTHONCLASS]
-import copy    
-    
-class [PYTHONCLASS]([CPYTHONCLASS], BaseComponent):
-    """ Class that evaluates a [PYTHONCLASS] model. 
-    	This file was auto-generated from [INCLUDE_FILE].
-    	Refer to that file and the structure it contains
-    	for details of the model.
-    	[DEFAULT_LIST]
-    """
-        
-    def __init__(self):
-        """ Initialization """
-        
-        # Initialize BaseComponent first, then sphere
-        BaseComponent.__init__(self)
-        [CPYTHONCLASS].__init__(self)
-        
-        ## Name of the model
-        self.name = "[PYTHONCLASS]"
-        self.description= """[DESCRIPTION]"""
-		[PAR_DETAILS]
-   
-    def clone(self):
-        """ Return a identical copy of self """
-        obj = [PYTHONCLASS]()
-        obj.params = copy.deepcopy(self.params)
-        return obj   
-   
-    def run(self, x = 0.0):
-        """ Evaluate the model
-            @param x: input q, or [q,phi]
-            @return: scattering function P(q)
-        """
-        
-        return [CPYTHONCLASS].run(self, x)
-   
-    def runXY(self, x = 0.0):
-        """ Evaluate the model in cartesian coordinates
-            @param x: input q, or [qx, qy]
-            @return: scattering function P(q)
-        """
-        
-        return [CPYTHONCLASS].runXY(self, x)
-   
-# End of file
Index: sansmodels/src/sans/models/c_extensions/oblate.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/oblate.c	(revision 975ec8e8211549489759b5a5ffe3b60607de065b)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/**
- * Scattering model for a oblate core shell
- * @author: Gervaise B Alina/ UTK
- */
-
-#include "oblate.h"
-#include <math.h>
-#include "libCylinder.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the oblate
- * @param q: q-value
- * @return: function value
- */
-double oblate_analytical_1D(OblateParameters *pars, double q) {
-	double dp[8];
-
-	// Fill paramater array
-	dp[0] = pars->scale;
-	dp[1] = pars->major_core;
-	dp[2] = pars->minor_core;
-	dp[3] = pars->major_shell;
-	dp[4] = pars->minor_shell;
-	dp[5] = pars->contrast;
-	dp[6] = pars->sld_solvent;
-	dp[7] = pars->background;
-
-	// Call library function to evaluate model
-	return OblateForm(dp, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the oblate
- * @param q: q-value
- * @return: function value
- */
-double oblate_analytical_2DXY(OblateParameters *pars, double qx, double qy) {
-	double q;
-	q = sqrt(qx*qx+qy*qy);
-    return oblate_analytical_1D(pars, q);
-}
-
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the oblate
- * @param q: q-value
- * @param phi: angle phi
- * @return: function value
- */
-double oblate_analytical_2D(OblateParameters *pars, double q, double phi) {
-    return oblate_analytical_1D(pars, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the oblate
- * @param q: q-value
- * @param q_x: q_x / q
- * @param q_y: q_y / q
- * @return: function value
- */
-
-double oblate_analytical_2D_scaled(OblateParameters *pars, double q, double q_x, double q_y) {
-
-	return 1.0;
-}
-
Index: sansmodels/src/sans/models/c_extensions/oblate.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/oblate.h	(revision 4628e31d33c0fcf223d4c2cf0eb3acdf634737a2)
+++ 	(revision )
@@ -1,74 +1,0 @@
-#if !defined(oblate_h)
-#define oblate_h
-/** Structure definition for oblate parameters
- * [PYTHONCLASS] = OblateModel
- * [DISP_PARAMS] = major_core, minor_core, major_shell,minor_shell
-   [DESCRIPTION] = <text>[OblateCoreShellModel] Calculates the form factor for an oblate
-			ellipsoid particle with a core_shell structure.
-			The form factor is averaged over all possible
-			orientations of the ellipsoid such that P(q)
-			= scale*<f^2>/Vol + bkg, where f is the
-			single particle scattering amplitude.
-			[Parameters]:
-			major_core = radius of major_core,
-			minor_core = radius of minor_core,
-			major_shell = radius of major_shell,
-			minor_shell = radius of minor_shell,
-			contrast = SLD_core - SLD_shell
-			sld_solvent = SLD_solvent
-			background = Incoherent bkg
-			scale =scale
-			Note:It is the users' responsibility to ensure
-			that shell radii are larger than core radii.
-			</text>
-
-   [FIXED] = <text>major_core.width;minor_core.width; major_shell.width; minor_shell.width</text>
-   [ORIENTATION_PARAMS]= <text>axis_phi; axis_theta; axis_phi.width; axis_theta.width</text>
-
- **/
-typedef struct {
-    /// Scale factor
-    //  [DEFAULT]=scale=1.0
-    double scale;
-    /// Major core of oblate [A]
-    //  [DEFAULT]=major_core=200.0 [A]
-    double major_core;
-	/// Minor core of oblate [A]
-    //  [DEFAULT]=minor_core=20.0 [A]
-    double minor_core;
-	/// Major shell of oblate [A]
-    //  [DEFAULT]=major_shell=250.0 [A]
-    double major_shell;
-	/// Minor shell of oblate [A]
-    //  [DEFAULT]=minor_shell=30.0 [A]
-    double minor_shell;
-    ///  Scattering contrast [1/A^(2)]
-    //  [DEFAULT]=contrast=1.0e-6 [1/A^(2)]
-    double contrast;
-	/// Solvent scattering length density  [1/A^(2)]
-    //  [DEFAULT]=sld_solvent=6.3e-6 [1/A^(2)]
-    double sld_solvent;
-	/// Incoherent Background [1/cm] 0.001
-	//  [DEFAULT]=background=0.001 [1/cm]
-	double background;
-	//Disable for now
-    /// Orientation of the oblate axis w/respect incoming beam [deg]
-    //  [DEFAULT]=axis_theta=57.325 [deg]
-    double axis_theta;
-    /// Orientation of the oblate in the plane of the detector [deg]
-    //  [DEFAULT]=axis_phi=57.325 [deg]
-    double axis_phi;
-
-} OblateParameters;
-
-
-
-/// 1D scattering function
-double oblate_analytical_1D(OblateParameters *pars, double q);
-
-/// 2D scattering function
-double oblate_analytical_2D(OblateParameters *pars, double q, double phi);
-double oblate_analytical_2DXY(OblateParameters *pars, double qx, double qy);
-//double oblate_analytical_2D_scaled(OblateParameters *pars, double q, double q_x, double q_y);
-
-#endif
Index: sansmodels/src/sans/models/c_extensions/polygausscoil.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/polygausscoil.c	(revision c724ccd87499a21402fee0d11d517066f99ddf9b)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/**
- * Scattering model for a polygausscoil
- */
-
-#include "polygausscoil.h"
-#include "libTwoPhase.h"
-#include <math.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the polygausscoil
- * @param q: q-value
- * @return: function value
- */
-double polygausscoil_analytical_1D(PolyGaussCoilParameters *pars, double q) {
-	double dp[5];
-
-	dp[0] = pars->scale;
-	dp[1] = pars->rg;
-	dp[2] = pars->poly_m;
-	dp[4] = pars->background;
-
-	return PolyGaussCoil(dp, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the sphere
- * @param q: q-value
- * @return: function value
- */
-double polygausscoil_analytical_2D(PolyGaussCoilParameters *pars, double q, double phi) {
-	return polygausscoil_analytical_1D(pars,q);
-}
-
-double polygausscoil_analytical_2DXY(PolyGaussCoilParameters *pars, double qx, double qy){
-	return polygausscoil_analytical_1D(pars,sqrt(qx*qx+qy*qy));
-}
Index: sansmodels/src/sans/models/c_extensions/polygausscoil.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/polygausscoil.h	(revision 8426622c3412a19a301bdbd7f906107e073e361b)
+++ sansmodels/src/sans/models/c_extensions/polygausscoil.h	(revision e369627df1a0b85dc6129d8e7ee7ed8fe1db27e9)
@@ -40,9 +40,9 @@
 
 /// 1D scattering function
-double polygausscoil_analytical_1D(PolyGaussCoilParameters *pars, double q);
+//double polygausscoil_analytical_1D(PolyGaussCoilParameters *pars, double q);
 
 /// 2D scattering function
-double polygausscoil_analytical_2D(PolyGaussCoilParameters *pars, double q, double phi);
-double polygausscoil_analytical_2DXY(PolyGaussCoilParameters *pars, double qx, double qy);
+//double polygausscoil_analytical_2D(PolyGaussCoilParameters *pars, double q, double phi);
+//double polygausscoil_analytical_2DXY(PolyGaussCoilParameters *pars, double qx, double qy);
 
 #endif
Index: sansmodels/src/sans/models/c_extensions/prolate.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/prolate.c	(revision 8dc0b74600a8db8ce463144695eb91a5449d193c)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/**
- * Scattering model for a prolate
- * @author: Gervaise B Alina/ UTK
- */
-
-#include "prolate.h"
-#include <math.h>
-#include "libCylinder.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the prolate
- * @param q: q-value
- * @return: function value
- */
-double prolate_analytical_1D(ProlateParameters *pars, double q) {
-	double dp[8];
-
-	// Fill paramater array
-	dp[0] = pars->scale;
-	dp[1] = pars->major_core;
-	dp[2] = pars->minor_core;
-	dp[3] = pars->major_shell;
-	dp[4] = pars->minor_shell;
-	dp[5] = pars->contrast;
-	dp[6] = pars->sld_solvent;
-	dp[7] = pars->background;
-
-	// Call library function to evaluate model
-	return ProlateForm(dp, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the prolate
- * @param q: q-value
- * @return: function value
- */
-double prolate_analytical_2DXY(ProlateParameters *pars, double qx, double qy) {
-	double q;
-	q = sqrt(qx*qx+qy*qy);
-    return prolate_analytical_1D(pars, q);
-}
-
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the prolate
- * @param q: q-value
- * @param phi: angle phi
- * @return: function value
- */
-double prolate_analytical_2D(ProlateParameters *pars, double q, double phi) {
-    return prolate_analytical_1D(pars, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the prolate
- * @param q: q-value
- * @param q_x: q_x / q
- * @param q_y: q_y / q
- * @return: function value
- */
-//double prolate_analytical_2D_scaled(ProlateParameters *pars, double q, double q_x, double q_y) {
-//
-//	return 1.0;
-//}
-
Index: sansmodels/src/sans/models/c_extensions/prolate.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/prolate.h	(revision 27972c1dfdd57a50946a99914051e1713c997e78)
+++ 	(revision )
@@ -1,66 +1,0 @@
-#if !defined(prolate_h)
-#define prolate_h
-/** Structure definition for prolate parameters
- * [PYTHONCLASS] = ProlateModel
- * [DISP_PARAMS] = major_core, minor_core, major_shell,minor_shell
-   [DESCRIPTION] = <text>[ProlateCoreShellModel] Calculates the form factor for a prolate
-			ellipsoid particle with a core_shell structure.
-			The form factor is averaged over all possible
-			orientations of the ellipsoid such that P(q)
-			= scale*<f^2>/Vol + bkg, where f is the
-			single particle scattering amplitude.
-			[Parameters]:
-			major_core = radius of major_core,
-			minor_core = radius of minor_core,
-			major_shell = radius of major_shell,
-			minor_shell = radius of minor_shell,
-			contrast = SLD_core - SLD_shell
-			sld_solvent = SLD_solvent
-			background = Incoherent bkg
-			scale = scale
-			Note:It is the users' responsibility to ensure
-			that shell radii are larger than core radii.
-			</text>
-   [FIXED] = <text>major_core.width;minor_core.width; major_shell.width; minor_shell.width</text>
-   [ORIENTATION_PARAMS] =
-
- **/
-typedef struct {
-    /// Scale factor
-    //  [DEFAULT]=scale=1.0
-    double scale;
-    /// Major core of prolate [A]
-    //  [DEFAULT]=major_core=100.0 [A]
-    double major_core;
-	/// Minor core of prolate [A]
-    //  [DEFAULT]=minor_core=50.0 [A]
-    double minor_core;
-	/// Major shell of prolate [A]
-    //  [DEFAULT]=major_shell=110.0 [A]
-    double major_shell;
-	/// Minor shell of prolate [A]
-    //  [DEFAULT]=minor_shell=60.0 [A]
-    double minor_shell;
-    ///  Scattering contrast [1/A^(2)]
-    //  [DEFAULT]=contrast=1.0e-6 [1/A^(2)]
-    double contrast;
-	/// Solvent scattering length density  [1/A^(2)]
-    //  [DEFAULT]=sld_solvent=6.3e-6 [1/A^(2)]
-    double sld_solvent;
-	/// Incoherent Background [1/cm] 0.001
-	//  [DEFAULT]=background=0.001 [1/cm]
-	double background;
-
-} ProlateParameters;
-
-
-
-/// 1D scattering function
-double prolate_analytical_1D(ProlateParameters *pars, double q);
-
-/// 2D scattering function
-double prolate_analytical_2D(ProlateParameters *pars, double q, double phi);
-double prolate_analytical_2DXY(ProlateParameters *pars, double qx, double qy);
-//double prolate_analytical_2D_scaled(ProlateParameters *pars, double q, double q_x, double q_y);
-
-#endif
Index: sansmodels/src/sans/models/c_extensions/schulz.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/schulz.c	(revision c5607face45b9ab9a29b4327be335352e037d1d6)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/**
- * Schulz function
- */
-
-#include "schulz.h"
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-
-/**
- * Function to evaluate 1D Schulz function.
- * The function is normalized to the 'scale' parameter.
- *
- * f(x)=scale * math.pow(z+1, z+1)*math.pow((R), z)*
- *					math.exp(-R*(z+1))/(center*gamma(z+1)
- *		z= math.pow[(1/(sigma/center),2]-1
- *		R= x/center
- * @param pars: parameters of the schulz
- * @param x: x-value
- * @return: function value
- */
-double schulz_analytical_1D(SchulzParameters *pars, double x) {
-	double z = pow(pars->center/ pars->sigma, 2)-1;
-	double R= x/pars->center;
-	double zz= z+1;
-	double expo;
-	expo = log(pars->scale)+zz*log(zz)+z*log(R)-R*zz-log(pars->center)-lgamma(zz);
-
-	return exp(expo);//pars->scale * pow(zz,zz) * pow(R,z) * exp(-1*R*zz)/((pars->center) * tgamma(zz)) ;
-}
-
-/**
- * Function to evaluate 2D schulz function
- * The function is normalized to the 'scale' parameter.
- *
- * f(x,y) = Schulz(x) * Schulz(y)
- *
- * where both Shulzs share the same parameters.
- *
- * @param pars: parameters of the schulz
- * @param x: x-value
- * @param y: y-value
- * @return: function value
- */
-double schulz_analytical_2DXY(SchulzParameters *pars, double x, double y) {
-    return schulz_analytical_1D(pars, x) * schulz_analytical_1D(pars, y);
-}
-
-/**
- * Function to evaluate 2D Schulz  function
- * The function is normalized to the 'scale' parameter.
- *
- * f(x,y) = Schulz(x) * Schulz(y)
- *
- * where both Gaussians share the same parameters.
- *
- * @param pars: parameters of the gaussian
- * @param length: length of the (x,y) vector
- * @param phi: angle relative to x
- * @return: function value
- */
-double schulz_analytical_2D(SchulzParameters *pars, double length, double phi) {
-    return schulz_analytical_2DXY(pars, length*cos(phi), length*sin(phi));
-}
Index: sansmodels/src/sans/models/c_extensions/schulz.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/schulz.h	(revision eba988511d86410985b5a1c35ce70dd3968132a8)
+++ 	(revision )
@@ -1,37 +1,0 @@
-#if !defined(schulz_h)
-#define schulz_h
-
-/** Structure definition for Schulz parameters.
- * The Schulz is normalized to the 'scale' parameter.
- *  
- * f(x)=scale * math.pow(z+1, z+1)*math.pow((R), z)*
- *					math.exp(-R*(z+1))/(center*gamma(z+1)
- *		z= math.pow[(1/(sigma/center),2]-1
- *		R= x/center
- * 
- * [PYTHONCLASS] = Schulz
- * [DESCRIPTION] = <text> f(x)=scale * math.pow(z+1, z+1)*math.pow((R), z)*
- 					math.exp(-R*(z+1))/(center*gamma(z+1)
- 		            z= math.pow[(1/(sigma/center),2]-1
- 					R= x/center</text>
- */
-typedef struct {
-    /// Scale factor 
-    //  [DEFAULT]=scale=1.0
-    double scale;
-    /// Standard deviation
-    //  [DEFAULT]=sigma=1 
-    double sigma;
-    /// Center of the Schulz distribution
-    //  [DEFAULT]=center=0.0 
-    double center;
-} SchulzParameters;
-
-/// 1D scattering function
-double schulz_analytical_1D(SchulzParameters *pars, double x);
-
-/// 2D scattering function
-double schulz_analytical_2D(SchulzParameters *pars, double x, double phi);
-double schulz_analytical_2DXY(SchulzParameters *pars, double x, double y);
-
-#endif
