Index: sansmodels/src/sans/models/test/utest_modelmultiplication.py
===================================================================
--- sansmodels/src/sans/models/test/utest_modelmultiplication.py	(revision b22748b53be5e9215b8a9151242dc11c82b5bbfa)
+++ sansmodels/src/sans/models/test/utest_modelmultiplication.py	(revision ec38f27df8d38f4ddd3bc49d563e5c1d0cf3f8f7)
@@ -3,90 +3,463 @@
     @author: Gervaise Alina / UTK
 """
-
+#This test replaces the older utests for multiplicationModel. Aug. 31, 2009. JC
 import unittest, numpy,math
-
-from sans.models.MultiplicationModel import MultiplicationModel
-from sans.models.SphereModel import SphereModel
-from sans.models.SquareWellStructure import SquareWellStructure
+### P*S with sphere model    
+class TestsphereSuareW(unittest.TestCase):
+    """ 
+        Unit tests for SphereModel(Q) * SquareWellStructure(Q)
+    """
+    def setUp(self):
+        from sans.models.SphereModel import SphereModel
+        from sans.models.SquareWellStructure import SquareWellStructure
+        from sans.models.DiamCylFunc import DiamCylFunc
+        from sans.models.MultiplicationModel import MultiplicationModel
+
+        self.model = SphereModel()
+        self.model2 = SquareWellStructure()
+        self.model3 = MultiplicationModel(self.model, self.model2)  
+        self.modelD = DiamCylFunc() 
+
+    #Radius of model1.calculate_ER should be equal to the output/2 of DiamFunctions
+    def test_multplication_radius(self):
+        """
+            test multiplication model (check the effective radius & the output
+             of the multiplication)
+        """
+        self.model.setParam("radius", 60)
+        modelDrun = 60
+        self.model2.setParam("volfraction", 0.2)
+        self.model2.setParam("effect_radius", modelDrun )
+        
+        #Compare new method with old method         
+        self.assertEqual(self.model3.run(0.1), self.model.run(0.1)*self.model2.run(0.1))
+        
+        #Compare radius from two different calculations. Note: modelD.run(0.0) is DIAMETER
+        self.assertEqual(self.model.calculate_ER(), modelDrun)
+        
+        
+    def testMultiplicationParam(self):
+        """ Test Multiplication  (check the setparameters and the run & runXY w/ array dispersion)"""
+        ## test details dictionary
+
+        ## test parameters list
+        list3= self.model3.getParamList()
+
+        for item in self.model.getParamList():
+            self.assert_(item in list3)
+        for item in self.model2.getParamList():
+            #model3 parameters should not include effect_radius*
+            if not 'effect_radius' in item:  
+                self.assert_(item in list3)
+            
+        ## test set value for parameters and get paramaters
+        self.model3.setParam("scale", 15)
+        self.assertEqual(self.model3.getParam("scale"), 15)
+        self.model3.setParam("radius", 20)
+        self.assertEqual(self.model3.getParam("radius"), 20)
+        self.model3.setParam("radius.width", 15)
+        self.assertEqual(self.model3.getParam("radius.width"), 15)
+        
+        ## Dispersity 
+        list3= self.model3.getDispParamList()
+        self.assertEqual(list3, ['radius.npts', 'radius.nsigmas', 'radius.width'])
+        
+        from sans.models.dispersion_models import ArrayDispersion
+        disp_th = ArrayDispersion()
+        
+        values_th = numpy.zeros(100)
+        weights   = numpy.zeros(100)
+        for i in range(100):
+            values_th[i]=(math.pi/99.0*i)
+            weights[i]=(1.0)
+    
+        disp_th.set_weights(values_th, weights)
+        
+        self.model3.set_dispersion('radius', disp_th)
+        
+        val_1d = self.model3.run(math.sqrt(0.0002))
+        val_2d = self.model3.runXY([0.01,0.01]) 
+        
+        self.assertTrue(math.fabs(val_1d-val_2d)/val_1d < 0.02)
+        model4= self.model3.clone()
+        self.assertEqual(model4.getParam("radius"), 20)
       
-class TestDisperser(unittest.TestCase):
-    """ Unit tests for sphere model * SquareWellStructure"""
-    model1= SphereModel()
-    model2= SquareWellStructure()
-    model3= MultiplicationModel(model1, model2)
-    details={}
-    details['scale'] = ['', None, None]
-    details['radius'] = ['A', None, None]
-    details['contrast'] = ['A-2', None, None]
-    details['background'] = ['cm-1', None, None]
-    details['volfraction'] = ['', None, None]
-    details['welldepth'] = ['kT', None, None]
-    details['wellwidth'] = ['', None, None]
-    
-    ## fittable parameters
-    fixed=[]
-    fixed=['radius.width']
-    def test_multplication_radius(self):
-        """ test multiplication model"""
-        from sans.models.MultiplicationModel import MultiplicationModel
+class TestsphereHardS(unittest.TestCase):
+    """ 
+        Unit tests for SphereModel(Q) * HardsphereStructure(Q)
+    """
+    def setUp(self):
+        from sans.models.SphereModel import SphereModel
+        from sans.models.HardsphereStructure import HardsphereStructure
+        from sans.models.DiamCylFunc import DiamCylFunc
+        from sans.models.MultiplicationModel import MultiplicationModel
+
+        self.model = SphereModel()
+        self.model2 = HardsphereStructure()
+        self.model3 = MultiplicationModel(self.model, self.model2)  
+        self.modelD = DiamCylFunc() 
+
+    #Radius of model1.calculate_ER should be equal to the output/2 of DiamFunctions
+    def test_multplication_radius(self):
+        """
+            test multiplication model (check the effective radius & the output
+             of the multiplication)
+        """
+        self.model.setParam("radius", 60)
+        modelDrun = 60
+        self.model2.setParam("volfraction", 0.2)
+        self.model2.setParam("effect_radius", modelDrun )
+        
+        #Compare new method with old method         
+        self.assertEqual(self.model3.run(0.1), self.model.run(0.1)*self.model2.run(0.1))
+        
+        #Compare radius from two different calculations. Note: modelD.run(0.0) is DIAMETER
+        self.assertEqual(self.model.calculate_ER(), modelDrun)
+        
+        
+    def testMultiplicationParam(self):
+        """ Test Multiplication  (check the parameters)"""
+        ## test details dictionary
+
+        ## test parameters list
+        list3= self.model3.getParamList()
+
+        for item in self.model.getParamList():
+            self.assert_(item in list3)
+        for item in self.model2.getParamList():
+            #model3 parameters should not include effect_radius*
+            if not 'effect_radius' in item:  
+                self.assert_(item in list3)
+            
+        ## test set value for parameters and get paramaters
+        self.model3.setParam("scale", 15)
+        self.assertEqual(self.model3.getParam("scale"), 15)
+        self.model3.setParam("radius", 20)
+        self.assertEqual(self.model3.getParam("radius"), 20)
+        self.model3.setParam("radius.width", 15)
+        self.assertEqual(self.model3.getParam("radius.width"), 15)
+        
+        ## Dispersity 
+        list3= self.model3.getDispParamList()
+        self.assertEqual(list3, ['radius.npts', 'radius.nsigmas', 'radius.width'])
+        
+        from sans.models.dispersion_models import ArrayDispersion
+        disp_th = ArrayDispersion()
+        
+        values_th = numpy.zeros(100)
+        weights   = numpy.zeros(100)
+        for i in range(100):
+            values_th[i]=(math.pi/99.0*i)
+            weights[i]=(1.0)
+    
+        disp_th.set_weights(values_th, weights)
+        
+        self.model3.set_dispersion('radius', disp_th)
+        
+        val_1d = self.model3.run(math.sqrt(0.0002))
+        val_2d = self.model3.runXY([0.01,0.01]) 
+        
+        self.assertTrue(math.fabs(val_1d-val_2d)/val_1d < 0.02)
+        model4= self.model3.clone()
+        self.assertEqual(model4.getParam("radius"), 20)
+class TestsphereSHS(unittest.TestCase):
+    """ 
+        Unit tests for SphereModel(Q) * StickyHSStructure(Q)
+    """
+    def setUp(self):
+        from sans.models.SphereModel import SphereModel
+        from sans.models.StickyHSStructure import StickyHSStructure
+        from sans.models.DiamCylFunc import DiamCylFunc
+        from sans.models.MultiplicationModel import MultiplicationModel
+
+        self.model = SphereModel()
+        self.model2 = StickyHSStructure()
+        self.model3 = MultiplicationModel(self.model, self.model2)  
+        self.modelD = DiamCylFunc() 
+
+    #Radius of model1.calculate_ER should be equal to the output/2 of DiamFunctions
+    def test_multplication_radius(self):
+        """
+            test multiplication model (check the effective radius & the output
+             of the multiplication)
+        """
+        self.model.setParam("radius", 60)
+        modelDrun = 60
+        self.model2.setParam("volfraction", 0.2)
+        self.model2.setParam("effect_radius", modelDrun )
+        
+        #Compare new method with old method         
+        self.assertEqual(self.model3.run(0.1), self.model.run(0.1)*self.model2.run(0.1))
+        
+        #Compare radius from two different calculations. Note: modelD.run(0.0) is DIAMETER
+        self.assertEqual(self.model.calculate_ER(), modelDrun)
+        
+        
+    def testMultiplicationParam(self):
+        """ Test Multiplication  (check the parameters)"""
+        ## test details dictionary
+
+        ## test parameters list
+        list3= self.model3.getParamList()
+
+        for item in self.model.getParamList():
+            self.assert_(item in list3)
+        for item in self.model2.getParamList():
+            #model3 parameters should not include effect_radius*
+            if not 'effect_radius' in item:  
+                self.assert_(item in list3)
+            
+        ## test set value for parameters and get paramaters
+        self.model3.setParam("scale", 15)
+        self.assertEqual(self.model3.getParam("scale"), 15)
+        self.model3.setParam("radius", 20)
+        self.assertEqual(self.model3.getParam("radius"), 20)
+        self.model3.setParam("radius.width", 15)
+        self.assertEqual(self.model3.getParam("radius.width"), 15)
+        
+        ## Dispersity 
+        list3= self.model3.getDispParamList()
+        self.assertEqual(list3, ['radius.npts', 'radius.nsigmas', 'radius.width'])
+        
+        from sans.models.dispersion_models import ArrayDispersion
+        disp_th = ArrayDispersion()
+        
+        values_th = numpy.zeros(100)
+        weights   = numpy.zeros(100)
+        for i in range(100):
+            values_th[i]=(math.pi/99.0*i)
+            weights[i]=(1.0)
+    
+        disp_th.set_weights(values_th, weights)
+        
+        self.model3.set_dispersion('radius', disp_th)
+        
+        val_1d = self.model3.run(math.sqrt(0.0002))
+        val_2d = self.model3.runXY([0.01,0.01]) 
+        
+        self.assertTrue(math.fabs(val_1d-val_2d)/val_1d < 0.02)
+        model4= self.model3.clone()
+        self.assertEqual(model4.getParam("radius"), 20)
+        
+class TestsphereHayterM(unittest.TestCase):
+    """ 
+        Unit tests for SphereModel(Q) * HayterMSAStructure(Q)
+    """
+    def setUp(self):
+        from sans.models.SphereModel import SphereModel
+        from sans.models.HayterMSAStructure import HayterMSAStructure
+        from sans.models.DiamCylFunc import DiamCylFunc
+        from sans.models.MultiplicationModel import MultiplicationModel
+
+        self.model = SphereModel()
+        self.model2 = HayterMSAStructure()
+        self.model3 = MultiplicationModel(self.model, self.model2)  
+        self.modelD = DiamCylFunc() 
+
+    #Radius of model1.calculate_ER should be equal to the output/2 of DiamFunctions
+    def test_multplication_radius(self):
+        """
+            test multiplication model (check the effective radius & the output
+             of the multiplication)
+        """
+        self.model.setParam("radius", 60)
+        modelDrun = 60
+        self.model2.setParam("volfraction", 0.2)
+        self.model2.setParam("effect_radius", modelDrun )
+        
+        #Compare new method with old method         
+        self.assertEqual(self.model3.run(0.1), self.model.run(0.1)*self.model2.run(0.1))
+        
+        #Compare radius from two different calculations. Note: modelD.run(0.0) is DIAMETER
+        self.assertEqual(self.model.calculate_ER(), modelDrun)
+        
+        
+    def testMultiplicationParam(self):
+        """ Test Multiplication  (check the parameters)"""
+        ## test details dictionary
+
+        ## test parameters list
+        list3= self.model3.getParamList()
+
+        for item in self.model.getParamList():
+            self.assert_(item in list3)
+        for item in self.model2.getParamList():
+            #model3 parameters should not include effect_radius*
+            if not 'effect_radius' in item:  
+                self.assert_(item in list3)
+            
+        ## test set value for parameters and get paramaters
+        self.model3.setParam("scale", 15)
+        self.assertEqual(self.model3.getParam("scale"), 15)
+        self.model3.setParam("radius", 20)
+        self.assertEqual(self.model3.getParam("radius"), 20)
+        self.model3.setParam("radius.width", 15)
+        self.assertEqual(self.model3.getParam("radius.width"), 15)
+        
+        ## Dispersity 
+        list3= self.model3.getDispParamList()
+        self.assertEqual(list3, ['radius.npts', 'radius.nsigmas', 'radius.width'])
+        
+        from sans.models.dispersion_models import ArrayDispersion
+        disp_th = ArrayDispersion()
+        
+        values_th = numpy.zeros(100)
+        weights   = numpy.zeros(100)
+        for i in range(100):
+            values_th[i]=(math.pi/99.0*i)
+            weights[i]=(1.0)
+    
+        disp_th.set_weights(values_th, weights)
+        
+        self.model3.set_dispersion('radius', disp_th)
+        
+        val_1d = self.model3.run(math.sqrt(0.0002))
+        val_2d = self.model3.runXY([0.01,0.01]) 
+
+        self.assertTrue(math.fabs(val_1d-val_2d)/val_1d < 0.02)
+
+        model4= self.model3.clone()
+        self.assertEqual(model4.getParam("radius"), 20)      
+          
+### P*S with cylinder model
+class TestcylinderSuareW(unittest.TestCase):
+    """ 
+        Unit tests for CylinderModel(Q) * SquareWellStructure(Q)
+    """
+    def setUp(self):
+        from sans.models.CylinderModel import CylinderModel
+        from sans.models.SquareWellStructure import SquareWellStructure
+        from sans.models.DiamCylFunc import DiamCylFunc
+        from sans.models.MultiplicationModel import MultiplicationModel
+
+        self.model = CylinderModel()
+        self.model2 = SquareWellStructure()
+        self.model3 = MultiplicationModel(self.model, self.model2)  
+        self.modelD = DiamCylFunc() 
+
+    #Radius of model1.calculate_ER should be equal to the output/2 of DiamFunctions
+    def test_multplication_radius(self):
+        """
+            test multiplication model (check the effective radius & the output
+             of the multiplication)
+        """
+        self.model.setParam("radius", 60)
+        self.modelD.setParam("radius", 60)
+        modelDrun = self.modelD.run(0.1)/2
+        self.model2.setParam("volfraction", 0.2)
+        self.model2.setParam("effect_radius", modelDrun)
+        
+        #Compare new method with old method         
+        self.assertEqual(self.model3.run(0.1), self.model.run(0.1)*self.model2.run(0.1))
+        
+        #Compare radius from two different calculations. Note: modelD.run(0.0) is DIAMETER
+        self.assertEqual(self.model.calculate_ER(), modelDrun)
+        
+        
+    def testMultiplicationParam(self):
+        """ Test Multiplication  (check the setparameters and the run & runXY w/ array dispersion)"""
+        ## test details dictionary
+
+        ## test parameters list
+        list3= self.model3.getParamList()
+
+        for item in self.model.getParamList():
+            self.assert_(item in list3)
+        for item in self.model2.getParamList():
+            #model3 parameters should not include effect_radius*
+            if not 'effect_radius' in item:  
+                self.assert_(item in list3)
+            
+        ## test set value for parameters and get paramaters
+        self.model3.setParam("scale", 15)
+        self.assertEqual(self.model3.getParam("scale"), 15)
+        self.model3.setParam("radius", 20)
+        self.assertEqual(self.model3.getParam("radius"), 20)
+        self.model3.setParam("radius.width", 15)
+        self.assertEqual(self.model3.getParam("radius.width"), 15)
+        
+        ## Dispersity 
+        list3= self.model3.getDispParamList()
+        self.assertEqual(list3, ['radius.npts', 'radius.nsigmas', 'radius.width', 'length.npts', \
+         'length.nsigmas', 'length.width', 'cyl_theta.npts', 'cyl_theta.nsigmas', 'cyl_theta.width',\
+          'cyl_phi.npts', 'cyl_phi.nsigmas', 'cyl_phi.width'])
+        
+        from sans.models.dispersion_models import ArrayDispersion
+        disp_th = ArrayDispersion()
+        
+        values_th = numpy.zeros(100)
+        weights   = numpy.zeros(100)
+        for i in range(100):
+            values_th[i]=(math.pi/99.0*i)
+            weights[i]=(1.0)
+    
+        disp_th.set_weights(values_th, weights)
+        
+        self.model3.set_dispersion('radius', disp_th)
+        
+        model4= self.model3.clone()
+        self.assertEqual(model4.getParam("radius"), 20)
+      
+class TestcylinderHardS(unittest.TestCase):
+    """ 
+        Unit tests for CylinderModel(Q) * HardsphereStructure(Q)
+    """
+    def setUp(self):
         from sans.models.CylinderModel import CylinderModel
         from sans.models.HardsphereStructure import HardsphereStructure
-        model1 = CylinderModel()
-        model1.setParam("radius", 3)
-        model2 = HardsphereStructure()
-        model  =  MultiplicationModel(model1,model2 )
-        model.setParam("radius", 1)
-        self.assertEqual(model.getParam("radius"), 1)
-        self.assertEqual(model.model1.getParam("radius"),3)
-        from sans.models.DiamCylFunc import DiamCylFunc
-        model4= DiamCylFunc()
-        radius= model4.run(0.0)
-        self.assertEqual(model.model2.getParam("radius"),radius)
-        
-    
-    def test_multiplication(self):
-        """ test multiplication model"""
-        from sans.models.MultiplicationModel import MultiplicationModel
-        from sans.models.SphereModel import SphereModel
-        from sans.models.NoStructure import NoStructure
-        model1  =  MultiplicationModel(SphereModel(),NoStructure())
-        model2 = SphereModel()
-        x= 2
-        a = model1.run(x)
-        
-        b=  model2.run(x)
-        self.assertEqual(a, b)
-        model2.setParam("scale", 10)
-        c=  model2.run(x)
-        self.assertEqual(c, 10*b)
-        model1.setParam("scale", 10)
-        d=  model1.run(x)
-        self.assertEqual(d, 10*a)
-        self.assertEqual(model1.getParam("scale"), 10)
-        
-        
-    def testMultiplicationModel(self):
-        """ Test Multiplication  sphere with SquareWellStructure"""
-        ## test details dictionary
-        self.assertEqual(self.model3.details, self.details)
-        
-        ## test parameters list
-        list3= self.model3.getParamList()
-        for item in self.model1.getParamList():
-            self.assert_(item in list3)
-        for item in self.model2.getParamList():
-            self.assert_(item in list3)
-            
-        ## test set value for parameters and get paramaters
-        self.model3.setParam("scale", 15)
-        self.assertEqual(self.model3.getParam("scale"), 15)
-        self.model3.setParam("radius", 20)
-        self.assertEqual(self.model3.getParam("radius"), 20)
-        self.model3.setParam("radius.width", 15)
-        self.assertEqual(self.model3.getParam("radius.width"), 15)
-        
-        ## Dispersity 
-        list3= self.model3.getDispParamList()
-        self.assertEqual(list3, ['radius.npts', 'radius.nsigmas', 'radius.width'])
+        from sans.models.DiamCylFunc import DiamCylFunc
+        from sans.models.MultiplicationModel import MultiplicationModel
+
+        self.model = CylinderModel()
+        self.model2 = HardsphereStructure()
+        self.model3 = MultiplicationModel(self.model, self.model2)  
+        self.modelD = DiamCylFunc() 
+
+    #Radius of model1.calculate_ER should be equal to the output/2 of DiamFunctions
+    def test_multplication_radius(self):
+        """
+            test multiplication model (check the effective radius & the output
+             of the multiplication)
+        """
+        self.model.setParam("radius", 60)
+        self.modelD.setParam("radius", 60)
+        modelDrun = self.modelD.run(0.1)/2
+        self.model2.setParam("volfraction", 0.2)
+        self.model2.setParam("effect_radius", modelDrun )
+        
+        #Compare new method with old method         
+        self.assertEqual(self.model3.run(0.1), self.model.run(0.1)*self.model2.run(0.1))
+        
+        #Compare radius from two different calculations. Note: modelD.run(0.0) is DIAMETER
+        self.assertEqual(self.model.calculate_ER(), modelDrun)
+        
+        
+    def testMultiplicationParam(self):
+        """ Test Multiplication """
+        ## test details dictionary
+
+        ## test parameters list
+        list3= self.model3.getParamList()
+
+        for item in self.model.getParamList():
+            self.assert_(item in list3)
+        for item in self.model2.getParamList():
+            #model3 parameters should not include effect_radius*
+            if not 'effect_radius' in item:  
+                self.assert_(item in list3)
+            
+        ## test set value for parameters and get paramaters
+        self.model3.setParam("scale", 15)
+        self.assertEqual(self.model3.getParam("scale"), 15)
+        self.model3.setParam("radius", 20)
+        self.assertEqual(self.model3.getParam("radius"), 20)
+        self.model3.setParam("radius.width", 15)
+        self.assertEqual(self.model3.getParam("radius.width"), 15)
+        
+        ## Dispersity 
+        list3= self.model3.getDispParamList()
+        self.assertEqual(list3, ['radius.npts', 'radius.nsigmas', 'radius.width', 'length.npts', \
+         'length.nsigmas', 'length.width', 'cyl_theta.npts', 'cyl_theta.nsigmas', 'cyl_theta.width',\
+          'cyl_phi.npts', 'cyl_phi.nsigmas', 'cyl_phi.width'])
         
         from sans.models.dispersion_models import ArrayDispersion
@@ -103,10 +476,163 @@
         self.model3.set_dispersion('radius', disp_th)
         
-        val_1d = self.model3.run(math.sqrt(0.0002))
-        val_2d = self.model3.runXY([0.01,0.01]) 
-        
-        self.assertTrue(math.fabs(val_1d-val_2d)/val_1d < 0.02)
+
         model4= self.model3.clone()
         self.assertEqual(model4.getParam("radius"), 20)
+class TestcylinderSHS(unittest.TestCase):
+    """ 
+        Unit tests for SphereModel(Q) * StickyHSStructure(Q)
+    """
+    def setUp(self):
+        from sans.models.CylinderModel import CylinderModel
+        from sans.models.StickyHSStructure import StickyHSStructure
+        from sans.models.DiamCylFunc import DiamCylFunc
+        from sans.models.MultiplicationModel import MultiplicationModel
+
+        self.model = CylinderModel()
+        self.model2 = StickyHSStructure()
+        self.model3 = MultiplicationModel(self.model, self.model2)  
+        self.modelD = DiamCylFunc()
+
+    #Radius of model1.calculate_ER should be equal to the output/2 of DiamFunctions
+    def test_multplication_radius(self):
+        """
+            test multiplication model (check the effective radius & the output
+             of the multiplication)
+        """
+        self.model.setParam("radius", 60)
+        self.modelD.setParam("radius", 60)
+        modelDrun = self.modelD.run(0.1)/2
+        self.model2.setParam("volfraction", 0.2)
+        self.model2.setParam("effect_radius", modelDrun )
+        
+        #Compare new method with old method         
+        self.assertEqual(self.model3.run(0.1), self.model.run(0.1)*self.model2.run(0.1))
+        
+        #Compare radius from two different calculations. Note: modelD.run(0.0) is DIAMETER
+        self.assertEqual(self.model.calculate_ER(), modelDrun)
+        
+        
+    def testMultiplicationParam(self):
+        """ Test Multiplication  (check the parameters)"""
+        ## test details dictionary
+
+        ## test parameters list
+        list3= self.model3.getParamList()
+
+        for item in self.model.getParamList():
+            self.assert_(item in list3)
+        for item in self.model2.getParamList():
+            #model3 parameters should not include effect_radius*
+            if not 'effect_radius' in item:  
+                self.assert_(item in list3)
+            
+        ## test set value for parameters and get paramaters
+        self.model3.setParam("scale", 15)
+        self.assertEqual(self.model3.getParam("scale"), 15)
+        self.model3.setParam("radius", 20)
+        self.assertEqual(self.model3.getParam("radius"), 20)
+        self.model3.setParam("radius.width", 15)
+        self.assertEqual(self.model3.getParam("radius.width"), 15)
+        
+        ## Dispersity 
+        list3= self.model3.getDispParamList()
+        self.assertEqual(list3, ['radius.npts', 'radius.nsigmas', 'radius.width', 'length.npts', \
+         'length.nsigmas', 'length.width', 'cyl_theta.npts', 'cyl_theta.nsigmas', 'cyl_theta.width',\
+          'cyl_phi.npts', 'cyl_phi.nsigmas', 'cyl_phi.width'])
+        
+        from sans.models.dispersion_models import ArrayDispersion
+        disp_th = ArrayDispersion()
+        
+        values_th = numpy.zeros(100)
+        weights   = numpy.zeros(100)
+        for i in range(100):
+            values_th[i]=(math.pi/99.0*i)
+            weights[i]=(1.0)
+    
+        disp_th.set_weights(values_th, weights)
+        
+        self.model3.set_dispersion('radius', disp_th)
+        
+        model4= self.model3.clone()
+        self.assertEqual(model4.getParam("radius"), 20)
+        
+class TestcylinderHayterM(unittest.TestCase):
+    """ 
+        Unit tests for SphereModel(Q) * HayterMSAStructure(Q)
+    """
+    def setUp(self):
+        from sans.models.CylinderModel import CylinderModel
+        from sans.models.HayterMSAStructure import HayterMSAStructure
+        from sans.models.DiamCylFunc import DiamCylFunc
+        from sans.models.MultiplicationModel import MultiplicationModel
+
+        self.model = CylinderModel()
+        self.model2 = HayterMSAStructure()
+        self.model3 = MultiplicationModel(self.model, self.model2)  
+        self.modelD = DiamCylFunc()
+
+    #Radius of model1.calculate_ER should be equal to the output/2 of DiamFunctions
+    def test_multplication_radius(self):
+        """
+            test multiplication model (check the effective radius & the output
+             of the multiplication)
+        """
+        self.model.setParam("radius", 60)
+        self.modelD.setParam("radius", 60)
+        modelDrun = self.modelD.run(0.1)/2
+        self.model2.setParam("volfraction", 0.2)
+        self.model2.setParam("effect_radius", modelDrun )
+        
+        #Compare new method with old method         
+        self.assertEqual(self.model3.run(0.1), self.model.run(0.1)*self.model2.run(0.1))
+        
+        #Compare radius from two different calculations. Note: modelD.run(0.0) is DIAMETER
+        self.assertEqual(self.model.calculate_ER(), modelDrun)
+        
+        
+    def testMultiplicationParam(self):
+        """ Test Multiplication  (check the parameters)"""
+        ## test details dictionary
+
+        ## test parameters list
+        list3= self.model3.getParamList()
+
+        for item in self.model.getParamList():
+            self.assert_(item in list3)
+        for item in self.model2.getParamList():
+            #model3 parameters should not include effect_radius*
+            if not 'effect_radius' in item:  
+                self.assert_(item in list3)
+            
+        ## test set value for parameters and get paramaters
+        self.model3.setParam("scale", 15)
+        self.assertEqual(self.model3.getParam("scale"), 15)
+        self.model3.setParam("radius", 20)
+        self.assertEqual(self.model3.getParam("radius"), 20)
+        self.model3.setParam("radius.width", 15)
+        self.assertEqual(self.model3.getParam("radius.width"), 15)
+        
+        ## Dispersity 
+        list3= self.model3.getDispParamList()
+        self.assertEqual(list3, ['radius.npts', 'radius.nsigmas', 'radius.width', 'length.npts', \
+         'length.nsigmas', 'length.width', 'cyl_theta.npts', 'cyl_theta.nsigmas', 'cyl_theta.width',\
+          'cyl_phi.npts', 'cyl_phi.nsigmas', 'cyl_phi.width'])
+        
+        from sans.models.dispersion_models import ArrayDispersion
+        disp_th = ArrayDispersion()
+        
+        values_th = numpy.zeros(100)
+        weights   = numpy.zeros(100)
+        for i in range(100):
+            values_th[i]=(math.pi/99.0*i)
+            weights[i]=(1.0)
+    
+        disp_th.set_weights(values_th, weights)
+        
+        self.model3.set_dispersion('radius', disp_th)        
+
+        model4= self.model3.clone()
+        self.assertEqual(model4.getParam("radius"), 20)        
+        
         
 if __name__ == '__main__':
