Index: fittingview/src/sans/perspectives/fitting/fitting.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/fitting.py	(revision 26e1001aa61d2e226991278e3e64b9510261ff0e)
+++ fittingview/src/sans/perspectives/fitting/fitting.py	(revision 7c8d3093945ee0f295c2b919d7b23f654f80158c)
@@ -211,5 +211,6 @@
         resetf_help += "Otherwise, the same initial param values will be used "
         resetf_help += "for all fittings." 
-        self.menu1.AppendCheckItem(self.id_reset_flag, "Chain Fitting [BatchFit Only]", 
+        self.menu1.AppendCheckItem(self.id_reset_flag, 
+                                   "Chain Fitting [BatchFit Only]", 
                                    resetf_help) 
         wx.EVT_MENU(owner, self.id_reset_flag,  self.on_reset_batch_flag)
@@ -238,5 +239,5 @@
         """
         id = event.GetId()
-        label = self.edit_model_menu.GetLabel(id)
+        label = self.edit_menu.GetLabel(id)
         from sans.perspectives.calculator.pyconsole import PyConsole
         filename = os.path.join(models.find_plugins_dir(), label)
@@ -245,8 +246,65 @@
         self.put_icon(frame)
         frame.Show(True) 
-        
+    
+    def make_sum_model(self, event):
+        """
+        Edit summodel template and make one
+        """
+        id = event.GetId()
+        model_list = []
+        model_manager = models.ModelManager()
+        model_list = model_manager.get_model_name_list()
+
+        from sans.perspectives.fitting.fitting_widgets import TextDialog
+        textdial = TextDialog(None, -1, 'Easy Custom Sum(p1,p2)', model_list)
+        self.put_icon(textdial)
+        if textdial.ShowModal() == wx.ID_OK:
+            try:
+                label = textdial.getText()
+                plug_dir = models.find_plugins_dir()
+                fname = os.path.join(plug_dir, "sum_temp.py")
+                name1 = label[0]
+                name2 = label[1]
+                textdial.write_string(fname, name1, name2)
+                textdial.compile_file(fname)
+
+                page = self.fit_panel.get_current_page()
+                temp = self.fit_panel.reset_pmodel_list()
+                if temp:
+                    page.model_list_box = temp
+                    current_val = page.formfactorbox.GetValue()
+                    pos = page.formfactorbox.GetSelection()
+                    page._show_combox_helper()
+                    page.formfactorbox.SetSelection(pos)
+                    page.formfactorbox.SetValue(current_val)
+                #wx.CallAfter(textdial.delete_file, fname)
+            except:
+                raise
+                if self.parent != None:
+                    from sans.guiframe.events import StatusEvent 
+                    msg= "Easy Custom Sum: Error occurred..."
+                    wx.PostEvent(self.parent, StatusEvent(status = msg ))
+                else:
+                    raise
+        textdial.Destroy()
+
+  
     def set_edit_menu(self, owner):    
         """
         Set list of the edit model menu labels
+        """
+        id = wx.NewId()
+        self.edit_model_menu.Append(id, 'Easy Custom Sum(p1, p2)', 
+                                    'Sum two models') 
+        wx.EVT_MENU(owner, id,  self.make_sum_model)
+        e_id = wx.NewId()
+        self.edit_menu =wx.Menu()
+        self.edit_model_menu.AppendMenu(e_id, 
+                                    'Edit Sample File', self.edit_menu) 
+        self.set_edit_menu_helper(owner)
+    
+    def set_edit_menu_helper(self, owner):
+        """
+        help for setting list of the edit model menu labels
         """
         list_fnames = os.listdir(models.find_plugins_dir())
@@ -254,12 +312,13 @@
             name = os.path.basename(item)
             toks = os.path.splitext(name)
-            if toks[1]=='.py' and not toks[0]=='__init__':
+            if toks[1]=='.py' and not toks[0] =='__init__' \
+                                and not toks[0] =='sum_temp':
                 has_file = False
-                for item in self.edit_model_menu.GetMenuItems():
-                    if name == self.edit_model_menu.GetLabel(item.GetId()):
+                for item in self.edit_menu.GetMenuItems():
+                    if name == self.edit_menu.GetLabel(item.GetId()):
                         has_file = True
                 if not has_file:
                     id = wx.NewId()
-                    self.edit_model_menu.Append(id, name) 
+                    self.edit_menu.Append(id, name) 
                     wx.EVT_MENU(owner, id,  self.edit_custom_model)
                     has_file = False
@@ -641,13 +700,13 @@
             
         """
-        if string.find(item,".")!=-1:
-            param_names= re.split("\.",item)
-            model_name=param_names[0]           
+        if string.find(item, ".") != -1:
+            param_names = re.split("\.", item)
+            model_name = param_names[0]           
             ##Assume max len is 3; eg., M0.radius.width
             if len(param_names) == 3:
-                param_name=param_names[1]+"."+param_names[2]
+                param_name = param_names[1] + "." + param_names[2]
             else:
-                param_name=param_names[1]                    
-            return model_name,param_name
+                param_name = param_names[1]                    
+            return model_name, param_name
    
     def set_ftol(self, ftol=None):
Index: fittingview/src/sans/perspectives/fitting/fitting_widgets.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/fitting_widgets.py	(revision 657490afbf309885640f87bc0b0855ff125c1a41)
+++ fittingview/src/sans/perspectives/fitting/fitting_widgets.py	(revision 7c8d3093945ee0f295c2b919d7b23f654f80158c)
@@ -12,6 +12,17 @@
 
 import wx
+import sys
+import os
 from wx.lib.scrolledpanel import ScrolledPanel
 
+#TextDialog size
+if sys.platform.count("win32") > 0:
+    FONT_VARIANT = 0
+    PNL_WIDTH = 460
+    PNL_HITE = 210
+else:
+    FONT_VARIANT = 1
+    PNL_WIDTH = 500
+    PNL_HITE = 250
 
 MAX_NBR_DATA = 4
@@ -156,5 +167,4 @@
                                 wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)
         static_line = wx.StaticLine(self, -1)
-        
         self._sizer_txt.Add(self._panel, 0, wx.EXPAND|wx.ALL, 10)
         self._sizer_main.Add(self._sizer_txt, 0, wx.EXPAND|wx.ALL, 10)
@@ -191,3 +201,449 @@
             self._data_text_ctrl.SetForegroundColour('red')
         
+ 
+class TextDialog(wx.Dialog):
+    """
+    Dialog for easy custom sum models  
+    """
+    def __init__(self, parent=None, id=None, title='', model_list=[]):
+        """
+        Dialog window popup when selecting 'Easy Custom Sum' on the menu
+        """
+        wx.Dialog.__init__(self, parent=parent, id=id, 
+                           title=title, size=(PNL_WIDTH, PNL_HITE))
+        self.parent = parent
+        #Font
+        self.SetWindowVariant(variant=FONT_VARIANT)
+        # default
+        self.model_list = model_list
+        self._build_sizer()
+        self.model1_name = str(self.model1.GetValue())
+        self.model2_name = str(self.model2.GetValue())
+        
+    def _build_sizer(self):
+        """
+        Build gui
+        """
+        _BOX_WIDTH = 195 # combobox width
+        vbox  = wx.BoxSizer(wx.VERTICAL)
+        sizer = wx.GridBagSizer(1, 3)
+        sum_description= wx.StaticBox(self, -1, 'Select', 
+                                       size=(PNL_WIDTH-30, 70))
+        sum_box = wx.StaticBoxSizer(sum_description, wx.VERTICAL)
+        model1_box = wx.BoxSizer(wx.HORIZONTAL)
+        model2_box = wx.BoxSizer(wx.HORIZONTAL)
+        model_vbox = wx.BoxSizer(wx.VERTICAL)
+        self.model1 =  wx.ComboBox(self, -1, style=wx.CB_READONLY)
+        wx.EVT_COMBOBOX(self.model1, -1, self.on_model1)
+        self.model1.SetMinSize((_BOX_WIDTH, -1))
+        self.model1.SetToolTipString("model1")
+        self.model2 =  wx.ComboBox(self, -1, style=wx.CB_READONLY)
+        wx.EVT_COMBOBOX(self.model2, -1, self.on_model2)
+        self.model2.SetMinSize((_BOX_WIDTH, -1))
+        self.model2.SetToolTipString("model2")
+        self._set_model_list()
+        self.model1.SetSelection(0)
+        self.model2.SetSelection(1)
+         # Buttons on the bottom
+        self.static_line_1 = wx.StaticLine(self, -1)
+        self.okButton = wx.Button(self,wx.ID_OK, 'OK', size=(_BOX_WIDTH/2, 25))
+        self.closeButton = wx.Button(self,wx.ID_CANCEL, 'Cancel', 
+                                     size=(_BOX_WIDTH/2, 25))
+        # Intro
+        explanation  = "  custom model = scale_factor * (model1 + model2)\n"
+        model_string = " Model%s (p%s):"
+        vbox.Add(sizer)
+        ix = 0
+        iy = 1
+        sizer.Add(wx.StaticText(self, -1, explanation), (iy, ix),
+                 (1, 1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        model1_box.Add(wx.StaticText(self,-1, model_string% (1, 1)), -1, 0)
+        model1_box.Add((_BOX_WIDTH-35,10))
+        model1_box.Add(wx.StaticText(self, -1, model_string% (2, 2)), -1, 0)
+        model2_box.Add(self.model1, -1, 0)
+        model2_box.Add((20,10))
+        model2_box.Add(self.model2, -1, 0)
+        model_vbox.Add(model1_box, -1, 0)
+        model_vbox.Add(model2_box, -1, 0)
+        sum_box.Add(model_vbox, -1, 10)
+        iy += 1
+        ix = 0
+        sizer.Add(sum_box, (iy, ix),
+                  (1, 1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        vbox.Add((10,10))
+        vbox.Add(self.static_line_1, 0, wx.EXPAND, 10)
+        sizer_button = wx.BoxSizer(wx.HORIZONTAL)
+        sizer_button.Add((20, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+        sizer_button.Add(self.okButton, 0, 
+                         wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 0)
+        sizer_button.Add(self.closeButton, 0,
+                          wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 15)        
+        vbox.Add(sizer_button, 0, wx.EXPAND|wx.BOTTOM|wx.TOP, 10)
+        self.SetSizer(vbox)
+        self.Centre()
+                 
+    def _set_model_list(self):
+        """
+        Set the list of models
+        """
+        # list of model names
+        list = self.model_list
+        if len(list) > 1:
+            list.sort()
+        for idx in range(len(list)):
+            self.model1.Append(list[idx],idx) 
+            self.model2.Append(list[idx],idx)
+           
+    def on_model1(self, event):
+        """
+        Set model1
+        """
+        event.Skip()
+        self.model1_name = str(self.model1.GetValue())
+            
+    def on_model2(self, event):
+        """
+        Set model2
+        """
+        event.Skip()
+        self.model2_name = str(self.model2.GetValue())
+ 
+    def getText(self):
+        """
+        Returns model name string as list
+        """
+        return [self.model1_name, self.model2_name]
+    
+    def write_string(self, fname, name1, name2):
+        """
+        Write and Save file
+        """
+        try:
+            out_f =  open(fname,'w')
+        except :
+            raise
+        lines = SUM_TEMPLATE.split('\n')
+        for line in lines:
+            if line.count("import %s as P1"):
+                out_f.write(line % (name1, name1) + "\n")
+            elif line.count("import %s as P2"):
+                out_f.write(line % (name2, name2) + "\n")
+            else:
+                out_f.write(line + "\n")
+        out_f.close() 
+        
+    def compile_file(self, path):
+        """
+        Compile the file in the path
+        """
+        try:
+            import py_compile
+            py_compile.compile(file=path, doraise=True)
+        except:
+            type, value, traceback = sys.exc_info()
+            return value
+        
+    def delete_file(self, path):
+        """
+        Delete file in the path
+        """
+        try:
+            os.remove(path)
+        except:
+            raise
+        
+        
+SUM_TEMPLATE = """
+# 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)
+#P1_model: 
+from sans.models.%s import %s as P1
+
+#P2_model: 
+from sans.models.%s import %s as P2
+
+class Model(Model1DPlugin):
+    name = ""
+    def __init__(self):
+        Model1DPlugin.__init__(self, name='')
+        p_model1 = P1()
+        p_model2 = P2()
+        ## Setting  model name model description
+        self.description=""
+        self.name = self._get_name(p_model1.name, p_model2.name)
+        self.description = p_model1.name
+        self.description += p_model2.name
+        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):
+        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 _get_name(self, name1, name2):
+        name = self._get_upper_name(name1)
+        name += "+"
+        name += self._get_upper_name(name2)
+        return name
+    
+    def _get_upper_name(self, name=None):
+        if name == None:
+            return ""
+        upper_name = ""
+        str_name = str(name)
+        for index in range(len(str_name)):
+            if str_name[index].isupper():
+                upper_name += str_name[index]
+        return upper_name
+        
+    def _set_dispersion(self):
+        ##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):
+        try:
+            x,y = self.p_model1.getProfile()
+        except:
+            x = None
+            y = None
+            
+        return x, y
+    
+    def _set_params(self):
+        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):
+        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):
+        pass
+        
+                
+    def setParam(self, name, value):
+        # 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):
+        # 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():
+                    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():
+                    return self.params[item]
+        return  
+        #raise ValueError, "Model does not contain parameter %s" % name
+       
+    def _setParamHelper(self, name, value):
+        # Look for dispersion parameters
+        toks = name.split('.')
+        if len(toks)== 2:
+            for item in self.dispersion.keys():
+                if item.lower()== toks[0].lower():
+                    for par in self.dispersion[item]:
+                        if par.lower() == toks[1].lower():
+                            self.dispersion[item][par] = value
+                            return
+        else:
+            # Look for standard parameter
+            for item in self.params.keys():
+                if item.lower()== name.lower():
+                    self.params[item] = value
+                    return
+            
+        raise ValueError, "Model does not contain parameter %s" % name
+             
+   
+    def _set_fixed_params(self):
+        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):
+        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):
+        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 = []):
+        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):
+        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):
+        description = ""
+        description +="This model gives the summation of  %s and %s. "% \
+( 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
+    if out1 == out2:
+        print "===> Simple Test: Passed!"
+    else:
+        print "===> Simple Test: Failed!"
+"""
+        
+if __name__ == "__main__": 
+    app = wx.PySimpleApp()
+    frame = TextDialog(id=1, model_list=["SphereModel", "CylinderModel"])   
+    frame.Show(True)
+    app.MainLoop()             
+
+          
Index: fittingview/src/sans/perspectives/fitting/models.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/models.py	(revision 96814e18e1af3274272b6b1e1640f5ca53492065)
+++ fittingview/src/sans/perspectives/fitting/models.py	(revision 7c8d3093945ee0f295c2b919d7b23f654f80158c)
@@ -226,8 +226,6 @@
         """
         """
-       
         self.stored_plugins = {}
         self._getModelList()
-        
         
     def findModels(self):
@@ -250,18 +248,24 @@
         
         """
+        # regular model names only
+        self.model_name_list = []
         from sans.models.SphereModel import SphereModel
         self.shape_list.append(SphereModel)
         self.multiplication_factor.append(SphereModel)
+        self.model_name_list.append(SphereModel.__name__)
         
         from sans.models.BinaryHSModel import BinaryHSModel
         self.shape_list.append(BinaryHSModel)
+        self.model_name_list.append(BinaryHSModel.__name__)
                         
         from sans.models.FuzzySphereModel import FuzzySphereModel
         self.shape_list.append(FuzzySphereModel)
         self.multiplication_factor.append(FuzzySphereModel)
+        self.model_name_list.append(FuzzySphereModel.__name__)
            
         from sans.models.CoreShellModel import CoreShellModel
         self.shape_list.append(CoreShellModel)
         self.multiplication_factor.append(CoreShellModel)
+        self.model_name_list.append(CoreShellModel.__name__)
         
         from sans.models.CoreMultiShellModel import CoreMultiShellModel
@@ -273,8 +277,10 @@
         self.shape_list.append(VesicleModel)
         self.multiplication_factor.append(VesicleModel)
+        self.model_name_list.append(VesicleModel.__name__)
         
         from sans.models.MultiShellModel import MultiShellModel
         self.shape_list.append(MultiShellModel)
         self.multiplication_factor.append(MultiShellModel)
+        self.model_name_list.append(MultiShellModel.__name__)
         
         from sans.models.OnionExpShellModel import OnionExpShellModel
@@ -290,4 +296,5 @@
         from sans.models.PearlNecklaceModel import PearlNecklaceModel
         self.shape_list.append(PearlNecklaceModel)
+        self.model_name_list.append(PearlNecklaceModel.__name__)
         #self.multiplication_factor.append(PearlNecklaceModel)
         
@@ -295,37 +302,47 @@
         self.shape_list.append(CylinderModel)
         self.multiplication_factor.append(CylinderModel)
+        self.model_name_list.append(CylinderModel.__name__)
         
         from sans.models.CoreShellCylinderModel import CoreShellCylinderModel
         self.shape_list.append(CoreShellCylinderModel)
         self.multiplication_factor.append(CoreShellCylinderModel)
+        self.model_name_list.append(CoreShellCylinderModel.__name__)
         
         from sans.models.HollowCylinderModel import HollowCylinderModel
         self.shape_list.append(HollowCylinderModel)
         self.multiplication_factor.append(HollowCylinderModel)
+        self.model_name_list.append(HollowCylinderModel.__name__)
               
         from sans.models.FlexibleCylinderModel import FlexibleCylinderModel
         self.shape_list.append(FlexibleCylinderModel)
+        self.model_name_list.append(FlexibleCylinderModel.__name__)
 
         from sans.models.FlexCylEllipXModel import FlexCylEllipXModel
         self.shape_list.append(FlexCylEllipXModel)
+        self.model_name_list.append(FlexCylEllipXModel.__name__)
         
         from sans.models.StackedDisksModel import StackedDisksModel
         self.shape_list.append(StackedDisksModel)
         self.multiplication_factor.append(StackedDisksModel)
+        self.model_name_list.append(StackedDisksModel.__name__)
         
         from sans.models.ParallelepipedModel import ParallelepipedModel
         self.shape_list.append(ParallelepipedModel)
         self.multiplication_factor.append(ParallelepipedModel)
+        self.model_name_list.append(ParallelepipedModel.__name__)
         
         from sans.models.CSParallelepipedModel import CSParallelepipedModel
         self.shape_list.append(CSParallelepipedModel)
         self.multiplication_factor.append(CSParallelepipedModel)
+        self.model_name_list.append(CSParallelepipedModel.__name__)
         
         from sans.models.EllipticalCylinderModel import EllipticalCylinderModel
         self.shape_list.append(EllipticalCylinderModel)
         self.multiplication_factor.append(EllipticalCylinderModel)
+        self.model_name_list.append(EllipticalCylinderModel.__name__)
         
         from sans.models.BarBellModel import BarBellModel
         self.shape_list.append(BarBellModel)
+        self.model_name_list.append(BarBellModel.__name__)
         # not implemeted yet!
         #self.multiplication_factor.append(BarBellModel)
@@ -333,4 +350,5 @@
         from sans.models.CappedCylinderModel import CappedCylinderModel
         self.shape_list.append(CappedCylinderModel)
+        self.model_name_list.append(CappedCylinderModel.__name__)
         # not implemeted yet!
         #self.multiplication_factor.append(CappedCylinderModel)
@@ -339,103 +357,135 @@
         self.shape_list.append(EllipsoidModel)
         self.multiplication_factor.append(EllipsoidModel)
+        self.model_name_list.append(EllipsoidModel.__name__)
       
         from sans.models.CoreShellEllipsoidModel import CoreShellEllipsoidModel
         self.shape_list.append(CoreShellEllipsoidModel)
         self.multiplication_factor.append(CoreShellEllipsoidModel)
+        self.model_name_list.append(CoreShellEllipsoidModel.__name__)
          
         from sans.models.TriaxialEllipsoidModel import TriaxialEllipsoidModel
         self.shape_list.append(TriaxialEllipsoidModel)
         self.multiplication_factor.append(TriaxialEllipsoidModel)
+        self.model_name_list.append(TriaxialEllipsoidModel.__name__)
         
         from sans.models.LamellarModel import LamellarModel
         self.shape_list.append(LamellarModel)
+        self.model_name_list.append(LamellarModel.__name__)
         
         from sans.models.LamellarFFHGModel import LamellarFFHGModel
         self.shape_list.append(LamellarFFHGModel)
+        self.model_name_list.append(LamellarFFHGModel.__name__)
         
         from sans.models.LamellarPSModel import LamellarPSModel
         self.shape_list.append(LamellarPSModel)
+        self.model_name_list.append(LamellarPSModel.__name__)
      
         from sans.models.LamellarPSHGModel import LamellarPSHGModel
         self.shape_list.append(LamellarPSHGModel)
+        self.model_name_list.append(LamellarPSHGModel.__name__)
         
         from sans.models.LamellarPCrystalModel import LamellarPCrystalModel
         self.shape_list.append(LamellarPCrystalModel)
+        self.model_name_list.append(LamellarPCrystalModel.__name__)
         
         from sans.models.SCCrystalModel import SCCrystalModel
         self.shape_list.append(SCCrystalModel)
+        self.model_name_list.append(SCCrystalModel.__name__)
         
         from sans.models.FCCrystalModel import FCCrystalModel
         self.shape_list.append(FCCrystalModel)
+        self.model_name_list.append(FCCrystalModel.__name__)
         
         from sans.models.BCCrystalModel import BCCrystalModel
         self.shape_list.append(BCCrystalModel)
+        self.model_name_list.append(BCCrystalModel.__name__)
       
         ## Structure factor 
         from sans.models.SquareWellStructure import SquareWellStructure
         self.struct_list.append(SquareWellStructure)
+        self.model_name_list.append(SquareWellStructure.__name__)
         
         from sans.models.HardsphereStructure import HardsphereStructure
         self.struct_list.append(HardsphereStructure)
+        self.model_name_list.append(HardsphereStructure.__name__)
          
         from sans.models.StickyHSStructure import StickyHSStructure
         self.struct_list.append(StickyHSStructure)
+        self.model_name_list.append(StickyHSStructure.__name__)
         
         from sans.models.HayterMSAStructure import HayterMSAStructure
         self.struct_list.append(HayterMSAStructure)
+        self.model_name_list.append(HayterMSAStructure.__name__)
         
         ##shape-independent models
         from sans.models.PowerLawAbsModel import PowerLawAbsModel
         self.shape_indep_list.append( PowerLawAbsModel )
+        self.model_name_list.append(PowerLawAbsModel.__name__)
         
         from sans.models.BEPolyelectrolyte import BEPolyelectrolyte
         self.shape_indep_list.append(BEPolyelectrolyte )
+        self.model_name_list.append(BEPolyelectrolyte.__name__)
         self.form_factor_dict[str(wx.NewId())] =  [SphereModel]
         
         from sans.models.BroadPeakModel import BroadPeakModel
         self.shape_indep_list.append(BroadPeakModel)
+        self.model_name_list.append(BroadPeakModel.__name__)
         
         from sans.models.CorrLengthModel import CorrLengthModel
         self.shape_indep_list.append(CorrLengthModel)
+        self.model_name_list.append(CorrLengthModel.__name__)
         
         from sans.models.DABModel import DABModel
         self.shape_indep_list.append(DABModel )
+        self.model_name_list.append(DABModel.__name__)
         
         from sans.models.DebyeModel import DebyeModel
         self.shape_indep_list.append(DebyeModel )
+        self.model_name_list.append(DebyeModel.__name__)
         
         #FractalModel (a c-model)is now being used instead of FractalAbsModel.
         from sans.models.FractalModel import FractalModel
         self.shape_indep_list.append(FractalModel )
+        self.model_name_list.append(FractalModel.__name__)
         
         from sans.models.FractalCoreShellModel import FractalCoreShellModel
         self.shape_indep_list.append(FractalCoreShellModel )
+        self.model_name_list.append(FractalCoreShellModel.__name__)
         
         from sans.models.GaussLorentzGelModel import GaussLorentzGelModel
         self.shape_indep_list.append(GaussLorentzGelModel) 
+        self.model_name_list.append(GaussLorentzGelModel.__name__)
                 
         from sans.models.GuinierModel import GuinierModel
         self.shape_indep_list.append(GuinierModel )
+        self.model_name_list.append(GuinierModel.__name__)
         
         from sans.models.GuinierPorodModel import GuinierPorodModel
         self.shape_indep_list.append(GuinierPorodModel )
+        self.model_name_list.append(GuinierPorodModel.__name__)
 
         from sans.models.LorentzModel import LorentzModel
         self.shape_indep_list.append( LorentzModel) 
+        self.model_name_list.append(LorentzModel.__name__)
         
         from sans.models.PeakGaussModel import PeakGaussModel
         self.shape_indep_list.append(PeakGaussModel)
+        self.model_name_list.append(PeakGaussModel.__name__)
         
         from sans.models.PeakLorentzModel import PeakLorentzModel
         self.shape_indep_list.append(PeakLorentzModel)
+        self.model_name_list.append( PeakLorentzModel.__name__)
         
         from sans.models.Poly_GaussCoil import Poly_GaussCoil
         self.shape_indep_list.append(Poly_GaussCoil)
+        self.model_name_list.append(Poly_GaussCoil.__name__)
         
         from sans.models.PolymerExclVolume import PolymerExclVolume
         self.shape_indep_list.append(PolymerExclVolume)
+        self.model_name_list.append(PolymerExclVolume.__name__)
         
         from sans.models.PorodModel import PorodModel
-        self.shape_indep_list.append(PorodModel )      
+        self.shape_indep_list.append(PorodModel )  
+        self.model_name_list.append(PorodModel.__name__)    
         
         from sans.models.RPA10Model import RPA10Model
@@ -445,10 +495,13 @@
         from sans.models.TeubnerStreyModel import TeubnerStreyModel
         self.shape_indep_list.append(TeubnerStreyModel )
+        self.model_name_list.append(TeubnerStreyModel.__name__)
         
         from sans.models.TwoLorentzianModel import TwoLorentzianModel
         self.shape_indep_list.append(TwoLorentzianModel )
+        self.model_name_list.append(TwoLorentzianModel.__name__)
         
         from sans.models.TwoPowerLawModel import TwoPowerLawModel
         self.shape_indep_list.append(TwoPowerLawModel )
+        self.model_name_list.append(TwoPowerLawModel.__name__)
         
         from sans.models.UnifiedPowerRgModel import UnifiedPowerRgModel
@@ -458,4 +511,5 @@
         from sans.models.LineModel import LineModel
         self.shape_indep_list.append(LineModel)
+        self.model_name_list.append(LineModel.__name__)
         
         from sans.models.ReflectivityModel import ReflectivityModel
@@ -695,4 +749,9 @@
         return self.model_combobox.get_list()
     
+    def get_model_name_list(self):
+        """
+        return regular model name list
+        """
+        return self.model_name_list
   
         
@@ -730,4 +789,7 @@
         return self.__modelmanager.get_model_list()
     
+    def get_model_name_list(self):
+        return self.__modelmanager.get_model_name_list()
+    
     
   
Index: fittingview/src/sans/perspectives/fitting/plugin_models/polynominal5.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/plugin_models/polynominal5.py	(revision 7c8d3093945ee0f295c2b919d7b23f654f80158c)
+++ fittingview/src/sans/perspectives/fitting/plugin_models/polynominal5.py	(revision 7c8d3093945ee0f295c2b919d7b23f654f80158c)
@@ -0,0 +1,139 @@
+"""
+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!!!
+import math                    ##DO NOT CHANGE THIS LINE!!!
+import numpy                    ##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 = "polynomial5" ## <----- 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['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 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'] = ['', None, None]           ## <-----   
+        ## YOU CAN MODIFY THE LINE BELLOW.MODIFY WORDS BETWEEN """   """  ONLY!!!!
+        self.description = """
+        F(x) 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:
+        ## F(x)=A+B*x+C*x^2+D*x^3+E*x^4+F*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']        ## <-----   
+ 
+        ##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)      ## <-----                
+        
+        #(lim x --> 0) 
+        #(Just note: In Python, indentation defines the belongings of 'if', 'for', and so on..)
+        if x == 0:                       ## <-----   
+            result = a                      ## <-----   
+        else:                               ## <-----   
+            result = poly    ## <-----    
+
+        return result ## MODIFY ONLY RESULT. DON'T DELETE RETURN!!!!
+
+## DO NOT MODIFY THE FOLLOWING LINES!!!!!!!!!!!!!!!!       
+if __name__ == "__main__": 
+    m= Model() 
+    out1 = m.runXY(0.0)
+    out2 = m.runXY(0.01)
+    isfine1 = numpy.isfinite(out1)
+    isfine2 = numpy.isfinite(out2)
+    print "Testing the value at Q = 0.0:"
+    print out1, " : finite? ", isfine1
+    print "Testing the value at Q = 0.01:"
+    print out2, " : finite? ", isfine2
+    if isfine1 and isfine2:
+        print "===> Simple Test: Passed!"
+    else:
+        print "===> Simple Test: Failed!"
Index: fittingview/src/sans/perspectives/fitting/plugin_models/sph_bessel_jn.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/plugin_models/sph_bessel_jn.py	(revision 7c8d3093945ee0f295c2b919d7b23f654f80158c)
+++ fittingview/src/sans/perspectives/fitting/plugin_models/sph_bessel_jn.py	(revision 7c8d3093945ee0f295c2b919d7b23f654f80158c)
@@ -0,0 +1,134 @@
+"""
+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!!!
+import math                  ##DO NOT CHANGE THIS LINE!!!
+import numpy                 ##DO NOT CHANGE THIS LINE!!!
+import scipy.special            ##CHANGE THIS LINE WITH CAUTION!!!
+
+##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 = "C*sph_jn(Ax+B)+D" ## <----- 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['C'] = 1.0   ## <-----   
+        ## 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'] = 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 ALSO DELETE THIS LINE                 
+        self.params['n'] = 1      ## <----- 
+ 
+        ## 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['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['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['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['n'] = ['', None, None]        ## <-----   
+
+        ## YOU CAN MODIFY THE LINE BELLOW.MODIFY WORDS BETWEEN """   """  ONLY!!!!
+        self.description = """
+            Spherical Bessel Function: C*sph_jn(n, Ax+B)+D
+                 """                        ## <-----   
+   
+    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:
+        ## C*sph_jn(Ax+B)+D
+         
+        ## 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']       ## <-----   
+        # Take integer value only
+        n = int(self.params['n'])      ## <-----   
+
+        ##THIS OUR FUNCTION TEMPLATE
+        #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..)
+        input = a * x + b
+        # sph_out and _ are in array from scipy upto n'th order
+        sph_out, _ = scipy.special.sph_jn(n, input)
+        # Take only n'th value
+        result = c * sph_out[n] + d      ## <-----                
+
+        return result ## MODIFY ONLY RESULT. DON'T DELETE RETURN!!!!
+    
+## DO NOT MODIFY THE FOLLOWING LINES!!!!!!!!!!!!!!!!       
+if __name__ == "__main__": 
+    m= Model() 
+    out1 = m.runXY(0.0)
+    out2 = m.runXY(0.01)
+    isfine1 = numpy.isfinite(out1)
+    isfine2 = numpy.isfinite(out2)
+    print "Testing the value at Q = 0.0:"
+    print out1, " : finite? ", isfine1
+    print "Testing the value at Q = 0.01:"
+    print out2, " : finite? ", isfine2
+    if isfine1 and isfine2:
+        print "===> Simple Test: Passed!"
+    else:
+        print "===> Simple Test: Failed!"
Index: fittingview/src/sans/perspectives/fitting/plugin_models/sum_Ap1_1_Ap2.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/plugin_models/sum_Ap1_1_Ap2.py	(revision 7c8d3093945ee0f295c2b919d7b23f654f80158c)
+++ fittingview/src/sans/perspectives/fitting/plugin_models/sum_Ap1_1_Ap2.py	(revision 7c8d3093945ee0f295c2b919d7b23f654f80158c)
@@ -0,0 +1,401 @@
+# A sample of an experimental model function for Sum(APmodel1,(1-A)Pmodel2)
+import copy
+from sans.models.pluginmodel import Model1DPlugin
+# Possible model names
+"""
+BCCrystalModel, BEPolyelectrolyte, BarBellModel, BinaryHSModel, BroadPeakModel,
+CSParallelepipedModel, CappedCylinderModel, CoreShellCylinderModel,
+CoreShellEllipsoidModel, CoreShellModel, CorrLengthModel, CylinderModel, 
+DABModel, DebyeModel, EllipsoidModel, EllipticalCylinderModel, FCCrystalModel,
+FlexCylEllipXModel, FlexibleCylinderModel, FractalCoreShellModel, FractalModel,
+FuzzySphereModel, GaussLorentzGelModel, GuinierModel, GuinierPorodModel,
+HardsphereStructure, HayterMSAStructure, HollowCylinderModel, LamellarFFHGModel,
+LamellarModel, LamellarPCrystalModel, LamellarPSHGModel, LamellarPSModel,
+LineModel, LorentzModel, MultiShellModel, ParallelepipedModel, PeakGaussModel,
+PeakLorentzModel, PearlNecklaceModel, Poly_GaussCoil, PolymerExclVolume,
+PorodModel, PowerLawAbsModel, SCCrystalModel, SphereModel, SquareWellStructure,
+StackedDisksModel, StickyHSStructure, TeubnerStreyModel, TriaxialEllipsoidModel,
+TwoLorentzianModel, TwoPowerLawModel, VesicleModel
+"""
+## This is DIFFERENT from the Easy Custom Sum(p1 + p2) 
+## by definition of the scale factor *****************************************
+#
+#     Custom model = scale_factor * P1 + (1 - scale_factor) * P2
+#
+## User can REPLACE model names below arrowed two lines (twice per line)
+from sans.models.CylinderModel import CylinderModel as P1          #<========
+from sans.models.PolymerExclVolume import PolymerExclVolume as P2  #<========
+
+#####DO NOT CHANGE ANYTHING BELOW THIS LINE 
+#####------------------------------------------------------------------------
+class Model(Model1DPlugin):
+    """
+    Use for A*p1(Q)+(1-A)*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 = self._get_name(p_model1.name, p_model2.name)
+        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'] = 0.5
+        
+        ## 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 _get_name(self, name1, name2):
+        """
+        Get combined name from two model names
+        """
+        name = "A*"
+        name += self._get_upper_name(name1)
+        name += "+(1-A)*"
+        name += self._get_upper_name(name2)
+        return name
+    
+    def _get_upper_name(self, name=None):
+        """
+        Get uppercase string from model name
+        """
+        if name == None:
+            return ""
+        upper_name = ""
+        str_name = str(name)
+        for index in range(len(str_name)):
+            if str_name[index].isupper():
+                upper_name += str_name[index]
+        return upper_name
+        
+    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) + \
+                (1 - self.params['scale_factor']) * 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) + \
+                (1 - self.params['scale_factor']) * 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) + \
+                (1 - self.params['scale_factor']) * 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 = 0.5 * m2.p_model1.runXY(0.01) + 0.5 * m2.p_model2.runXY(0.01)
+    print "Testing at Q = 0.01:"
+    print out1, " = ", out2
+    if out1 == out2:
+        print "===> Simple Test: Passed!"
+    else:
+        print "===> Simple Test: Failed!"
Index: fittingview/src/sans/perspectives/fitting/plugin_models/sum_p1_p2.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/plugin_models/sum_p1_p2.py	(revision 96814e18e1af3274272b6b1e1640f5ca53492065)
+++ fittingview/src/sans/perspectives/fitting/plugin_models/sum_p1_p2.py	(revision 7c8d3093945ee0f295c2b919d7b23f654f80158c)
@@ -2,9 +2,30 @@
 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
-
-
+# Possible model names
+"""
+BCCrystalModel, BEPolyelectrolyte, BarBellModel, BinaryHSModel, BroadPeakModel,
+CSParallelepipedModel, CappedCylinderModel, CoreShellCylinderModel,
+CoreShellEllipsoidModel, CoreShellModel, CorrLengthModel, CylinderModel, 
+DABModel, DebyeModel, EllipsoidModel, EllipticalCylinderModel, FCCrystalModel,
+FlexCylEllipXModel, FlexibleCylinderModel, FractalCoreShellModel, FractalModel,
+FuzzySphereModel, GaussLorentzGelModel, GuinierModel, GuinierPorodModel,
+HardsphereStructure, HayterMSAStructure, HollowCylinderModel, LamellarFFHGModel,
+LamellarModel, LamellarPCrystalModel, LamellarPSHGModel, LamellarPSModel,
+LineModel, LorentzModel, MultiShellModel, ParallelepipedModel, PeakGaussModel,
+PeakLorentzModel, PearlNecklaceModel, Poly_GaussCoil, PolymerExclVolume,
+PorodModel, PowerLawAbsModel, SCCrystalModel, SphereModel, SquareWellStructure,
+StackedDisksModel, StickyHSStructure, TeubnerStreyModel, TriaxialEllipsoidModel,
+TwoLorentzianModel, TwoPowerLawModel, VesicleModel
+"""
+## This is same as the Easy Custom Sum(p1 + p2) 
+#
+#     Custom model = scale_factor * (P1 + P2)
+#
+## User can REPLACE model names below two arrowed lines (two names per line)
+from sans.models.CylinderModel import CylinderModel as P1          #<========
+from sans.models.PolymerExclVolume import PolymerExclVolume as P2  #<========
+
+#####DO NOT CHANGE ANYTHING BELOW THIS LINE 
+#####------------------------------------------------------------------------
 class Model(Model1DPlugin):
     """
@@ -23,5 +44,5 @@
         ## Setting  model name model description
         self.description=""
-        self.name = "Sum[" + "P1(Cyl)"  +", "+ "P2(PEV)" + "]"
+        self.name = self._get_name(p_model1.name, p_model2.name)
         self.description = p_model1.name+"\n"
         self.description += p_model2.name+"\n"
@@ -52,5 +73,5 @@
         ## Parameter details [units, min, max]
         self._set_details()
-        self.details['scale_factor'] = ['',     None, None]
+        self.details['scale_factor'] = ['',  None, None]
 
         
@@ -96,5 +117,26 @@
         return obj
     
-    
+    def _get_name(self, name1, name2):
+        """
+        Get combined name from two model names
+        """
+        name = self._get_upper_name(name1)
+        name += "+"
+        name += self._get_upper_name(name2)
+        return name
+    
+    def _get_upper_name(self, name=None):
+        """
+        Get uppercase string from model name
+        """
+        if name == None:
+            return ""
+        upper_name = ""
+        str_name = str(name)
+        for index in range(len(str_name)):
+            if str_name[index].isupper():
+                upper_name += str_name[index]
+        return upper_name
+        
     def _set_dispersion(self):
         """
@@ -339,17 +381,20 @@
 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) 
+    #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)
+    #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 "Testing at Q = 0.01:"
     print out1, " = ", out2
-
-   
+    if out1 == out2:
+        print "===> Simple Test: Passed!"
+    else:
+        print "===> Simple Test: Failed!"
Index: fittingview/src/sans/perspectives/fitting/plugin_models/testmodel.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/plugin_models/testmodel.py	(revision 96814e18e1af3274272b6b1e1640f5ca53492065)
+++ fittingview/src/sans/perspectives/fitting/plugin_models/testmodel.py	(revision 7c8d3093945ee0f295c2b919d7b23f654f80158c)
@@ -7,6 +7,6 @@
 """
 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!!!
+import math                  ##DO NOT CHANGE THIS LINE!!!
+import numpy               ##DO NOT CHANGE THIS LINE!!!
 
 ##PLEASE READ COMMENTS CAREFULLY !!! COMMENT ARE IN CAPITAL LETTERS AND AFTER ##
@@ -83,4 +83,19 @@
         ## 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)
-   
+        return self.params['A']+self.params['B']*math.cos(2.0*x)+self.params['C']*math.sin(2.0*x)
+    
+## DO NOT MODIFY THE FOLLOWING LINES!!!!!!!!!!!!!!!!       
+if __name__ == "__main__": 
+    m= Model() 
+    out1 = m.runXY(0.0)
+    out2 = m.runXY(0.01)
+    isfine1 = numpy.isfinite(out1)
+    isfine2 = numpy.isfinite(out2)
+    print "Testing the value at Q = 0.0:"
+    print out1, " : finite? ", isfine1
+    print "Testing the value at Q = 0.01:"
+    print out2, " : finite? ", isfine2
+    if isfine1 and isfine2:
+        print "===> Simple Test: Passed!"
+    else:
+        print "===> Simple Test: Failed!"
Index: fittingview/src/sans/perspectives/fitting/plugin_models/testmodel_2.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/plugin_models/testmodel_2.py	(revision 96814e18e1af3274272b6b1e1640f5ca53492065)
+++ fittingview/src/sans/perspectives/fitting/plugin_models/testmodel_2.py	(revision 7c8d3093945ee0f295c2b919d7b23f654f80158c)
@@ -133,5 +133,5 @@
             result = 1                      ## <-----   
         else:                               ## <-----   
-            result = sin(poly)/poly    ## <-----   
+            result = math.sin(poly)/poly    ## <-----   
             
         #Re-scale                          ## <-----   
@@ -139,3 +139,18 @@
 
         return result ## MODIFY ONLY RESULT. DON'T DELETE RETURN!!!!
-   
+    
+## DO NOT MODIFY THE FOLLOWING LINES!!!!!!!!!!!!!!!!       
+if __name__ == "__main__": 
+    m= Model() 
+    out1 = m.runXY(0.0)
+    out2 = m.runXY(0.01)
+    isfine1 = numpy.isfinite(out1)
+    isfine2 = numpy.isfinite(out2)
+    print "Testing the value at Q = 0.0:"
+    print out1, " : finite? ", isfine1
+    print "Testing the value at Q = 0.01:"
+    print out2, " : finite? ", isfine2
+    if isfine1 and isfine2:
+        print "===> Simple Test: Passed!"
+    else:
+        print "===> Simple Test: Failed!"
