Index: nsmodels/igor_wrapper/Doxyfile
===================================================================
--- sansmodels/igor_wrapper/Doxyfile	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,270 +1,0 @@
-# Doxyfile 1.5.1-p1
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME           = igor_wrapper
-PROJECT_NUMBER         = 
-OUTPUT_DIRECTORY       = doc
-CREATE_SUBDIRS         = NO
-OUTPUT_LANGUAGE        = English
-USE_WINDOWS_ENCODING   = NO
-BRIEF_MEMBER_DESC      = YES
-REPEAT_BRIEF           = YES
-ABBREVIATE_BRIEF       = "The $name class" \
-                         "The $name widget" \
-                         "The $name file" \
-                         is \
-                         provides \
-                         specifies \
-                         contains \
-                         represents \
-                         a \
-                         an \
-                         the
-ALWAYS_DETAILED_SEC    = NO
-INLINE_INHERITED_MEMB  = NO
-FULL_PATH_NAMES        = YES
-STRIP_FROM_PATH        = 
-STRIP_FROM_INC_PATH    = 
-SHORT_NAMES            = NO
-JAVADOC_AUTOBRIEF      = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP         = NO
-INHERIT_DOCS           = YES
-SEPARATE_MEMBER_PAGES  = NO
-TAB_SIZE               = 4
-ALIASES                = 
-OPTIMIZE_OUTPUT_FOR_C  = YES
-OPTIMIZE_OUTPUT_JAVA   = NO
-BUILTIN_STL_SUPPORT    = NO
-DISTRIBUTE_GROUP_DOC   = NO
-SUBGROUPING            = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL            = YES
-EXTRACT_PRIVATE        = NO
-EXTRACT_STATIC         = NO
-EXTRACT_LOCAL_CLASSES  = YES
-EXTRACT_LOCAL_METHODS  = NO
-HIDE_UNDOC_MEMBERS     = NO
-HIDE_UNDOC_CLASSES     = NO
-HIDE_FRIEND_COMPOUNDS  = NO
-HIDE_IN_BODY_DOCS      = NO
-INTERNAL_DOCS          = NO
-CASE_SENSE_NAMES       = YES
-HIDE_SCOPE_NAMES       = NO
-SHOW_INCLUDE_FILES     = YES
-INLINE_INFO            = YES
-SORT_MEMBER_DOCS       = YES
-SORT_BRIEF_DOCS        = NO
-SORT_BY_SCOPE_NAME     = NO
-GENERATE_TODOLIST      = YES
-GENERATE_TESTLIST      = YES
-GENERATE_BUGLIST       = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS       = 
-MAX_INITIALIZER_LINES  = 30
-SHOW_USED_FILES        = YES
-SHOW_DIRECTORIES       = YES
-FILE_VERSION_FILTER    = 
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET                  = NO
-WARNINGS               = YES
-WARN_IF_UNDOCUMENTED   = YES
-WARN_IF_DOC_ERROR      = YES
-WARN_NO_PARAMDOC       = NO
-WARN_FORMAT            = "$file:$line: $text"
-WARN_LOGFILE           = 
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT                  = . \
-                         src \
-                         include
-FILE_PATTERNS          = *.c \
-                         *.cc \
-                         *.cxx \
-                         *.cpp \
-                         *.c++ \
-                         *.d \
-                         *.java \
-                         *.ii \
-                         *.ixx \
-                         *.ipp \
-                         *.i++ \
-                         *.inl \
-                         *.h \
-                         *.hh \
-                         *.hxx \
-                         *.hpp \
-                         *.h++ \
-                         *.idl \
-                         *.odl \
-                         *.cs \
-                         *.php \
-                         *.php3 \
-                         *.inc \
-                         *.m \
-                         *.mm \
-                         *.dox \
-                         *.py \
-                         *.c \
-                         *.h
-RECURSIVE              = YES
-EXCLUDE                = build \
-                         dist \
-                         sans/models/test \
-                         libigor \
-                         igor_wrapper \
-                         sans/models/prototypes
-EXCLUDE_SYMLINKS       = NO
-EXCLUDE_PATTERNS       = 
-EXAMPLE_PATH           = 
-EXAMPLE_PATTERNS       = *
-EXAMPLE_RECURSIVE      = NO
-IMAGE_PATH             = doc
-INPUT_FILTER           = 
-FILTER_PATTERNS        = 
-FILTER_SOURCE_FILES    = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER         = NO
-INLINE_SOURCES         = NO
-STRIP_CODE_COMMENTS    = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION    = NO
-REFERENCES_LINK_SOURCE = YES
-USE_HTAGS              = NO
-VERBATIM_HEADERS       = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX     = NO
-COLS_IN_ALPHA_INDEX    = 5
-IGNORE_PREFIX          = 
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML          = YES
-HTML_OUTPUT            = html
-HTML_FILE_EXTENSION    = .html
-HTML_HEADER            = 
-HTML_FOOTER            = 
-HTML_STYLESHEET        = 
-HTML_ALIGN_MEMBERS     = YES
-GENERATE_HTMLHELP      = NO
-CHM_FILE               = 
-HHC_LOCATION           = 
-GENERATE_CHI           = NO
-BINARY_TOC             = NO
-TOC_EXPAND             = NO
-DISABLE_INDEX          = NO
-ENUM_VALUES_PER_LINE   = 4
-GENERATE_TREEVIEW      = NO
-TREEVIEW_WIDTH         = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX         = NO
-LATEX_OUTPUT           = latex
-LATEX_CMD_NAME         = latex
-MAKEINDEX_CMD_NAME     = makeindex
-COMPACT_LATEX          = NO
-PAPER_TYPE             = a4wide
-EXTRA_PACKAGES         = 
-LATEX_HEADER           = 
-PDF_HYPERLINKS         = NO
-USE_PDFLATEX           = YES
-LATEX_BATCHMODE        = NO
-LATEX_HIDE_INDICES     = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF           = NO
-RTF_OUTPUT             = rtf
-COMPACT_RTF            = NO
-RTF_HYPERLINKS         = NO
-RTF_STYLESHEET_FILE    = 
-RTF_EXTENSIONS_FILE    = 
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN           = NO
-MAN_OUTPUT             = man
-MAN_EXTENSION          = .3
-MAN_LINKS              = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML           = NO
-XML_OUTPUT             = xml
-XML_SCHEMA             = 
-XML_DTD                = 
-XML_PROGRAMLISTING     = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF   = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD       = NO
-PERLMOD_LATEX          = NO
-PERLMOD_PRETTY         = YES
-PERLMOD_MAKEVAR_PREFIX = 
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING   = YES
-MACRO_EXPANSION        = NO
-EXPAND_ONLY_PREDEF     = NO
-SEARCH_INCLUDES        = YES
-INCLUDE_PATH           = 
-INCLUDE_FILE_PATTERNS  = 
-PREDEFINED             = 
-EXPAND_AS_DEFINED      = 
-SKIP_FUNCTION_MACROS   = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-TAGFILES               = 
-GENERATE_TAGFILE       = 
-ALLEXTERNALS           = NO
-EXTERNAL_GROUPS        = YES
-PERL_PATH              = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS         = NO
-HIDE_UNDOC_RELATIONS   = YES
-HAVE_DOT               = NO
-CLASS_GRAPH            = NO
-COLLABORATION_GRAPH    = NO
-GROUP_GRAPHS           = YES
-UML_LOOK               = YES
-TEMPLATE_RELATIONS     = YES
-INCLUDE_GRAPH          = YES
-INCLUDED_BY_GRAPH      = YES
-CALL_GRAPH             = YES
-CALLER_GRAPH           = YES
-GRAPHICAL_HIERARCHY    = YES
-DIRECTORY_GRAPH        = YES
-DOT_IMAGE_FORMAT       = png
-DOT_PATH               = 
-DOTFILE_DIRS           = 
-MAX_DOT_GRAPH_WIDTH    = 1024
-MAX_DOT_GRAPH_HEIGHT   = 1024
-MAX_DOT_GRAPH_DEPTH    = 1000
-DOT_TRANSPARENT        = NO
-DOT_MULTI_TARGETS      = NO
-GENERATE_LEGEND        = YES
-DOT_CLEANUP            = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-SEARCHENGINE           = NO
Index: nsmodels/igor_wrapper/headerGenerator.py
===================================================================
--- sansmodels/igor_wrapper/headerGenerator.py	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,78 +1,0 @@
-#!/usr/bin/env python
-## \mainpage DANSE wrapper code for IGOR
-#
-# \section intro_sec Introduction
-# This module provides automatically generated code to help
-# use DANSE code in third party software like IGOR.
-#
-# Look under the Files tab of the Doxygen information
-# for details about the models. 
-#
-"""
-    @copyright 2007: University of Tennessee, for the DANSE project
-"""
-
-import os
-
-def write_header(path = 'src'):
-    """
-        Write a header file that imports all the header files in a directory
-        @param path: include path to analyze
-    """
-    
-    # Write a line for each file
-    # "double oriented_[C_FILENAME]_2D(double pars[], double q, double phi)"
-        #double disperse_cylinder_analytical_2D(double dp[], double q, double phi) {
-
-
-    
-    headerfile = open('include/danse.h', 'w')
-    template = open("templates/function_header_template.h", 'r')
-    
-    tmp_buf = template.read()
-    tmp_lines = tmp_buf.split('\n')
-    
-    # Get header file list
-    file_list = os.listdir(path)
-    func_list = ''
-    for file in file_list:
-        # Look for 'disp'
-        if file[:5]=='disp_':    
-            toks = file[5:].split('.')
-            func_list += "double oriented_%s_2D(double pars[], double q, double phi);\n" % toks[0]
-            func_list += "double disperse_%s_analytical_2D(double dp[], double q, double phi);\n" % toks[0]
-            
-            func_list += "double %s_Weights(double dp[], double *phi_values, double *phi_weights, int n_phi,\n" % toks[0]
-            func_list += "    double *theta_values, double *theta_weights, int n_theta, "
-            func_list += "double q, double phi_q);\n\n"
-            
-            print "Found %s" % file
-    
-    for tmp_line in tmp_lines:
-        
-        # Include file
-        newline = replaceToken(tmp_line, 
-                                    "[FUNCTION_LIST]", func_list)
-        
-        # Write new line to the wrapper .c file
-        headerfile.write(newline+'\n')            
-    
-    headerfile.close()
-    
-def replaceToken(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
-
-    
-if __name__ == '__main__':
-    write_header()
Index: nsmodels/igor_wrapper/igorGenerator.py
===================================================================
--- sansmodels/igor_wrapper/igorGenerator.py	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,333 +1,0 @@
-#!/usr/bin/env python
-""" WrapperGenerator class to generate model code automatically.
-  
-  This code was written as part of the DANSE project
-  http://danse.us/trac/sans/wiki/WikiStart
- 
-"""
-
-import os, sys
-
-class WrapperGenerator:
-    """ Python wrapper generator for C models
-    
-        The developer must provide a header file describing 
-        the new model.
-                
-        @author: Mathieu Doucet / UTK
-        @contact: mathieu.doucet@nist.gov
-    """
-    
-    def __init__(self, filename, args):
-        """ Initialization 
-            @param filename: path of header file to wrap
-            @param args: list of parameters to disperse
-        """
-        
-        ## 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 = ""
-        ## Base struct name
-        self.base_struct = ""
-        ## Base header file name
-        self.base_header = ""
-        ## Bindings to parameter array
-        self.translation_list = ""
-        self.counter = 0
-        self.disperse_count = 0
-        self.disperse_code = ""
-        self.added_list = ""
-        self.phi_index = -1
-        self.theta_index = -1
-        
-        self.disp_list = args
-            
-        
-    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')
-        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])
-                    
-                    # Find in dispersed list
-                    if toks[1] in self.disp_list:
-                        print "Found ", toks[1]
-                        self.disperse_code += "    // %s\n" % toks[1]
-                        self.disperse_code += "    paramList[%i] = %i;\n" % (self.disperse_count, self.counter)
-                        self.disperse_count += 1
-                        
-                    #self.pythonClass = toks[1].lstrip().rstrip()
-                    units = ""
-                    if len(toks2) >= 2:
-                        units = toks2[1]
-                    self.default_list += "    //         pars[%i]:   %-15s = %s %s\n" % \
-                        (self.counter, toks[1], val, units)
-                       
-                    # Identify theta and phi indices, if present 
-                    if toks[1].count('phi'):
-                        self.phi_index = self.counter
-                    if toks[1].count('theta'):
-                        self.theta_index = self.counter
-                        
-                    # Bindings
-                    self.translation_list += "    danse_pars.%s = pars[%i];\n" % ( toks[1], self.counter)
-                    self.counter += 1
-                  
-                except:
-                    raise ValueError, "Could not parse input file %s \n  %s" % \
-                        (self.file, sys.exc_value)
-                
-                
-    def write_c_wrapper(self):
-        """ 
-        Writes the C file to create the dispersed model function
-        """
-        
-        toks = os.path.basename(self.file).split('.')
-        file = open("src/disp_"+toks[0]+'.c', 'w')
-        template = open("templates/disperse_template.c", 'r')
-        
-        tmp_buf = template.read()
-        #tmp_lines = string.split(tmp_buf,'\n')
-        tmp_lines = tmp_buf.split('\n')
-        
-        
-        self.translation_list = self.default_list+self.translation_list
-        
-        sigma_txt = "\n"
-        for i in range(len(self.disp_list)):
-            ipar = self.counter+i
-            sigma_txt += "    sigmaList[%i] = dp[%i];\n" % (i, ipar)
-            
-        ipar = self.counter+len(self.disp_list)
-        sigma_txt += "\n    npts = (int)(floor(dp[%i]));\n" % ipar
-                      
-        self.disperse_code += sigma_txt
-        
-        # Document the added (dispersed) parameters
-        added_pars_txt = "\n"
-        for i in range(len(self.disp_list)):
-            ipar = self.counter+i
-            added_pars_txt += "    //         pars[%i]:   dispersion of %s\n" % (ipar, self.disp_list[i])
-            
-        ipar = self.counter+len(self.disp_list)
-        added_pars_txt += "    //         pars[%s]:   number of points in dispersion curve\n" % \
-                    str(self.counter+len(self.disp_list))                              
-        
-        
-        for tmp_line in tmp_lines:
-            
-            # Catch class name
-            newline = self.replaceToken(tmp_line, 
-                                        "[PYTHONCLASS]", 'C'+self.pythonClass)
-            
-            # Catch class name
-            newline = self.replaceToken(newline, 
-                                        "[MODELSTRUCT]", self.structName)
-            
-            # Dictionary initialization
-            param_str = "// bindings to parameter array\n"
-            newline = self.replaceToken(newline, 
-                                        "[BINDINGS]", self.translation_list)
-                            
-            newline = self.replaceToken(newline, 
-                                        "[DISPERSE]", self.disperse_code)
-            
-            # Name of .c file
-            #toks = string.split(self.file,'.')
-            toks = os.path.basename(self.file).split('.')
-            newline = self.replaceToken(newline, "[C_FILENAME]", toks[0])
-            
-            # Include file
-            newline = self.replaceToken(newline, 
-                                        "[INCLUDE_FILE]", os.path.basename(self.file))
-            
-            # Include file
-            newline = self.replaceToken(newline, 
-                                        "[NDISPERSE]", str(len(self.disp_list)))
-            
-            # Number of parameters
-            newline = self.replaceToken(newline, 
-                                        "[NPARS]", str(self.counter+len(self.disp_list)+1))
-            
-            # Documentation
-            newline = self.replaceToken(newline, 
-                                        "[PARS_LIST]", self.default_list+added_pars_txt)
-            
-            # Write new line to the wrapper .c file
-            file.write(newline+'\n')
-            
-            
-        file.close()
-        
-        
-    def write_weight_function(self):
-        """ 
-            Writes the C file to create the dispersed model function
-            with angular distributions
-        """
-        # If we dont' have any angle, just return
-        if self.phi_index<0 and self.theta_index<0:
-            return
-        
-        
-        toks = os.path.basename(self.file).split('.')
-        file = open("src/weighted_"+toks[0]+'.c', 'w')
-        template = open("templates/weighted_template.c", 'r')
-        
-        tmp_buf = template.read()
-        tmp_lines = tmp_buf.split('\n')
-           
-        #self.translation_list = self.default_list+self.translation_list
-        added_pars_txt = "\n"
-        for i in range(len(self.disp_list)):
-            ipar = self.counter+i
-            added_pars_txt += "    //         pars[%i]:   dispersion of %s\n" % (ipar, self.disp_list[i])
-            
-        ipar = self.counter+len(self.disp_list)
-        added_pars_txt += "    //         pars[%s]:   number of points in dispersion curve\n" % \
-                    str(self.counter+len(self.disp_list))
-        added_pars_txt += " * \n"
-        added_pars_txt += " * NOTE: DO NOT USE THETA AND PHI PARAMETERS WHEN\n"
-        added_pars_txt += " *       USING THIS FUNCTION TO APPLY ANGULAR DISTRIBUTIONS."  
-                              
-        
-        
-        for tmp_line in tmp_lines:
-            
-            # Catch class name
-            newline = self.replaceToken(tmp_line, 
-                                        "[PYTHONCLASS]", self.pythonClass)
-            
-            # Dictionary initialization
-            param_str = "// bindings to parameter array\n"
-            newline = self.replaceToken(newline, 
-                                        "[PARS_LIST]", self.default_list+added_pars_txt)
-                            
-            # Name of .c file
-            #toks = string.split(self.file,'.')
-            toks = os.path.basename(self.file).split('.')
-            newline = self.replaceToken(newline, "[MODEL_NAME]", toks[0])
-            
-            toks = os.path.basename(self.file).split('.')
-            newline = self.replaceToken(newline, "[C_FILE_NAME]", "disp_%s.c" % toks[0])
-            
-            # Include file
-            newline = self.replaceToken(newline, 
-                                        "[INCLUDE_FILE]", os.path.basename(self.file))
-            
-            # Include file
-            #newline = self.replaceToken(newline, 
-            #                            "[NDISPERSE]", str(len(self.disp_list)))
-            
-            # Number of parameters
-            newline = self.replaceToken(newline, 
-                                        "[NPARS]",  str(self.counter+len(self.disp_list)+1))
-            
-            # Theta index
-            newline = self.replaceToken(newline, 
-                                        "[THETA_INDEX]",  str(self.theta_index))
-            
-            # Phi index
-            newline = self.replaceToken(newline, 
-                                        "[PHI_INDEX]",  str(self.phi_index))
-            
-            # 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], sys.argv[2:])
-        app.read()
-        app.write_c_wrapper()
-        app.write_weight_function()
-    else:
-        print "Usage: python igorGenerator.py [header file] [list of parameters to disperse]"
-        print ""
-        print "Example: "
-        print "    python igorGenerator.py cylinder.h cyl_phi cyl_theta"
-   
-# End of file        
Index: nsmodels/igor_wrapper/include/c_disperser.h
===================================================================
--- sansmodels/igor_wrapper/include/c_disperser.h	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/**
- * Straight C disperser
- * 
- * This code was written as part of the DANSE project
- * http://danse.us/trac/sans/
- *
- * Copyright 2007: University of Tennessee, for the DANSE project
- */
-#if !defined(c_disperser_h)
-#define c_disperser_h
-
-double c_disperser( double (*eval)(double[], double, double), double dp[], int n_pars, 
-					int *idList, double *sigmaList, int n_pts, double q, double phi );
-
-double weight_dispersion( double (*eval)(double[], double, double), 
-						  double *par_values, double *weight_values, 
-						  int npts, int i_par,
-						  double dp[], double q, double phi );
-
-
-#endif
Index: nsmodels/igor_wrapper/include/danse.h
===================================================================
--- sansmodels/igor_wrapper/include/danse.h	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/**
- * DANSE function header
- * 
- * WARNING: THIS FILE WAS GENERATED BY HEADERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE
- *
- *  This code was written as part of the DANSE project
- *  http://danse.us/trac/sans/
- *  
- *  @copyright 2007: University of Tennessee, for the DANSE project
- *
- */
-#if !defined(function_header_h)
-#define function_header_h
-
-double oriented_core_shell_cylinder_2D(double pars[], double q, double phi);
-double disperse_core_shell_cylinder_analytical_2D(double dp[], double q, double phi);
-double core_shell_cylinder_Weights(double dp[], double *phi_values, double *phi_weights, int n_phi,
-    double *theta_values, double *theta_weights, int n_theta, double q, double phi_q);
-
-double oriented_cylinder_2D(double pars[], double q, double phi);
-double disperse_cylinder_analytical_2D(double dp[], double q, double phi);
-double cylinder_Weights(double dp[], double *phi_values, double *phi_weights, int n_phi,
-    double *theta_values, double *theta_weights, int n_theta, double q, double phi_q);
-
-double oriented_ellipsoid_2D(double pars[], double q, double phi);
-double disperse_ellipsoid_analytical_2D(double dp[], double q, double phi);
-double ellipsoid_Weights(double dp[], double *phi_values, double *phi_weights, int n_phi,
-    double *theta_values, double *theta_weights, int n_theta, double q, double phi_q);
-
-double oriented_elliptical_cylinder_2D(double pars[], double q, double phi);
-double disperse_elliptical_cylinder_analytical_2D(double dp[], double q, double phi);
-double elliptical_cylinder_Weights(double dp[], double *phi_values, double *phi_weights, int n_phi,
-    double *theta_values, double *theta_weights, int n_theta, double q, double phi_q);
-
-
-#endif
-
-
Index: nsmodels/igor_wrapper/release_notes.txt
===================================================================
--- sansmodels/igor_wrapper/release_notes.txt	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,8 +1,0 @@
-The files in this directory should be compiled with files 
-in the following directory:
-
- ../libigor  (or equivalent if you are using the NIST igor libraries)
-
- You will also need the DANSE models and disperser.c in:
- 
- ../sans/models/c_extensions  					
Index: nsmodels/igor_wrapper/src/c_disperser.c
===================================================================
--- sansmodels/igor_wrapper/src/c_disperser.c	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,197 +1,0 @@
-/**
- * Straight C disperser
- * 
- * This code was written as part of the DANSE project
- * http://danse.us/trac/sans/
- *
- * Copyright 2007: University of Tennessee, for the DANSE project
- */
-#include "math.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-/**
- * Weight distribution to give to each point in the dispersion
- * The distribution is a Gaussian with
- * 
- * @param mean: mean value of the Gaussian
- * @param sigma: sigma of the Gaussian
- * @param x: point to evaluate at
- * @return: weight value
- * 
- */
-double c_disperser_weight(double mean, double sigma, double x) {
-	double vary, expo_value;
-    vary = x-mean;
-    expo_value = -vary*vary/(2*sigma*sigma);
-    return exp(expo_value);
-}
-
-/**
- * Function to apply dispersion to a list of parameters.
- * 
- * This function is re-entrant. It should be called with iPar=0.
- * It will then call itself with increasing values for iPar until
- * all parameters to be dispersed have been dealt with.
- *
- * 
- * @param eval: pointer to the function used to evaluate the model at
- * 				a particular point.
- * @param dp: complete array of parameter values for the model.
- * @param n_pars: number of parameters to apply dispersion to.
- * @param idList: list of parameter indices for the parameters to apply
- * 				dispersion to. For a given parameter, its index is the
- * 				index of its position in the parameter vector of the model
- * 				function.
- * @param sigmaList: list of sigma values for the parameters to apply 
- * 				dispersion to.
- * @param centers: list of mean values for the parameters to apply 
- * 				dispersion to.
- * @param n_pts: number of points to use when applying dispersion.
- * @param q: q-value to evaluate the model at.
- * @param phi: angle of the q-vector with the q_x axis.
- * @param iPar: index of the parameter to apply dispersion to (should
- * 				be 0 when called by the user). 
- * 
- */
-double c_disperseParam( double (*eval)(double[], double, double), double dp[], int n_pars, 
-					int *idList, double *sigmaList, double *centers, 
-					int n_pts, double q, double phi, int iPar ) {
-	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 n_sigma;
-	int i;
-	// Number of std variations to average over	
-	n_sigma = 2;	
-    if( iPar < n_pars ) {
-            
-		// Average over Gaussian distribution (2 sigmas)
-        value_sum = 0.0;
-        gauss_sum = 0.0;
-            
-        // Average over 4 sigmas wide
-        min_value = centers[iPar] - n_sigma*sigmaList[iPar];
-        max_value = centers[iPar] + n_sigma*sigmaList[iPar];
-            
-        // 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 c_disperseParam(eval, dp, n_pars, idList, sigmaList, 
-            						centers, n_pts, q, phi, iPar+1);
-        }
-            
-        // 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;
-            dp[idList[iPar]] = value;
-                
-			gauss_value = c_disperser_weight(centers[iPar], sigmaList[iPar], value);
-            func_value = c_disperseParam(eval, dp, n_pars, idList, sigmaList, 
-            						centers, n_pts, q, phi, iPar+1);
-
-            value_sum += gauss_value * func_value;
-        	gauss_sum += gauss_value;	
-        }   
-        return value_sum/gauss_sum;
-        
-    } else {
-    	 return (*eval)(dp, q, phi);
-    }
-	
-}
-
-/**
- * Function to add dispersion to a model.
- * The dispersion is Gaussian around the value of given parameters.
- * 
- * @param eval: pointer to the function used to evaluate the model at
- * 				a particular point.
- * @param n_pars: number of parameters to apply dispersion to.
- * @param idList: list of parameter indices for the parameters to apply
- * 				dispersion to. For a given parameter, its index is the
- * 				index of its position in the parameter vector of the model
- * 				function.
- * @param sigmaList: list of sigma values for the parameters to apply 
- * 				dispersion to.
- * @param n_pts: number of points to use when applying dispersion.
- * @param q: q-value to evaluate the model at.
- * @param phi: angle of the q-vector with the q_x axis.
- * 
- */
-double c_disperser( double (*eval)(double[], double, double), double dp[], int n_pars, 
-					int *idList, double *sigmaList, int n_pts, double q, double phi ) {
-	double *centers;
-	double value;
-	int i;
-	
-	// Allocate centers array
-	if( n_pars > 0 ) {
-	    centers = (double *)malloc(n_pars * sizeof(double));
-		if(centers==NULL) {
-		    printf("c_disperser could not allocate memory\n");
-			return 0.0;
-		}
-	}
-	
-	// Store current values in centers array
-	for(i=0; i<n_pars; i++) {
-		centers[i] = dp[idList[i]];	
-	}
-	
-	
-	if( n_pars > 0 ) {
-		value = c_disperseParam(eval, dp, n_pars, idList, sigmaList, centers, n_pts, q, phi, 0);
-    } else {
-    	value = (*eval)(dp, q, phi);
-	}
-	free(centers);
-	return value;
-}
-
-/**
- * 
- * Angles are in radian.
- * 
- * 
- */
-double weight_dispersion( double (*eval)(double[], double, double), 
-						  double *par_values, double *weight_values, 
-						  int npts, int i_par,
-						  double dp[], double q, double phi ) {
-	int i;
-	double value;
-	double norma;
-				
-	value = 0.0;
-	norma = 0.0;	  	
-
-	// If we have an empty array of points, just 
-	// evaluate the function
-	if(npts == 0) {
-		return (*eval)(dp, q, phi);
-	} else {
-		for(i=0; i<npts; i++) {
-			dp[i_par] = par_values[i];
-			value += weight_values[i] * (*eval)(dp, q, phi);
-			//dp[i_par] = -par_values[i];
-			//value += weight_values[i] * (*eval)(dp, q, phi);
-			
-			norma += weight_values[i];
-		}
-	}
-	return value/norma/2.0;
-						  	
-}
Index: nsmodels/igor_wrapper/src/disp_core_shell_cylinder.c
===================================================================
--- sansmodels/igor_wrapper/src/disp_core_shell_cylinder.c	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,117 +1,0 @@
-/**
- * Scattering intensity for dispersed CCoreShellCylinderModel
- * 
- * WARNING: THIS FILE WAS GENERATED BY IGORGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY core_shell_cylinder.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * This code was written as part of the DANSE project
- * http://danse.us/trac/sans/
- *
- * Copyright 2007: University of Tennessee, for the DANSE project
- */
-
-#include "core_shell_cylinder.h"
-#include <math.h>
-#include "libCylinder.h"
-#include "libSphere.h"
-#include "c_disperser.h"
-
-/**
- * Function to evaluate 2D scattering function
- * 
- * @param dp: parameters of the function
- * @param q: q-value
- * @param phi: angle of the q-vector in the plane of the detector, relative to q_x
- * @return: function value
- */
-double oriented_core_shell_cylinder_2D(double pars[], double q, double phi) {
-	CoreShellCylinderParameters danse_pars;
-	
-    // List of default parameters:
-    //         pars[0]:   scale           = 1.0 
-    //         pars[1]:   radius          = 20.0 A
-    //         pars[2]:   thickness       = 10.0 A
-    //         pars[3]:   length          = 400.0 A
-    //         pars[4]:   core_sld        = 1e-06 A-2
-    //         pars[5]:   shell_sld       = 4e-06 A-2
-    //         pars[6]:   solvent_sld     = 1e-06 A-2
-    //         pars[7]:   background      = 0.0 cm-1
-    //         pars[8]:   axis_theta      = 1.57 rad
-    //         pars[9]:   axis_phi        = 0.0 rad
-    danse_pars.scale = pars[0];
-    danse_pars.radius = pars[1];
-    danse_pars.thickness = pars[2];
-    danse_pars.length = pars[3];
-    danse_pars.core_sld = pars[4];
-    danse_pars.shell_sld = pars[5];
-    danse_pars.solvent_sld = pars[6];
-    danse_pars.background = pars[7];
-    danse_pars.axis_theta = pars[8];
-    danse_pars.axis_phi = pars[9];
-
-	return core_shell_cylinder_analytical_2D(&danse_pars, q, phi);		
-}
-	
-/**
- * Function to evaluate dispersed 2D scattering function
- * 
- * @param dp: parameters of the function
- * @param q: q-value
- * @param phi: angle of the q-vector in the plane of the detector, relative to q_x
- * @return: function value
- * 
-     // List of default parameters:
-    //         pars[0]:   scale           = 1.0 
-    //         pars[1]:   radius          = 20.0 A
-    //         pars[2]:   thickness       = 10.0 A
-    //         pars[3]:   length          = 400.0 A
-    //         pars[4]:   core_sld        = 1e-06 A-2
-    //         pars[5]:   shell_sld       = 4e-06 A-2
-    //         pars[6]:   solvent_sld     = 1e-06 A-2
-    //         pars[7]:   background      = 0.0 cm-1
-    //         pars[8]:   axis_theta      = 1.57 rad
-    //         pars[9]:   axis_phi        = 0.0 rad
-
-    //         pars[10]:   dispersion of radius
-    //         pars[11]:   dispersion of thickness
-    //         pars[12]:   dispersion of axis_theta
-    //         pars[13]:   dispersion of axis_phi
-    //         pars[14]:   number of points in dispersion curve
-
- */
-double disperse_core_shell_cylinder_analytical_2D(double dp[], double q, double phi) {
-	int paramList[4];
-	double sigmaList[4];
-	int npts;
-	int i;
-	double pars[15];
-	
-    // radius
-    paramList[0] = 1;
-    // thickness
-    paramList[1] = 2;
-    // axis_theta
-    paramList[2] = 8;
-    // axis_phi
-    paramList[3] = 9;
-
-    sigmaList[0] = dp[10];
-    sigmaList[1] = dp[11];
-    sigmaList[2] = dp[12];
-    sigmaList[3] = dp[13];
-
-    npts = (int)(floor(dp[14]));
-
-
-	// Internal copy of parameters
-	for(i=0; i<15; i++ ) {
-		pars[i] = dp[i];
-	}
-
-	return c_disperser( &oriented_core_shell_cylinder_2D, pars, 4, 
-					paramList, sigmaList, npts, q, phi ); 
-
-	
-}
-    
Index: nsmodels/igor_wrapper/src/disp_cylinder.c
===================================================================
--- sansmodels/igor_wrapper/src/disp_cylinder.c	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,104 +1,0 @@
-/**
- * Scattering intensity for dispersed CCylinderModel
- * 
- * WARNING: THIS FILE WAS GENERATED BY IGORGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY cylinder.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * This code was written as part of the DANSE project
- * http://danse.us/trac/sans/
- *
- * Copyright 2007: University of Tennessee, for the DANSE project
- */
-
-#include "cylinder.h"
-#include <math.h>
-#include "libCylinder.h"
-#include "libSphere.h"
-#include "c_disperser.h"
-
-/**
- * Function to evaluate 2D scattering function
- * 
- * @param dp: parameters of the function
- * @param q: q-value
- * @param phi: angle of the q-vector in the plane of the detector, relative to q_x
- * @return: function value
- */
-double oriented_cylinder_2D(double pars[], double q, double phi) {
-	CylinderParameters danse_pars;
-	
-    // List of default parameters:
-    //         pars[0]:   scale           = 1.0 
-    //         pars[1]:   radius          = 20.0 A
-    //         pars[2]:   length          = 400.0 A
-    //         pars[3]:   contrast        = 3e-06 A-2
-    //         pars[4]:   background      = 0.0 cm-1
-    //         pars[5]:   cyl_theta       = 1.0 rad
-    //         pars[6]:   cyl_phi         = 1.0 rad
-    danse_pars.scale = pars[0];
-    danse_pars.radius = pars[1];
-    danse_pars.length = pars[2];
-    danse_pars.contrast = pars[3];
-    danse_pars.background = pars[4];
-    danse_pars.cyl_theta = pars[5];
-    danse_pars.cyl_phi = pars[6];
-
-	return cylinder_analytical_2D(&danse_pars, q, phi);		
-}
-	
-/**
- * Function to evaluate dispersed 2D scattering function
- * 
- * @param dp: parameters of the function
- * @param q: q-value
- * @param phi: angle of the q-vector in the plane of the detector, relative to q_x
- * @return: function value
- * 
-     // List of default parameters:
-    //         pars[0]:   scale           = 1.0 
-    //         pars[1]:   radius          = 20.0 A
-    //         pars[2]:   length          = 400.0 A
-    //         pars[3]:   contrast        = 3e-06 A-2
-    //         pars[4]:   background      = 0.0 cm-1
-    //         pars[5]:   cyl_theta       = 1.0 rad
-    //         pars[6]:   cyl_phi         = 1.0 rad
-
-    //         pars[7]:   dispersion of radius
-    //         pars[8]:   dispersion of cyl_theta
-    //         pars[9]:   dispersion of cyl_phi
-    //         pars[10]:   number of points in dispersion curve
-
- */
-double disperse_cylinder_analytical_2D(double dp[], double q, double phi) {
-	int paramList[3];
-	double sigmaList[3];
-	int npts;
-	int i;
-	double pars[11];
-	
-    // radius
-    paramList[0] = 1;
-    // cyl_theta
-    paramList[1] = 5;
-    // cyl_phi
-    paramList[2] = 6;
-
-    sigmaList[0] = dp[7];
-    sigmaList[1] = dp[8];
-    sigmaList[2] = dp[9];
-
-    npts = (int)(floor(dp[10]));
-
-
-	// Internal copy of parameters
-	for(i=0; i<11; i++ ) {
-		pars[i] = dp[i];
-	}
-
-	return c_disperser( &oriented_cylinder_2D, pars, 3, 
-					paramList, sigmaList, npts, q, phi ); 
-
-	
-}
-    
Index: nsmodels/igor_wrapper/src/disp_ellipsoid.c
===================================================================
--- sansmodels/igor_wrapper/src/disp_ellipsoid.c	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,108 +1,0 @@
-/**
- * Scattering intensity for dispersed CEllipsoidModel
- * 
- * WARNING: THIS FILE WAS GENERATED BY IGORGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY ellipsoid.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * This code was written as part of the DANSE project
- * http://danse.us/trac/sans/
- *
- * Copyright 2007: University of Tennessee, for the DANSE project
- */
-
-#include "ellipsoid.h"
-#include <math.h>
-#include "libCylinder.h"
-#include "libSphere.h"
-#include "c_disperser.h"
-
-/**
- * Function to evaluate 2D scattering function
- * 
- * @param dp: parameters of the function
- * @param q: q-value
- * @param phi: angle of the q-vector in the plane of the detector, relative to q_x
- * @return: function value
- */
-double oriented_ellipsoid_2D(double pars[], double q, double phi) {
-	EllipsoidParameters danse_pars;
-	
-    // List of default parameters:
-    //         pars[0]:   scale           = 1.0 
-    //         pars[1]:   radius_a        = 20.0 A
-    //         pars[2]:   radius_b        = 400.0 A
-    //         pars[3]:   contrast        = 3e-06 A-2
-    //         pars[4]:   background      = 0.0 cm-1
-    //         pars[5]:   axis_theta      = 1.57 rad
-    //         pars[6]:   axis_phi        = 0.0 rad
-    danse_pars.scale = pars[0];
-    danse_pars.radius_a = pars[1];
-    danse_pars.radius_b = pars[2];
-    danse_pars.contrast = pars[3];
-    danse_pars.background = pars[4];
-    danse_pars.axis_theta = pars[5];
-    danse_pars.axis_phi = pars[6];
-
-	return ellipsoid_analytical_2D(&danse_pars, q, phi);		
-}
-	
-/**
- * Function to evaluate dispersed 2D scattering function
- * 
- * @param dp: parameters of the function
- * @param q: q-value
- * @param phi: angle of the q-vector in the plane of the detector, relative to q_x
- * @return: function value
- * 
-     // List of default parameters:
-    //         pars[0]:   scale           = 1.0 
-    //         pars[1]:   radius_a        = 20.0 A
-    //         pars[2]:   radius_b        = 400.0 A
-    //         pars[3]:   contrast        = 3e-06 A-2
-    //         pars[4]:   background      = 0.0 cm-1
-    //         pars[5]:   axis_theta      = 1.57 rad
-    //         pars[6]:   axis_phi        = 0.0 rad
-
-    //         pars[7]:   dispersion of radius_a
-    //         pars[8]:   dispersion of radius_b
-    //         pars[9]:   dispersion of axis_theta
-    //         pars[10]:   dispersion of axis_phi
-    //         pars[11]:   number of points in dispersion curve
-
- */
-double disperse_ellipsoid_analytical_2D(double dp[], double q, double phi) {
-	int paramList[4];
-	double sigmaList[4];
-	int npts;
-	int i;
-	double pars[12];
-	
-    // radius_a
-    paramList[0] = 1;
-    // radius_b
-    paramList[1] = 2;
-    // axis_theta
-    paramList[2] = 5;
-    // axis_phi
-    paramList[3] = 6;
-
-    sigmaList[0] = dp[7];
-    sigmaList[1] = dp[8];
-    sigmaList[2] = dp[9];
-    sigmaList[3] = dp[10];
-
-    npts = (int)(floor(dp[11]));
-
-
-	// Internal copy of parameters
-	for(i=0; i<12; i++ ) {
-		pars[i] = dp[i];
-	}
-
-	return c_disperser( &oriented_ellipsoid_2D, pars, 4, 
-					paramList, sigmaList, npts, q, phi ); 
-
-	
-}
-    
Index: nsmodels/igor_wrapper/src/disp_elliptical_cylinder.c
===================================================================
--- sansmodels/igor_wrapper/src/disp_elliptical_cylinder.c	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,114 +1,0 @@
-/**
- * Scattering intensity for dispersed CEllipticalCylinderModel
- * 
- * WARNING: THIS FILE WAS GENERATED BY IGORGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY elliptical_cylinder.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * This code was written as part of the DANSE project
- * http://danse.us/trac/sans/
- *
- * Copyright 2007: University of Tennessee, for the DANSE project
- */
-
-#include "elliptical_cylinder.h"
-#include <math.h>
-#include "libCylinder.h"
-#include "libSphere.h"
-#include "c_disperser.h"
-
-/**
- * Function to evaluate 2D scattering function
- * 
- * @param dp: parameters of the function
- * @param q: q-value
- * @param phi: angle of the q-vector in the plane of the detector, relative to q_x
- * @return: function value
- */
-double oriented_elliptical_cylinder_2D(double pars[], double q, double phi) {
-	EllipticalCylinderParameters danse_pars;
-	
-    // List of default parameters:
-    //         pars[0]:   scale           = 1.0 
-    //         pars[1]:   r_minor         = 20.0 A
-    //         pars[2]:   r_ratio         = 1.5 A
-    //         pars[3]:   length          = 400.0 A
-    //         pars[4]:   contrast        = 3e-06 A-2
-    //         pars[5]:   background      = 0.0 cm-1
-    //         pars[6]:   cyl_theta       = 1.57 rad
-    //         pars[7]:   cyl_phi         = 0.0 rad
-    //         pars[8]:   cyl_psi         = 0.0 rad
-    danse_pars.scale = pars[0];
-    danse_pars.r_minor = pars[1];
-    danse_pars.r_ratio = pars[2];
-    danse_pars.length = pars[3];
-    danse_pars.contrast = pars[4];
-    danse_pars.background = pars[5];
-    danse_pars.cyl_theta = pars[6];
-    danse_pars.cyl_phi = pars[7];
-    danse_pars.cyl_psi = pars[8];
-
-	return elliptical_cylinder_analytical_2D(&danse_pars, q, phi);		
-}
-	
-/**
- * Function to evaluate dispersed 2D scattering function
- * 
- * @param dp: parameters of the function
- * @param q: q-value
- * @param phi: angle of the q-vector in the plane of the detector, relative to q_x
- * @return: function value
- * 
-     // List of default parameters:
-    //         pars[0]:   scale           = 1.0 
-    //         pars[1]:   r_minor         = 20.0 A
-    //         pars[2]:   r_ratio         = 1.5 A
-    //         pars[3]:   length          = 400.0 A
-    //         pars[4]:   contrast        = 3e-06 A-2
-    //         pars[5]:   background      = 0.0 cm-1
-    //         pars[6]:   cyl_theta       = 1.57 rad
-    //         pars[7]:   cyl_phi         = 0.0 rad
-    //         pars[8]:   cyl_psi         = 0.0 rad
-
-    //         pars[9]:   dispersion of r_minor
-    //         pars[10]:   dispersion of r_ratio
-    //         pars[11]:   dispersion of cyl_theta
-    //         pars[12]:   dispersion of cyl_phi
-    //         pars[13]:   number of points in dispersion curve
-
- */
-double disperse_elliptical_cylinder_analytical_2D(double dp[], double q, double phi) {
-	int paramList[4];
-	double sigmaList[4];
-	int npts;
-	int i;
-	double pars[14];
-	
-    // r_minor
-    paramList[0] = 1;
-    // r_ratio
-    paramList[1] = 2;
-    // cyl_theta
-    paramList[2] = 6;
-    // cyl_phi
-    paramList[3] = 7;
-
-    sigmaList[0] = dp[9];
-    sigmaList[1] = dp[10];
-    sigmaList[2] = dp[11];
-    sigmaList[3] = dp[12];
-
-    npts = (int)(floor(dp[13]));
-
-
-	// Internal copy of parameters
-	for(i=0; i<14; i++ ) {
-		pars[i] = dp[i];
-	}
-
-	return c_disperser( &oriented_elliptical_cylinder_2D, pars, 4, 
-					paramList, sigmaList, npts, q, phi ); 
-
-	
-}
-    
Index: nsmodels/igor_wrapper/src/erf.c
===================================================================
--- sansmodels/igor_wrapper/src/erf.c	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,96 +1,0 @@
-/* erf.c
-reference - Haruhiko Okumura: C-gengo niyoru saishin algorithm jiten
-            (New Algorithm handbook in C language) (Gijyutsu hyouron
-            sha, Tokyo, 1991) p.227 [in Japanese]                 */
-#include <stdio.h>
-#include <math.h>
-
-#ifdef _MSC_VER
-
-
-#ifdef _WIN32
-# include <float.h>
-# if !defined __MINGW32__ || defined __NO_ISOCEXT
-#  ifndef isnan
-#   define isnan(x) _isnan(x)
-#  endif
-#  ifndef isinf
-#   define isinf(x) (!_finite(x) && !_isnan(x))
-#  endif
-#  ifndef finite
-#   define finite(x) _finite(x)
-#  endif
-# endif
-#endif
-
-static double q_gamma(double, double, double);
-
-/* Incomplete gamma function
-   1 / Gamma(a) * Int_0^x exp(-t) t^(a-1) dt  */
-static double p_gamma(a, x, loggamma_a)
-    double a, x, loggamma_a;
-{
-    int k;
-    double result, term, previous;
-
-    if (x >= 1 + a) return 1 - q_gamma(a, x, loggamma_a);
-    if (x == 0)     return 0;
-    result = term = exp(a * log(x) - x - loggamma_a) / a;
-    for (k = 1; k < 1000; k++) {
-        term *= x / (a + k);
-        previous = result;  result += term;
-        if (result == previous) return result;
-    }
-    fprintf(stderr, "erf.c:%d:p_gamma() could not converge.", __LINE__);
-    return result;
-}
-
-/* Incomplete gamma function
-   1 / Gamma(a) * Int_x^inf exp(-t) t^(a-1) dt  */
-static double q_gamma(a, x, loggamma_a)
-    double a, x, loggamma_a;
-{
-    int k;
-    double result, w, temp, previous;
-    double la = 1, lb = 1 + x - a;  /* Laguerre polynomial */
-
-    if (x < 1 + a) return 1 - p_gamma(a, x, loggamma_a);
-    w = exp(a * log(x) - x - loggamma_a);
-    result = w / lb;
-    for (k = 2; k < 1000; k++) {
-        temp = ((k - 1 - a) * (lb - la) + (k + x) * lb) / k;
-        la = lb;  lb = temp;
-        w *= (k - 1 - a) / k;
-        temp = w / (la * lb);
-        previous = result;  result += temp;
-        if (result == previous) return result;
-    }
-    fprintf(stderr, "erf.c:%d:q_gamma() could not converge.", __LINE__);
-    return result;
-}
-
-#define LOG_PI_OVER_2 0.572364942924700087071713675675 /* log_e(PI)/2 */
-
-double erf(x)
-    double x;
-{
-    if (!finite(x)) {
-        if (isnan(x)) return x;      /* erf(NaN)   = NaN   */
-        return (x>0 ? 1.0 : -1.0);   /* erf(+-inf) = +-1.0 */
-    }
-    if (x >= 0) return   p_gamma(0.5, x * x, LOG_PI_OVER_2);
-    else        return - p_gamma(0.5, x * x, LOG_PI_OVER_2);
-}
-
-double erfc(x)
-    double x;
-{
-    if (!finite(x)) {
-        if (isnan(x)) return x;      /* erfc(NaN)   = NaN      */
-        return (x>0 ? 0.0 : 2.0);    /* erfc(+-inf) = 0.0, 2.0 */
-    }
-    if (x >= 0) return  q_gamma(0.5, x * x, LOG_PI_OVER_2);
-    else        return  1 + p_gamma(0.5, x * x, LOG_PI_OVER_2);
-}
-
-#endif
Index: nsmodels/igor_wrapper/src/weighted_core_shell_cylinder.c
===================================================================
--- sansmodels/igor_wrapper/src/weighted_core_shell_cylinder.c	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,104 +1,0 @@
-/**
- * Evaluate CoreShellCylinderModel with angular distribution given
- * by user. 
- * 
- * This code was written as part of the DANSE project
- *  http://danse.us/trac/sans/
- *
- * WARNING: THIS FILE WAS GENERATED BY IGORGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY core_shell_cylinder.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *   
- *  @copyright 2007: University of Tennessee, for the DANSE project
- *
- */
-
-#include "c_disperser.h"
-#include "danse.h"
-#include <math.h>
-
-/**
- * Evaluate model for given angular distributions in theta and phi.
- * 
- * Angles are in radian.
- * 
- * See disp_core_shell_cylinder.c for more information about the model parameters.
- * 
- * @param dp: model parameters
- * @param phi_values: vector of phi_values
- * @param phi_weights: vector of weights for each entry in phi_values
- * @param n_phi: length of phi_values and phi_weights vectors
- * @param theta_values: vector of theta values
- * @param theta_weights: vector of weights for each entry in theta_values
- * @param n_theta: length of theta_Values and theta_weights vectors
- * @param q: q-value to evaluate the model at
- * @param phi_q: angle between the q-vector and the q_x axis
- * @return: scattering intensity
- * 
-    // List of default parameters:
-    //         pars[0]:   scale           = 1.0 
-    //         pars[1]:   radius          = 20.0 A
-    //         pars[2]:   thickness       = 10.0 A
-    //         pars[3]:   length          = 400.0 A
-    //         pars[4]:   core_sld        = 1e-06 A-2
-    //         pars[5]:   shell_sld       = 4e-06 A-2
-    //         pars[6]:   solvent_sld     = 1e-06 A-2
-    //         pars[7]:   background      = 0.0 cm-1
-    //         pars[8]:   axis_theta      = 1.57 rad
-    //         pars[9]:   axis_phi        = 0.0 rad
-
-    //         pars[10]:   dispersion of radius
-    //         pars[11]:   dispersion of thickness
-    //         pars[12]:   dispersion of axis_theta
-    //         pars[13]:   dispersion of axis_phi
-    //         pars[14]:   number of points in dispersion curve
- * 
- * NOTE: DO NOT USE THETA AND PHI PARAMETERS WHEN
- *       USING THIS FUNCTION TO APPLY ANGULAR DISTRIBUTIONS.
- * 
- */
-double core_shell_cylinder_Weights(double dp[], double *phi_values, double *phi_weights, int n_phi, 
-								double *theta_values, double *theta_weights, int n_theta, 
-								double q, double phi_q) {
-	// Copy of parameters
-	double pars[15];
-	// Parameter index for theta
-	int theta_index = 8;
-	// Parameter index for phi
-	int phi_index   = 9;
-	int i, i_theta;
-	double sum, norm;
-	
-	// Copy parameters because they will be modified
-	for(i=0; i<15; i++) {
-		pars[i] = dp[i];
-	}
-
-	if (n_theta == 0) {
-		return weight_dispersion( &disperse_core_shell_cylinder_analytical_2D,
-				phi_values, phi_weights, n_phi, phi_index, pars, q, phi_q );
-	} else {
-		sum = 0.0;
-		norm = 0.0;
-		
-		for(i_theta=0; i_theta<n_theta; i_theta++) {
-			// Assign new theta value
-			pars[theta_index] = theta_values[i_theta];
-			// Evaluate the function, weight by sin(theta) 
-			sum += sin(theta_values[i_theta]) * theta_weights[i_theta] * 
-					weight_dispersion( &disperse_core_shell_cylinder_analytical_2D,
-					phi_values, phi_weights, n_phi, phi_index, pars, q, phi_q );
-			// Keep track of normalization
-			norm += theta_weights[i_theta];
-		}
-		
-		// Protect against null weight vector
-		if(norm > 0) {
-			return sum/norm;
-		}
-	}
-	return 0.0;
-}
-
-
-
Index: nsmodels/igor_wrapper/src/weighted_cylinder.c
===================================================================
--- sansmodels/igor_wrapper/src/weighted_cylinder.c	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,100 +1,0 @@
-/**
- * Evaluate CylinderModel with angular distribution given
- * by user. 
- * 
- * This code was written as part of the DANSE project
- *  http://danse.us/trac/sans/
- *
- * WARNING: THIS FILE WAS GENERATED BY IGORGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY cylinder.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *   
- *  @copyright 2007: University of Tennessee, for the DANSE project
- *
- */
-
-#include "c_disperser.h"
-#include "danse.h"
-#include <math.h>
-
-/**
- * Evaluate model for given angular distributions in theta and phi.
- * 
- * Angles are in radian.
- * 
- * See disp_cylinder.c for more information about the model parameters.
- * 
- * @param dp: model parameters
- * @param phi_values: vector of phi_values
- * @param phi_weights: vector of weights for each entry in phi_values
- * @param n_phi: length of phi_values and phi_weights vectors
- * @param theta_values: vector of theta values
- * @param theta_weights: vector of weights for each entry in theta_values
- * @param n_theta: length of theta_Values and theta_weights vectors
- * @param q: q-value to evaluate the model at
- * @param phi_q: angle between the q-vector and the q_x axis
- * @return: scattering intensity
- * 
-    // List of default parameters:
-    //         pars[0]:   scale           = 1.0 
-    //         pars[1]:   radius          = 20.0 A
-    //         pars[2]:   length          = 400.0 A
-    //         pars[3]:   contrast        = 3e-06 A-2
-    //         pars[4]:   background      = 0.0 cm-1
-    //         pars[5]:   cyl_theta       = 1.0 rad
-    //         pars[6]:   cyl_phi         = 1.0 rad
-
-    //         pars[7]:   dispersion of radius
-    //         pars[8]:   dispersion of cyl_theta
-    //         pars[9]:   dispersion of cyl_phi
-    //         pars[10]:   number of points in dispersion curve
- * 
- * NOTE: DO NOT USE THETA AND PHI PARAMETERS WHEN
- *       USING THIS FUNCTION TO APPLY ANGULAR DISTRIBUTIONS.
- * 
- */
-double cylinder_Weights(double dp[], double *phi_values, double *phi_weights, int n_phi, 
-								double *theta_values, double *theta_weights, int n_theta, 
-								double q, double phi_q) {
-	// Copy of parameters
-	double pars[11];
-	// Parameter index for theta
-	int theta_index = 5;
-	// Parameter index for phi
-	int phi_index   = 6;
-	int i, i_theta;
-	double sum, norm;
-	
-	// Copy parameters because they will be modified
-	for(i=0; i<11; i++) {
-		pars[i] = dp[i];
-	}
-
-	if (n_theta == 0) {
-		return weight_dispersion( &disperse_cylinder_analytical_2D,
-				phi_values, phi_weights, n_phi, phi_index, pars, q, phi_q );
-	} else {
-		sum = 0.0;
-		norm = 0.0;
-		
-		for(i_theta=0; i_theta<n_theta; i_theta++) {
-			// Assign new theta value
-			pars[theta_index] = theta_values[i_theta];
-			// Evaluate the function, weight by sin(theta) 
-			sum += sin(theta_values[i_theta]) * theta_weights[i_theta] * 
-					weight_dispersion( &disperse_cylinder_analytical_2D,
-					phi_values, phi_weights, n_phi, phi_index, pars, q, phi_q );
-			// Keep track of normalization
-			norm += theta_weights[i_theta];
-		}
-		
-		// Protect against null weight vector
-		if(norm > 0) {
-			return sum/norm;
-		}
-	}
-	return 0.0;
-}
-
-
-
Index: nsmodels/igor_wrapper/src/weighted_ellipsoid.c
===================================================================
--- sansmodels/igor_wrapper/src/weighted_ellipsoid.c	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,101 +1,0 @@
-/**
- * Evaluate EllipsoidModel with angular distribution given
- * by user. 
- * 
- * This code was written as part of the DANSE project
- *  http://danse.us/trac/sans/
- *
- * WARNING: THIS FILE WAS GENERATED BY IGORGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY ellipsoid.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *   
- *  @copyright 2007: University of Tennessee, for the DANSE project
- *
- */
-
-#include "c_disperser.h"
-#include "danse.h"
-#include <math.h>
-
-/**
- * Evaluate model for given angular distributions in theta and phi.
- * 
- * Angles are in radian.
- * 
- * See disp_ellipsoid.c for more information about the model parameters.
- * 
- * @param dp: model parameters
- * @param phi_values: vector of phi_values
- * @param phi_weights: vector of weights for each entry in phi_values
- * @param n_phi: length of phi_values and phi_weights vectors
- * @param theta_values: vector of theta values
- * @param theta_weights: vector of weights for each entry in theta_values
- * @param n_theta: length of theta_Values and theta_weights vectors
- * @param q: q-value to evaluate the model at
- * @param phi_q: angle between the q-vector and the q_x axis
- * @return: scattering intensity
- * 
-    // List of default parameters:
-    //         pars[0]:   scale           = 1.0 
-    //         pars[1]:   radius_a        = 20.0 A
-    //         pars[2]:   radius_b        = 400.0 A
-    //         pars[3]:   contrast        = 3e-06 A-2
-    //         pars[4]:   background      = 0.0 cm-1
-    //         pars[5]:   axis_theta      = 1.57 rad
-    //         pars[6]:   axis_phi        = 0.0 rad
-
-    //         pars[7]:   dispersion of radius_a
-    //         pars[8]:   dispersion of radius_b
-    //         pars[9]:   dispersion of axis_theta
-    //         pars[10]:   dispersion of axis_phi
-    //         pars[11]:   number of points in dispersion curve
- * 
- * NOTE: DO NOT USE THETA AND PHI PARAMETERS WHEN
- *       USING THIS FUNCTION TO APPLY ANGULAR DISTRIBUTIONS.
- * 
- */
-double ellipsoid_Weights(double dp[], double *phi_values, double *phi_weights, int n_phi, 
-								double *theta_values, double *theta_weights, int n_theta, 
-								double q, double phi_q) {
-	// Copy of parameters
-	double pars[12];
-	// Parameter index for theta
-	int theta_index = 5;
-	// Parameter index for phi
-	int phi_index   = 6;
-	int i, i_theta;
-	double sum, norm;
-	
-	// Copy parameters because they will be modified
-	for(i=0; i<12; i++) {
-		pars[i] = dp[i];
-	}
-
-	if (n_theta == 0) {
-		return weight_dispersion( &disperse_ellipsoid_analytical_2D,
-				phi_values, phi_weights, n_phi, phi_index, pars, q, phi_q );
-	} else {
-		sum = 0.0;
-		norm = 0.0;
-		
-		for(i_theta=0; i_theta<n_theta; i_theta++) {
-			// Assign new theta value
-			pars[theta_index] = theta_values[i_theta];
-			// Evaluate the function, weight by sin(theta) 
-			sum += sin(theta_values[i_theta]) * theta_weights[i_theta] * 
-					weight_dispersion( &disperse_ellipsoid_analytical_2D,
-					phi_values, phi_weights, n_phi, phi_index, pars, q, phi_q );
-			// Keep track of normalization
-			norm += theta_weights[i_theta];
-		}
-		
-		// Protect against null weight vector
-		if(norm > 0) {
-			return sum/norm;
-		}
-	}
-	return 0.0;
-}
-
-
-
Index: nsmodels/igor_wrapper/src/weighted_elliptical_cylinder.c
===================================================================
--- sansmodels/igor_wrapper/src/weighted_elliptical_cylinder.c	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,103 +1,0 @@
-/**
- * Evaluate EllipticalCylinderModel with angular distribution given
- * by user. 
- * 
- * This code was written as part of the DANSE project
- *  http://danse.us/trac/sans/
- *
- * WARNING: THIS FILE WAS GENERATED BY IGORGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY elliptical_cylinder.h
- *          AND RE-RUN THE GENERATOR SCRIPT
- *   
- *  @copyright 2007: University of Tennessee, for the DANSE project
- *
- */
-
-#include "c_disperser.h"
-#include "danse.h"
-#include <math.h>
-
-/**
- * Evaluate model for given angular distributions in theta and phi.
- * 
- * Angles are in radian.
- * 
- * See disp_elliptical_cylinder.c for more information about the model parameters.
- * 
- * @param dp: model parameters
- * @param phi_values: vector of phi_values
- * @param phi_weights: vector of weights for each entry in phi_values
- * @param n_phi: length of phi_values and phi_weights vectors
- * @param theta_values: vector of theta values
- * @param theta_weights: vector of weights for each entry in theta_values
- * @param n_theta: length of theta_Values and theta_weights vectors
- * @param q: q-value to evaluate the model at
- * @param phi_q: angle between the q-vector and the q_x axis
- * @return: scattering intensity
- * 
-    // List of default parameters:
-    //         pars[0]:   scale           = 1.0 
-    //         pars[1]:   r_minor         = 20.0 A
-    //         pars[2]:   r_ratio         = 1.5 A
-    //         pars[3]:   length          = 400.0 A
-    //         pars[4]:   contrast        = 3e-06 A-2
-    //         pars[5]:   background      = 0.0 cm-1
-    //         pars[6]:   cyl_theta       = 1.57 rad
-    //         pars[7]:   cyl_phi         = 0.0 rad
-    //         pars[8]:   cyl_psi         = 0.0 rad
-
-    //         pars[9]:   dispersion of r_minor
-    //         pars[10]:   dispersion of r_ratio
-    //         pars[11]:   dispersion of cyl_theta
-    //         pars[12]:   dispersion of cyl_phi
-    //         pars[13]:   number of points in dispersion curve
- * 
- * NOTE: DO NOT USE THETA AND PHI PARAMETERS WHEN
- *       USING THIS FUNCTION TO APPLY ANGULAR DISTRIBUTIONS.
- * 
- */
-double elliptical_cylinder_Weights(double dp[], double *phi_values, double *phi_weights, int n_phi, 
-								double *theta_values, double *theta_weights, int n_theta, 
-								double q, double phi_q) {
-	// Copy of parameters
-	double pars[14];
-	// Parameter index for theta
-	int theta_index = 6;
-	// Parameter index for phi
-	int phi_index   = 7;
-	int i, i_theta;
-	double sum, norm;
-	
-	// Copy parameters because they will be modified
-	for(i=0; i<14; i++) {
-		pars[i] = dp[i];
-	}
-
-	if (n_theta == 0) {
-		return weight_dispersion( &disperse_elliptical_cylinder_analytical_2D,
-				phi_values, phi_weights, n_phi, phi_index, pars, q, phi_q );
-	} else {
-		sum = 0.0;
-		norm = 0.0;
-		
-		for(i_theta=0; i_theta<n_theta; i_theta++) {
-			// Assign new theta value
-			pars[theta_index] = theta_values[i_theta];
-			// Evaluate the function, weight by sin(theta) 
-			sum += sin(theta_values[i_theta]) * theta_weights[i_theta] * 
-					weight_dispersion( &disperse_elliptical_cylinder_analytical_2D,
-					phi_values, phi_weights, n_phi, phi_index, pars, q, phi_q );
-			// Keep track of normalization
-			norm += theta_weights[i_theta];
-		}
-		
-		// Protect against null weight vector
-		if(norm > 0) {
-			return sum/norm;
-		}
-	}
-	return 0.0;
-}
-
-
-
Index: nsmodels/igor_wrapper/templates/disperse_template.c
===================================================================
--- sansmodels/igor_wrapper/templates/disperse_template.c	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/**
- * Scattering intensity for dispersed [PYTHONCLASS]
- * 
- * WARNING: THIS FILE WAS GENERATED BY IGORGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY [INCLUDE_FILE]
- *          AND RE-RUN THE GENERATOR SCRIPT
- *
- * This code was written as part of the DANSE project
- * http://danse.us/trac/sans/
- *
- * Copyright 2007: University of Tennessee, for the DANSE project
- */
-
-#include "[INCLUDE_FILE]"
-#include <math.h>
-#include "libCylinder.h"
-#include "libSphere.h"
-#include "c_disperser.h"
-
-/**
- * Function to evaluate 2D scattering function
- * 
- * @param dp: parameters of the function
- * @param q: q-value
- * @param phi: angle of the q-vector in the plane of the detector, relative to q_x
- * @return: function value
- */
-double oriented_[C_FILENAME]_2D(double pars[], double q, double phi) {
-	[MODELSTRUCT] danse_pars;
-	
-[BINDINGS]
-	return [C_FILENAME]_analytical_2D(&danse_pars, q, phi);		
-}
-	
-/**
- * Function to evaluate dispersed 2D scattering function
- * 
- * @param dp: parameters of the function
- * @param q: q-value
- * @param phi: angle of the q-vector in the plane of the detector, relative to q_x
- * @return: function value
- * 
- [PARS_LIST]
- */
-double disperse_[C_FILENAME]_analytical_2D(double dp[], double q, double phi) {
-	int paramList[[NDISPERSE]];
-	double sigmaList[[NDISPERSE]];
-	int npts;
-	int i;
-	double pars[[NPARS]];
-	
-[DISPERSE]
-
-	// Internal copy of parameters
-	for(i=0; i<[NPARS]; i++ ) {
-		pars[i] = dp[i];
-	}
-
-	return c_disperser( &oriented_[C_FILENAME]_2D, pars, [NDISPERSE], 
-					paramList, sigmaList, npts, q, phi ); 
-
-	
-}
-    
Index: nsmodels/igor_wrapper/templates/function_header_template.h
===================================================================
--- sansmodels/igor_wrapper/templates/function_header_template.h	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,18 +1,0 @@
-/**
- * DANSE function header
- * 
- * WARNING: THIS FILE WAS GENERATED BY HEADERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE
- *
- *  This code was written as part of the DANSE project
- *  http://danse.us/trac/sans/
- *  
- *  @copyright 2007: University of Tennessee, for the DANSE project
- *
- */
-#if !defined(function_header_h)
-#define function_header_h
-
-[FUNCTION_LIST]
-#endif
-
Index: nsmodels/igor_wrapper/templates/weighted_template.c
===================================================================
--- sansmodels/igor_wrapper/templates/weighted_template.c	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,84 +1,0 @@
-/**
- * Evaluate [PYTHONCLASS] with angular distribution given
- * by user. 
- * 
- * This code was written as part of the DANSE project
- *  http://danse.us/trac/sans/
- *
- * WARNING: THIS FILE WAS GENERATED BY IGORGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY [INCLUDE_FILE]
- *          AND RE-RUN THE GENERATOR SCRIPT
- *   
- *  @copyright 2007: University of Tennessee, for the DANSE project
- *
- */
-
-#include "c_disperser.h"
-#include "danse.h"
-#include <math.h>
-
-/**
- * Evaluate model for given angular distributions in theta and phi.
- * 
- * Angles are in radian.
- * 
- * See [C_FILE_NAME] for more information about the model parameters.
- * 
- * @param dp: model parameters
- * @param phi_values: vector of phi_values
- * @param phi_weights: vector of weights for each entry in phi_values
- * @param n_phi: length of phi_values and phi_weights vectors
- * @param theta_values: vector of theta values
- * @param theta_weights: vector of weights for each entry in theta_values
- * @param n_theta: length of theta_Values and theta_weights vectors
- * @param q: q-value to evaluate the model at
- * @param phi_q: angle between the q-vector and the q_x axis
- * @return: scattering intensity
- * 
-[PARS_LIST]
- * 
- */
-double [MODEL_NAME]_Weights(double dp[], double *phi_values, double *phi_weights, int n_phi, 
-								double *theta_values, double *theta_weights, int n_theta, 
-								double q, double phi_q) {
-	// Copy of parameters
-	double pars[[NPARS]];
-	// Parameter index for theta
-	int theta_index = [THETA_INDEX];
-	// Parameter index for phi
-	int phi_index   = [PHI_INDEX];
-	int i, i_theta;
-	double sum, norm;
-	
-	// Copy parameters because they will be modified
-	for(i=0; i<[NPARS]; i++) {
-		pars[i] = dp[i];
-	}
-
-	if (n_theta == 0) {
-		return weight_dispersion( &disperse_[MODEL_NAME]_analytical_2D,
-				phi_values, phi_weights, n_phi, phi_index, pars, q, phi_q );
-	} else {
-		sum = 0.0;
-		norm = 0.0;
-		
-		for(i_theta=0; i_theta<n_theta; i_theta++) {
-			// Assign new theta value
-			pars[theta_index] = theta_values[i_theta];
-			// Evaluate the function, weight by sin(theta) 
-			sum += sin(theta_values[i_theta]) * theta_weights[i_theta] * 
-					weight_dispersion( &disperse_[MODEL_NAME]_analytical_2D,
-					phi_values, phi_weights, n_phi, phi_index, pars, q, phi_q );
-			// Keep track of normalization
-			norm += theta_weights[i_theta];
-		}
-		
-		// Protect against null weight vector
-		if(norm > 0) {
-			return sum/norm;
-		}
-	}
-	return 0.0;
-}
-
-
Index: nsmodels/igor_wrapper/test/Averager2D.py
===================================================================
--- sansmodels/igor_wrapper/test/Averager2D.py	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,320 +1,0 @@
-"""
-    Class to average an oriented model
-    Options:
-        - flat average in one or both coordinates (specified)
-        - given distribution in one or both coordinates (specified)
-        
-    Uses DisperseModel to allow for polydispersity
-"""
-
-from sans.models.BaseComponent import BaseComponent
-import copy, os, math
-    
-class Averager2D(BaseComponent):
-    
-
-    def __init__(self):
-        BaseComponent.__init__(self)
-        self.params = {}
-        self.model      = None
-        self.dispersed  = None
-        self.phi_file   = None
-        self.theta_file = None
-        self.phi_name   = None
-        self.theta_name = None
-        self.phi_on     = False
-        self.theta_on   = False
-        
-        self.phi_data   = None
-        self.theta_data = None
-        self.dispersion = []
-        self.runXY      = self.run_oriented
-        self.run        = self.run_oriented
-        self.disp_model_run = None
-        self.details    = None
-
-    def __str__(self):
-        info  = "%s (%s)\n" % (self.name, self.model.__class__.__name__)
-        info += "Pars: %s\n" % self.model.params
-        info += "Disp: %s\n" % self.dispersion
-        info += "Disp: %s\n" % self.dispersed.params
-        return info
-
-    def clone(self):
-        obj            = Averager2D()
-        obj.params     = copy.deepcopy(self.params)
-        obj.details    = copy.deepcopy(self.details)
-        obj.model      = self.model.clone()
-        obj.phi_file   = copy.deepcopy(self.phi_file)
-        obj.theta_file = copy.deepcopy(self.theta_file)
-        obj.phi_name   = copy.deepcopy(self.phi_name)
-        obj.theta_name = copy.deepcopy(self.theta_name)
-        obj.name       = copy.deepcopy(self.name)
-        obj.phi_on = self.phi_on
-        obj.theta_on = self.theta_on
-        obj.dispersion = copy.deepcopy(self.dispersion)
-        obj.update_functor()
-        return obj   
-
-    def set_model(self, model):
-        self.name = model.name
-        self.model = model
-        self.params = model.params
-        self.details = model.details
-        retval = self._find_angles()
-        self.update_functor()
-        self.disp_model_run = self.model.runXY
-        return retval
-        
-    def setParam(self, name, value):
-        # Keep a local copy for badly implemented code
-        # that access params directly
-        #TODO: fix that!
-        if name.lower() in self.params:
-            self.params[name.lower()] = value
-        return self.model.setParam(name, value)
-        
-    def getParam(self, name):
-        return self.model.getParam(name)
-
-    def _find_angles(self):
-        """
-            Find which model parameters represent
-            theta and phi
-            @return: True if at least one angle was found
-        """
-        self.theta_name = None
-        self.phi_name   = None
-        for item in self.model.params:
-            if item.lower().count("theta")>0:
-                self.theta_name = item
-            elif item.lower().count("phi")>0:
-                self.phi_name = item
-                
-        if self.theta_name == None and self.phi_name == None:
-            return False
-        return True
-        
-    def setPhiFile(self, path):
-        """
-            Check the validity of a path and store it
-            @param path: file path
-            @return: True if all OK, False if can't be set
-        """
-        
-        # If it's the same file, do nothing
-        if self.phi_file == path:
-            return True
-        
-        if path==None or self.phi_name == None:
-            self.phi_file = None
-            self.phi_data = None
-            self.phi_on   = False
-            self.update_functor()
-        elif os.path.isfile(path):
-            self.phi_file = path
-            #self.phi_data = self.read_file(path)
-            self.phi_on = True
-            self.update_functor()
-        else:
-            raise ValueError, "%s is not a file" % path
-        
-        if self.phi_name == None:
-            return False
-        else:
-            return True
-
-    def read_file(self, path):
-        input_f = open(path, 'r')
-        buff = input_f.read()
-        lines = buff.split('\n')
-        
-        angles = []
-        
-        for line in lines:
-            toks = line.split()
-            if len(toks)==2:
-                try:
-                    angle = float(toks[0])
-                    weight = float(toks[1])
-                except:
-                    # Skip non-data lines
-                    pass
-                angles.append([angle, weight])
-        return angles
-                
-
-    def setThetaFile(self, path):
-        """
-            Check the validity of a path and store it
-            @param path: file path
-            @return: True if all OK, False if can't be set
-        """
-        
-        # If it's the same file, do nothing
-        if self.theta_file == path:
-            return True
-        
-        if path==None or self.theta_name == None:
-            self.theta_file = None
-            self.theta_data = None
-            self.theta_on   = False
-            self.update_functor()
-        elif os.path.isfile(path):
-            self.theta_file = path
-            #self.theta_data = self.read_file(path)
-            self.theta_on = True
-            self.update_functor()
-        else:
-            raise ValueError, "%s is not a file" % path
-
-        if self.theta_name == None:
-            return False
-        else:
-            return True
-
-    def update_functor(self):
-        # Protect against empty model
-        if self.model==None:
-            return
-        
-        self.set_dispersity(self.dispersion)
-        #phi_points = [[self.model.getParam(self.phi_name), 1.0]]
-        #theta_points = [[self.model.getParam(self.theta_name), 1.0]]
-        
-       # Initialize theta points to visit
-        if self.theta_on:
-            # Check whether we have the data
-            if not self.theta_file == None and self.theta_data == None:
-                self.theta_data = self.read_file(self.theta_file)
-            elif not self.model == None:
-                self.theta_data = [[self.model.getParam(self.phi_name), 1.0]]
-            else:
-                self.theta_data = []
-            
-        # Initialize phi points to visit
-        if self.phi_on:
-            # Check whether we have the data
-            if not self.phi_file == None and self.phi_data == None:
-                self.phi_data = self.read_file(self.phi_file)
-            elif not self.model == None:
-                self.phi_data = [[self.model.getParam(self.theta_name), 1.0]]
-            else:
-                self.phi_data = []
-                
-        if self.phi_on and self.theta_on:
-            self.runXY = self.run_theta_phi
-        elif not self.phi_on and self.theta_on:
-            self.runXY = self.run_theta
-        elif not self.theta_on and self.phi_on:
-            self.runXY = self.run_phi
-        else:
-            self.runXY = self.run_oriented
-                
-    def get_dispersity(self):
-        return self.dispersion
-    
-    def set_dispersity(self, disp):
-        from sans.models.DisperseModel import DisperseModel
-        
-        if len(disp) == 0 and len(self.dispersion) == 0:
-            self.disp_model_run = self.model.runXY
-            return False
-        
-        self.dispersion = disp
-        if len(self.dispersion)==0:
-            self.disp_model_run = self.model.runXY
-            self.dispersed = None
-            
-            return True
-        
-        
-        name_list = []
-        val_list  = []
-        npts = 0
-        for item in disp:
-            name_list.append(item[0])
-            val_list.append(item[1])
-            # For now, us largest
-            if item[2]>npts:
-                npts = item[2]
-            
-        self.dispersed = DisperseModel(self.model, name_list, val_list)
-        self.dispersed.setParam('n_pts', npts)
-        self.disp_model_run = self.dispersed.runXY
-        
-        return True
-                
-    def run_oriented(self, x=0):
-        return self.disp_model_run(x)
-    
-    def run_phi(self, x=0):
-        sum  = 0
-        norm = 0
-        background = 0
-        
-        # If we have a background, perform the average
-        # only with bck=0 and add it at the end
-        if "background" in self.model.getParamList():
-            background = self.model.getParam('background')
-            self.model.setParam('background', 0.0)
-
-        for ph_i in self.phi_data:
-            self.model.setParam(self.phi_name, ph_i[0])
-            sum += self.disp_model_run(x) * ph_i[1]
-            norm += ph_i[1]
-                
-        # Restore original background value
-        if "background" in self.model.getParamList():
-            self.model.setParam('background', background)
-
-        return sum / norm + background
-    
-    def run_theta(self, x=0):
-        sum  = 0
-        norm = 0
-        background = 0
-        
-        # If we have a background, perform the average
-        # only with bck=0 and add it at the end
-        if "background" in self.model.getParamList():
-            background = self.model.getParam('background')
-            self.model.setParam('background', 0.0)
-            
-        for th_i in self.theta_data:
-            self.model.setParam(self.theta_name, th_i[0])
-            sum += self.disp_model_run(x) * math.sin(th_i[0]) * th_i[1]
-            norm += th_i[1]
-                
-        # Restore original background value
-        if "background" in self.model.getParamList():
-            self.model.setParam('background', background)
-
-        return sum / norm + background
-    
-    def run_theta_phi(self, x=0):
-        sum  = 0
-        norm = 0
-        background = 0
-        
-        # If we have a background, perform the average
-        # only with bck=0 and add it at the end
-        if "background" in self.model.getParamList():
-            background = self.model.getParam('background')
-            self.model.setParam('background', 0.0)
-
-        for th_i in self.theta_data:
-            self.model.setParam(self.theta_name, th_i[0])
-            
-            for ph_i in self.phi_data:
-                self.model.setParam(self.phi_name, ph_i[0])
-                sum += self.disp_model_run(x) * math.sin(th_i[0]) * ph_i[1] * th_i[1]
-                norm += ph_i[1] * th_i[1]
-        
-        # Restore original background value
-        if "background" in self.model.getParamList():
-            self.model.setParam('background', background)
-       
-        return sum / norm + background       
-
-    
Index: nsmodels/igor_wrapper/test/Makefile
===================================================================
--- sansmodels/igor_wrapper/test/Makefile	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,10 +1,0 @@
-
-
-
-all:
-	gcc test.c ../src/disp_cylinder.c ../src/c_disperser.c \
-	../../sans/models/c_extensions/cylinder.c \
-	../../libigor/libCylinder.c \
-	../src/weighted_cylinder.c \
-	-I ../../sans/models/c_extensions -I ../../libigor -I ../include \
-	-o test
Index: nsmodels/igor_wrapper/test/phi.txt
===================================================================
--- sansmodels/igor_wrapper/test/phi.txt	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,3 +1,0 @@
-0.01 1.0
-1.5  1.0
-2.0  1.0
Index: nsmodels/igor_wrapper/test/test.c
===================================================================
--- sansmodels/igor_wrapper/test/test.c	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,74 +1,0 @@
-#include "../include/danse.h"
-#include <stdio.h>
-
-int main(){
-	double output;
-	double pars[11];	
-	double q, phi;
-	double theta_vals[17];
-	double theta_w[17];
-	double phi_vals[17];
-	double phi_w[17];
-	int i;
-	
-	pars[0] = 1.0;
-	pars[1] = 20.0; // radius
-	pars[2] = 400.0; // length
-	pars[3] = 1.0;  // contrast
-	pars[4] = 0.0;  // bck
-	pars[5] = 1.57; //theta
-	pars[6] = 0.0;  // phi
-	pars[7] = 0.0;  // disp theta
-	pars[8] = 0.0;  // disp phi
-	pars[9] = 0.0;  // disp radius
-	pars[10] = 0.0;
-	
-	theta_vals[0] = 0.01;
-	theta_vals[1] = 0.1;
-	theta_vals[2] = 0.2;
-	theta_vals[3] = 0.3;
-	theta_vals[4] = 0.4;
-	theta_vals[5] = 0.5;
-	theta_vals[6] = 0.6;
-	theta_vals[7] = 0.7;
-	theta_vals[8] = 0.8;
-	theta_vals[9] = 0.9;
-	theta_vals[10] = 1.0;
-	theta_vals[11] = 1.1;
-	theta_vals[12] = 1.2;
-	theta_vals[13] = 1.3;
-	theta_vals[14] = 1.4;
-	theta_vals[15] = 1.5;
-	theta_vals[16] = 1.6;
-	
-	for(i=0; i<17; i++) {
-	   theta_w[i] = 1.0;
-	}
-	
-	q = 0.025;
-	phi = 0.0;
-	
-	// Testing oriented cylinder
-	output = oriented_cylinder_2D(pars, q, phi);
-	printf("oriented output = %g\n", output);
-	
-	// Testing dispersed with no dispersion
-	output = disperse_cylinder_analytical_2D(pars, q, phi);
-	printf("disp output     = %g\n", output);
-
-	// Testing dispersed with dispersion
-	pars[10] = 100.0;
-	pars[7]  = 3.0;
-	output = disperse_cylinder_analytical_2D(pars, q, phi);
-	printf("disp output     = %g\n", output);
-
-	// Testing input dist
-	pars[10] = 0.0;
-	pars[7]  = 0.0;
-	pars[1]  = 20.0;
-	output = cylinder_Weights(pars, phi_vals, phi_w, 0, 
-								theta_vals, theta_w, 17, 
-								q, phi); 
-	printf("weight output     = %g\n", output);
-
-}
Index: nsmodels/igor_wrapper/test/test.py
===================================================================
--- sansmodels/igor_wrapper/test/test.py	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,34 +1,0 @@
-from sans.models.CylinderModel import CylinderModel
-from sans.models.DisperseModel import DisperseModel
-import math
-
-cyl = CylinderModel()
-cyl.setParam('scale', 1.0)
-cyl.setParam('radius', 20.0)
-cyl.setParam('length', 400.0)
-cyl.setParam('contrast', 1.0)
-cyl.setParam('background', 0.0)
-cyl.setParam('cyl_theta', 1.57)
-cyl.setParam('cyl_phi', 0.0)
-
-q=0.025
-phi=0.0
-
-print "oriented output", cyl.run([q, phi])
-
-
-
-name_list=['radius']
-val_list = [3.0]
-dispersed = DisperseModel(cyl, name_list, val_list)
-dispersed.setParam('n_pts', 100)
-print "disp output", dispersed.run([q, phi])
-
-
-
-from Averager2D import Averager2D
-avg = Averager2D()
-avg.set_model(cyl)
-#avg.set_dispersity([['radius', 3.0, 100]])
-avg.setThetaFile('theta.txt')
-print avg.runXY([q, 0])
Index: nsmodels/igor_wrapper/test/theta.txt
===================================================================
--- sansmodels/igor_wrapper/test/theta.txt	(revision 25a60dc18cfd6e9a29a6a6c01bf49e2862c62e61)
+++ 	(revision )
@@ -1,17 +1,0 @@
-0.01 1
-.1 1
-.2 1
-.3 1
-.4 1
-.5 1
-.6 1
-.7 1
-.8 1
-.9 1
-1. 1
-1.1 1
-1.2 1
-1.3 1
-1.4 1
-1.5 1
-1.6 1
