Changeset 309ccaf in sasview
- Timestamp:
- Apr 13, 2009 9:50:02 AM (16 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 37f487e
- Parents:
- 42d27f2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/test/utest_modelmultiplication_cyl.py
r24276b6 r309ccaf 27 27 fixed=[] 28 28 fixed=['radius.width'] 29 """29 30 30 #Radius of two models should not be equal.. 31 31 def test_multplication_radius(self): 32 "" test multiplication model""32 "" "test multiplication model""" 33 33 from sans.models.MultiplicationModel import MultiplicationModel 34 34 from sans.models.CylinderModel import CylinderModel 35 35 from sans.models.HardsphereStructure import HardsphereStructure 36 36 model1 = CylinderModel() 37 model1.setParam("radius", 3) 37 model1.setParam("radius", 20) 38 model1.setParam("length", 400) 38 39 model2 = HardsphereStructure() 39 40 model = MultiplicationModel(model1,model2 ) 40 model.setParam("radius", 1)41 self.assertEqual(model.getParam("radius"), 1)41 model.setParam("radius", 20) 42 self.assertEqual(model.getParam("radius"), 20) 42 43 #self.assertEqual(model.model1.getParam("radius"),3) 43 44 from sans.models.DiamCylFunc import DiamCylFunc 44 45 model4= DiamCylFunc() 45 46 radius= model4.run(0.0) 46 self.assertEqual(model.model2.getParam("radius"),radius) 47 """ 47 self.assertEqual(model.model2.getParam("radius"),74.400330888433245) 48 49 def test_multplication_radius1(self): 50 "" "test multiplication model""" 51 from sans.models.MultiplicationModel import MultiplicationModel 52 from sans.models.EllipsoidModel import EllipsoidModel 53 from sans.models.HardsphereStructure import HardsphereStructure 54 model1 = EllipsoidModel() 55 model1.setParam("radius_a", 20) 56 model1.setParam("radius_b", 400) 57 model2 = HardsphereStructure() 58 model = MultiplicationModel(model1,model2 ) 59 model.setParam("radius_a", 20) 60 self.assertEqual(model.getParam("radius_a"), 20) 61 #self.assertEqual(model.model1.getParam("radius"),3) 62 from sans.models.DiamEllipFunc import DiamEllipFunc 63 model4= DiamEllipFunc() 64 radius= model4.run(0.0) 65 self.assertEqual(model.model2.getParam("radius"),270.74504487588121) 48 66 49 67 def test_multiplication(self):
Note: See TracChangeset
for help on using the changeset viewer.