Index: sansview/plugins/sum_p1_p2.py
===================================================================
--- sansview/plugins/sum_p1_p2.py	(revision b827bea29c4e73729f175177a2c2cea0bc08d6e0)
+++ 	(revision )
@@ -1,355 +1,0 @@
-# A sample of an experimental model function for Sum(Pmodel1,Pmodel2)
-import copy
-from sans.models.pluginmodel import Model1DPlugin
-# User can change the name of the model (only with single functional model)
-from sans.models.CylinderModel import CylinderModel as P1
-from sans.models.PolymerExclVolume import PolymerExclVolume as P2
-
-
-class Model(Model1DPlugin):
-    """
-    Use for p1(Q)+p2(Q); 
-    Note: P(Q) refers to 'form factor' model.
-    """
-    name = ""
-    def __init__(self):
-        Model1DPlugin.__init__(self, name='')
-        """
-        :param p_model1: a form factor, P(Q)
-        :param p_model2: another form factor, P(Q)
-        """
-        p_model1 = P1()
-        p_model2 = P2()
-        ## Setting  model name model description
-        self.description=""
-        self.name = "Sum[" + "P1(Cyl)"  +", "+ "P2(PEV)" + "]"
-        self.description = p_model1.name+"\n"
-        self.description += p_model2.name+"\n"
-        self.fill_description(p_model1, p_model2)
-
-        ## Define parameters
-        self.params = {}
-
-        ## Parameter details [units, min, max]
-        self.details = {}
-        
-        # non-fittable parameters
-        self.non_fittable = p_model1.non_fittable  
-        self.non_fittable += p_model2.non_fittable  
-            
-        ##models 
-        self.p_model1= p_model1
-        self.p_model2= p_model2
-        
-       
-        ## dispersion
-        self._set_dispersion()
-        ## Define parameters
-        self._set_params()
-        ## New parameter:Scaling factor
-        self.params['scale_factor'] = 1
-        
-        ## Parameter details [units, min, max]
-        self._set_details()
-        self.details['scale_factor'] = ['',     None, None]
-
-        
-        #list of parameter that can be fitted
-        self._set_fixed_params()  
-        ## parameters with orientation
-        for item in self.p_model1.orientation_params:
-            new_item = "p1_" + item
-            if not new_item in self.orientation_params:
-                self.orientation_params.append(new_item)
-            
-        for item in self.p_model2.orientation_params:
-            new_item = "p2_" + item
-            if not new_item in self.orientation_params:
-                self.orientation_params.append(new_item)
-        # get multiplicity if model provide it, else 1.
-        try:
-            multiplicity1 = p_model1.multiplicity
-            try:
-                multiplicity2 = p_model2.multiplicity
-            except:
-                multiplicity2 = 1
-        except:
-            multiplicity1 = 1
-            multiplicity2 = 1
-        ## functional multiplicity of the model
-        self.multiplicity1 = multiplicity1  
-        self.multiplicity2 = multiplicity2    
-        self.multiplicity_info = []   
-        
-    def _clone(self, obj):
-        """
-            Internal utility function to copy the internal
-            data members to a fresh copy.
-        """
-        obj.params     = copy.deepcopy(self.params)
-        obj.description     = copy.deepcopy(self.description)
-        obj.details    = copy.deepcopy(self.details)
-        obj.dispersion = copy.deepcopy(self.dispersion)
-        obj.p_model1  = self.p_model1.clone()
-        obj.p_model2  = self.p_model2.clone()
-        #obj = copy.deepcopy(self)
-        return obj
-    
-    
-    def _set_dispersion(self):
-        """
-           combined the two models dispersions
-           Polydispersion should not be applied to s_model
-        """
-        ##set dispersion only from p_model 
-        for name , value in self.p_model1.dispersion.iteritems():
-            #if name.lower() not in self.p_model1.orientation_params:
-            new_name = "p1_" + name
-            self.dispersion[new_name]= value 
-        for name , value in self.p_model2.dispersion.iteritems():
-            #if name.lower() not in self.p_model2.orientation_params:
-            new_name = "p2_" + name
-            self.dispersion[new_name]= value 
-            
-    def function(self, x=0.0): 
-        """
-        """
-        return 0
-                               
-    def getProfile(self):
-        """
-        Get SLD profile of p_model if exists
-        
-        : return: (r, beta) where r is a list of radius of the transition points
-                beta is a list of the corresponding SLD values 
-        : Note: This works only for func_shell# = 2 (exp function)
-                and is not supporting for p2
-        """
-        try:
-            x,y = self.p_model1.getProfile()
-        except:
-            x = None
-            y = None
-            
-        return x, y
-    
-    def _set_params(self):
-        """
-            Concatenate the parameters of the two models to create
-            this model parameters 
-        """
-
-        for name , value in self.p_model1.params.iteritems():
-            # No 2D-supported
-            #if name not in self.p_model1.orientation_params:
-            new_name = "p1_" + name
-            self.params[new_name]= value
-            
-        for name , value in self.p_model2.params.iteritems():
-            # No 2D-supported
-            #if name not in self.p_model2.orientation_params:
-            new_name = "p2_" + name
-            self.params[new_name]= value
-                
-        # Set "scale" as initializing
-        self._set_scale_factor()
-      
-            
-    def _set_details(self):
-        """
-            Concatenate details of the two models to create
-            this model details 
-        """
-        for name ,detail in self.p_model1.details.iteritems():
-            new_name = "p1_" + name
-            #if new_name not in self.orientation_params:
-            self.details[new_name]= detail
-            
-        for name ,detail in self.p_model2.details.iteritems():
-            new_name = "p2_" + name
-            #if new_name not in self.orientation_params:
-            self.details[new_name]= detail
-    
-    def _set_scale_factor(self):
-        """
-        Not implemented
-        """
-        pass
-        
-                
-    def setParam(self, name, value):
-        """ 
-        Set the value of a model parameter
-    
-        :param name: name of the parameter
-        :param value: value of the parameter
-        """
-        # set param to p1+p2 model
-        self._setParamHelper(name, value)
-        
-        ## setParam to p model 
-        model_pre = name.split('_', 1)[0]
-        new_name = name.split('_', 1)[1]
-        if model_pre == "p1":
-            if new_name in self.p_model1.getParamList():
-                self.p_model1.setParam(new_name, value)
-        elif model_pre == "p2":
-             if new_name in self.p_model2.getParamList():
-                self.p_model2.setParam(new_name, value)
-        elif name.lower() == 'scale_factor':
-            self.params['scale_factor'] = value
-        else:
-            raise ValueError, "Model does not contain parameter %s" % name
-            
-    def getParam(self, name):
-        """ 
-        Set the value of a model parameter
-
-        :param name: name of the parameter
-        
-        """
-        # Look for dispersion parameters
-        toks = name.split('.')
-        if len(toks)==2:
-            for item in self.dispersion.keys():
-                # 2D not supported
-                if item.lower()==toks[0].lower():# and \
-                            #item.lower() not in self.orientation_params \
-                            #and toks[0].lower() not in self.orientation_params:
-                    for par in self.dispersion[item]:
-                        if par.lower() == toks[1].lower():
-                            return self.dispersion[item][par]
-        else:
-            # Look for standard parameter
-            for item in self.params.keys():
-                if item.lower()==name.lower():#and \
-                            #item.lower() not in self.orientation_params \
-                            #and toks[0].lower() not in self.orientation_params:
-                    return self.params[item]
-        return  
-        #raise ValueError, "Model does not contain parameter %s" % name
-       
-    def _setParamHelper(self, name, value):
-        """
-        Helper function to setparam
-        """
-        # Look for dispersion parameters
-        toks = name.split('.')
-        if len(toks)== 2:
-            for item in self.dispersion.keys():
-                if item.lower()== toks[0].lower():# and \
-                            #item.lower() not in self.orientation_params:
-                    for par in self.dispersion[item]:
-                        if par.lower() == toks[1].lower():#and \
-                                #item.lower() not in self.orientation_params:
-                            self.dispersion[item][par] = value
-                            return
-        else:
-            # Look for standard parameter
-            for item in self.params.keys():
-                if item.lower()== name.lower():#and \
-                            #item.lower() not in self.orientation_params:
-                    self.params[item] = value
-                    return
-            
-        raise ValueError, "Model does not contain parameter %s" % name
-             
-   
-    def _set_fixed_params(self):
-        """
-             fill the self.fixed list with the p_model fixed list
-        """
-        for item in self.p_model1.fixed:
-            new_item = "p1" + item
-            self.fixed.append(new_item)
-        for item in self.p_model2.fixed:
-            new_item = "p2" + item
-            self.fixed.append(new_item)
-
-        self.fixed.sort()
-                
-                    
-    def run(self, x = 0.0):
-        """ 
-        Evaluate the model
-        
-        :param x: input q-value (float or [float, float] as [r, theta])
-        :return: (scattering function value)
-        """
-        self._set_scale_factor()
-        return self.params['scale_factor'] * \
-                (self.p_model1.run(x) + self.p_model2.run(x))
-    
-    def runXY(self, x = 0.0):
-        """ 
-        Evaluate the model
-        
-        :param x: input q-value (float or [float, float] as [qx, qy])
-        :return: scattering function value
-        """  
-        self._set_scale_factor()
-        return self.params['scale_factor'] * \
-                (self.p_model1.runXY(x) + self.p_model2.runXY(x))
-    
-    ## Now (May27,10) directly uses the model eval function 
-    ## instead of the for-loop in Base Component.
-    def evalDistribution(self, x = []):
-        """ 
-        Evaluate the model in cartesian coordinates
-        
-        :param x: input q[], or [qx[], qy[]]
-        :return: scattering function P(q[])
-        """
-        self._set_scale_factor()
-        return self.params['scale_factor'] * \
-                    (self.p_model1.evalDistribution(x) + \
-                                 self.p_model2.evalDistribution(x))
-
-    def set_dispersion(self, parameter, dispersion):
-        """
-        Set the dispersion object for a model parameter
-        
-        :param parameter: name of the parameter [string]
-        :dispersion: dispersion object of type DispersionModel
-        """
-        value= None
-        new_pre = parameter.split("_", 1)[0]
-        new_parameter = parameter.split("_", 1)[1]
-        try:
-            if new_pre == 'p1' and \
-                            new_parameter in self.p_model1.dispersion.keys():
-                value= self.p_model1.set_dispersion(new_parameter, dispersion)
-            if new_pre == 'p2' and \
-                             new_parameter in self.p_model2.dispersion.keys():
-                value= self.p_model2.set_dispersion(new_parameter, dispersion)
-            self._set_dispersion()
-            return value
-        except:
-            raise 
-
-    def fill_description(self, p_model1, p_model2):
-        """
-        Fill the description for P(Q)+P(Q)
-        """
-        description = ""
-        description +="This model gives the summation of  %s and %s.\n"% \
-                                        ( p_model1.name, p_model2.name )
-        self.description += description
-        
-if __name__ == "__main__": 
-    m1= Model() 
-    m1.setParam("p1_scale", 25)  
-    m1.setParam("p1_length", 1000)
-    m1.setParam("p2_scale", 100) 
-    m1.setParam("p2_rg", 100) 
-    out1 = m1.runXY(0.01)
-
-    m2= Model()
-    m2.p_model1.setParam("scale", 25) 
-    m2.p_model1.setParam("length", 1000) 
-    m2.p_model2.setParam("scale", 100)
-    m2.p_model2.setParam("rg", 100)
-    out2 = m2.p_model1.runXY(0.01) + m2.p_model2.runXY(0.01)
-    print out1, " = ", out2
-
-   
Index: sansview/plugins/testmodel.py
===================================================================
--- sansview/plugins/testmodel.py	(revision b827bea29c4e73729f175177a2c2cea0bc08d6e0)
+++ 	(revision )
@@ -1,86 +1,0 @@
-"""
-Test plug-in model
-These are links of available functions:
-
-http://docs.python.org/library/math.html
-http://www.scipy.org/Numpy_Functions_by_Category
-"""
-from sans.models.pluginmodel import Model1DPlugin  ##DO NOT CHANGE THIS LINE!!!
-from math import *                    ##DO NOT CHANGE THIS LINE!!!
-from numpy import *                ##DO NOT CHANGE THIS LINE!!!
-
-##PLEASE READ COMMENTS CAREFULLY !!! COMMENT ARE IN CAPITAL LETTERS AND AFTER ##
-## THESE COMMENTS ARE THERE TO GUIDE YOU. YOU CAN REMOVE THEM ONLY WHEN YOU ARE
-## CONFORTABLE ENOUGH WITH OUR MODEL PLUGIN OPTION
-
-
-## <-----  SIGN DEFINES WHERE YOU CAN MODIFY THE CODE
-
-class Model(Model1DPlugin):##DO NOT CHANGE THIS LINE!!!
-    """
-    ##YOU CAN BE MODIFY ANYTHING BETWEEN """ """
-    ##DESCRIPTION OF MODEL PLUG-IN GOES HERE
-    
-    ##EXAMPLE:Class that evaluates a cos(x) model. 
-    """
-    
-    ## YOU CAN MODIFY THE LINE BELLOW. CHANGE ONLY WORDS BETWEEN " " 
-    ## TO RENAME YOUR MODEL
-    name = "A+Bcos(2x)+Csin(2x)"      ## <----- NAME OF THE MODEL   
-    
-    def __init__(self):
-        """
-        Initialization
-        """
-        Model1DPlugin.__init__(self, name= self.name)##DO NOT CHANGE THIS LINE!!!
-        
-        ## EDIT PARAMETERS' NAMES AND VALUE
-        ## DELETE MODIFIABLE LINE HERE WILL REDUCE THE NUMBER OF PARAMETERS
-        self.params = {}                        ##DO NOT CHANGE THIS LINE!!!
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ' AND NUMBER 
-        ## YOU CAN ALSO DELETE THIS LINE
-        self.params['A'] = 1.0       ## <-----  
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ' AND NUMBER 
-        ## YOU CAN ALSO DELETE THIS LINE   
-        self.params['B'] = 1.0       ## <----- 
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ' AND NUMBER 
-        ## YOU CAN ALSO DELETE THIS LINE    
-        self.params['C'] = 10.0      ## <-----  
-
-        ## STORING PARAMETERS  [UNIT, MINIMUM VALUE, MAXIMUM VALUE]
-        self.details = {}       ##DO NOT CHANGE THIS LINE!!!
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ',WORD BETWEEN
-        ## ' ', TWO OTHER NUMBERS TO NEW VALUE OR YOU CAN ALSO DELETE TH LINE    
-        self.details['A'] = ['', -1e16, 1e16]        ## <----- 
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ',WORD BETWEEN
-        ## ' ', TWO OTHER NUMBERS TO NEW VALUE OR YOU CAN ALSO DELETE TH LINE    
-        self.details['B'] = ['', -1e16, 1e16]         ## <----- 
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ',WORD BETWEEN
-        ## ' ', TWO OTHER NUMBERS TO NEW VALUE OR YOU CAN ALSO DELETE TH LINE    
-        self.details['C'] = ['', -1e16, 1e16]         ## <----- 
-        ## YOU CAN MODIFY THE LINE BELLOW.MODIFY WORDS BETWEEN """   """  ONLY!!!!
-        self.description = "F(x)=A+Bcos(2x)+Csin(2x) " ## <----- 
-   
-    def function(self, x = 0.0):  ##DO NOT CHANGE THIS LINE!!!
-        """
-        Evaluate the model
-        
-        :param x: input x
-        
-        :return: function value
-        
-        """
-        ## ADD YOUR FUNCTION HERE.
-        ## REUSE THE PARAMETERS DEFINED PREVIOUSLY TO WRITE YOUR FUNCTION.
-        
-        ## IN THIS EXAMPLE THE FUNTION IS:
-        ## A+Bcos(2x)+Csin(2x)
-        ## YOU CAN USE math.sin or sin directly
-        ## NOTE: sin, cos ARE FUNCTIONS  IMPORTED FROM PYTHON MATH LIBRARY
-        ## FOR MORE INFORMATION CHECK http://docs.python.org/library/math.html      
-        ## OTHER FUNCTIONS ARE ALSO 
-        ##  AVAILABLE http://www.scipy.org/Numpy_Functions_by_Category
-        ## numpy FUNCTIONS ARE FOR EXPERT USER
-        
-        return self.params['A']+self.params['B']*cos(2.0*x)+self.params['C']*math.sin(2.0*x)
-   
Index: sansview/plugins/testmodel_2.py
===================================================================
--- sansview/plugins/testmodel_2.py	(revision b827bea29c4e73729f175177a2c2cea0bc08d6e0)
+++ 	(revision )
@@ -1,141 +1,0 @@
-"""
-Test plug-in model
-These are links of available functions:
-
-http://docs.python.org/library/math.html
-http://www.scipy.org/Numpy_Functions_by_Category
-"""
-from sans.models.pluginmodel import Model1DPlugin  ##DO NOT CHANGE THIS LINE!!!
-from math import *                    ##DO NOT CHANGE THIS LINE!!!
-from numpy import *                ##DO NOT CHANGE THIS LINE!!!
-
-##PLEASE READ COMMENTS CAREFULLY !!! COMMENT ARE IN CAPITAL LETTERS AND AFTER ##
-## THESE COMMENTS ARE THERE TO GUIDE YOU. YOU CAN REMOVE THEM ONLY WHEN YOU ARE
-## CONFORTABLE ENOUGH WITH OUR MODEL PLUGIN OPTION
-
-
-## <-----  SIGN DEFINES WHERE YOU CAN MODIFY THE CODE
-
-class Model(Model1DPlugin): ##DO NOT CHANGE THIS LINE!!!
-    """
-    ##YOU CAN BE MODIFY ANYTHING BETWEEN """ """
-    ##DESCRIPTION OF MODEL PLUG-IN GOES HERE
-    
-    ##EXAMPLE: Class that evaluates a polynomial model. 
-    """
-    ## YOU CAN MODIFY THE LINE BELLOW. CHANGE ONLY WORDS BETWEEN " " 
-    ## TO RENAME YOUR MODEL
-    name = "sin(poly)/(poly)" ## <----- NAME OF THE MODEL   
-                                
-    def __init__(self):      ##DO NOT CHANGE THIS LINE!!!
-        """
-        Initialization
-        """
-        Model1DPlugin.__init__(self, name=self.name) ##DO NOT CHANGE THIS LINE!!!
-        
-        ## EDIT PARAMETERS' NAMES AND VALUE
-        ## DELETE MODIFIABLE LINE HERE WILL REDUCE THE NUMBER OF PARAMETERS
-        self.params = {}                ##DO NOT CHANGE THIS LINE!!!
-        
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ' AND NUMBER 
-        ## YOU CAN ALSO DELETE THIS LINE
-        self.params['scale'] = 1.0   ## <-----   
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ' AND NUMBER 
-        ## YOU CAN ALSO DELETE THIS LINE                                                      
-        self.params['A'] = 0.0       ## <-----   
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ' AND NUMBER 
-        ## YOU CAN ALSO DELETE THIS LINE                 
-        self.params['B'] = 10.0      ## <-----   
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ' AND NUMBER 
-        ## YOU CAN ALSO DELETE THIS LINE                  
-        self.params['C'] = 0.0       ## <-----   
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ' AND NUMBER 
-        ## YOU CAN ALSO DELETE THIS LINE                
-        self.params['D'] = 0.0     ## <-----   
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ' AND NUMBER 
-        ## YOU CAN ALSO DELETE THIS LINE                   
-        self.params['E'] = 0.0     ## <-----   
-        ## YOU CAN MODIFY THELINE BELLOW.CHANGE WORD BETWEEN ' ' AND NUMBER 
-        ## YOU CAN ALSO DELETE THIS LINE                  
-        self.params['F'] = 0.0     ## <-----          
-
-        ## STORING PARAMETERS  [UNIT, MINIMUM VALUE, MAXIMUM VALUE]
-        self.details = {}    ##DO NOT CHANGE THIS LINE!!!
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ',WORD BETWEEN
-        ## ' ', TWO OTHER NUMBESR TO NEW VALUE OR YOU CAN ALSO DELETE TH LINE      
-        self.details['scale'] = ['',None, None]    ## <-----   
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ',WORD BETWEEN
-        ## ' ', TWO OTHER NUMBERS TO NEW VALUE OR YOU CAN ALSO DELETE TH LINE     
-        self.details['A'] = ['', None, None]        ## <-----   
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ',WORD BETWEEN
-        ## ' ', TWO OTHER NUMBERS TO NEW VALUE OR YOU CAN ALSO DELETE TH LINE     
-        self.details['B'] = ['', None, None]        ## <-----   
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ',WORD BETWEEN
-        ## ' ', TWO OTHER NUMBERS TO NEW VALUE OR YOU CAN ALSO DELETE TH LINE     
-        self.details['C'] = ['', None, None]        ## <-----   
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ',WORD BETWEEN
-        ## ' ', TWO OTHER NUMBERS TO NEW VALUE OR YOU CAN ALSO DELETE TH LINE     
-        self.details['D'] = ['', None, None]        ## <-----   
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ',WORD BETWEEN
-        ## ' ', TWO OTHER NUMBERS TO NEW VALUE OR YOU CAN ALSO DELETE TH LINE     
-        self.details['E'] = ['', None, None]        ## <-----   
-        ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ',WORD BETWEEN
-        ## ' ', TWO OTHER NUMBERS TO NEW VALUE OR YOU CAN ALSO DELETE TH LINE     
-        self.details['F'] = ['', 0, 1e16]           ## <-----   
-        ## YOU CAN MODIFY THE LINE BELLOW.MODIFY WORDS BETWEEN """   """  ONLY!!!!
-        self.description = """
-            scale * sin(F(x)/F(x)) \n where F(x)=A+B*x+C*x^2+D*x^3+E*x^4+F*x^5
-                 """                        ## <-----   
-   
-    def function(self, x = 0.0): ##DO NOT CHANGE THIS LINE!!!
-        """ 
-        Evaluate the model
-        
-        :param x: input x
-        
-        :return: function value
-        
-        """
-        ## ADD YOUR FUNCTION HERE.
-        ## REUSE THE PARAMETERS DEFINED PREVIOUSLY TO WRITE YOUR FUNCTION.
-        
-        ## IN THIS EXAMPLE THE FUNTION IS:
-        ## scale * sin(F(x)/F(x)) \n where F(x)=A+B*x+C*x^2+D*x^3+E*x^4+F*x^5
-        
-        ## YOU CAN REWRITE OUR EXAMPLE WITH EVERYTING INSIDE " " :
-        ## "RETURN self.params['scale']* (self.params['A'] + self.params['B']*x + \
-        ##   self.params['C']* pow(x,2) + self.params['D']*pow(x,3)+\
-        ## self.params['E']*pow(x,4) +self.params['F']*pow(x,5)  ) "  
-         
-        ## NOTE: pow IS A FUNCTION IMPORTED FROM PYTHON MATH LIBRARY
-        ## FOR MORE INFORMATION CHECK http://docs.python.org/library/math.html      
-        ## OTHER FUNCTIONS ARE ALSO 
-        ###  AVAILABLE http://www.scipy.org/Numpy_Functions_by_Category
-        ## numpy FUNCTIONS ARE FOR EXPERT USER
-        
-         
-        ## YOU CAN ERASE EVERYTHING BELLOW FOR YOUR OWN FUNCTION
-        #Redefine parameters as local parameters
-        a = self.params['A']       ## <-----   
-        b = self.params['B']       ## <-----   
-        c = self.params['C']       ## <-----   
-        d = self.params['D']       ## <-----   
-        e = self.params['E']       ## <-----   
-        f = self.params['F']        ## <-----   
-        scl = self.params['scale']   ## <-----   
-        ##THIS OUR FUNCTION TEMPLATE
-        poly = a + b*x + c*math.pow(x,2) + d*math.pow(x,3) \
-             + e*math.pow(x,4) +f*math.pow(x,5)      ## <-----                
-        
-        #Remove a singular point (lim poly --> 0) for sin(poly)/poly
-        #(Just note: In Python, indentation defines the belongings of 'if', 'for', and so on..)
-        if poly == 0:                       ## <-----   
-            result = 1                      ## <-----   
-        else:                               ## <-----   
-            result = sin(poly)/poly    ## <-----   
-            
-        #Re-scale                          ## <-----   
-        result *=scl                       ## <-----   
-
-        return result ## MODIFY ONLY RESULT. DON'T DELETE RETURN!!!!
-   
Index: sansview/sansview.py
===================================================================
--- sansview/sansview.py	(revision 5e491e659febc22fafeff301b60d0a98b18b907b)
+++ sansview/sansview.py	(revision ca6481cab9d34a1fe78187c7fb82bbc4287a4413)
@@ -28,5 +28,5 @@
 import logging
 
-def run():
+def run_old():
     """
         Run function for linux/OSX installations
@@ -35,4 +35,9 @@
     os.system("cd %s;python sansview.py" % module_path)
 
+def run():
+    from multiprocessing import freeze_support
+    freeze_support()
+    sansview = SansView()
+        
 class SansViewApp(gui_manager.ViewApp):
     """
Index: sansview/setup_exe.py
===================================================================
--- sansview/setup_exe.py	(revision 762984a5a11d7166b3fcd8844e48853a4bd8dcbd)
+++ sansview/setup_exe.py	(revision ca6481cab9d34a1fe78187c7fb82bbc4287a4413)
@@ -177,5 +177,5 @@
 path = os.getcwd()
 
-plugins_dir = os.path.join(path, "plugins")
+#plugins_dir = os.path.join(path, "plugins")
 media_dir = os.path.join(path, "media")
 images_dir = os.path.join(path, "images")
@@ -236,7 +236,7 @@
         
 # Copying the sample data user data
-for f in findall(plugins_dir):
-    if os.path.split(f)[0].count('.svn')==0:
-        data_files.append(('plugins', [f]))
+#for f in findall(plugins_dir):
+#    if os.path.split(f)[0].count('.svn')==0:
+#        data_files.append(('plugins', [f]))
         
 if py26MSdll != None:
Index: sansview/setup_mac.py
===================================================================
--- sansview/setup_mac.py	(revision 6d52ff447944959a6c60ab717aa89f822c47df2d)
+++ sansview/setup_mac.py	(revision ca6481cab9d34a1fe78187c7fb82bbc4287a4413)
@@ -54,5 +54,6 @@
 
 APP = ['sansview.py']
-DATA_FILES += ['images','test','plugins','media', 'custom_config.py', 'local_config.py']
+#DATA_FILES += ['images','test','plugins','media', 'custom_config.py', 'local_config.py']
+DATA_FILES += ['images','test','media', 'custom_config.py', 'local_config.py']
 # locate file extensions
 def find_extension():
