Changeset 72a05d0 in sasview for sansmodels/src
- Timestamp:
- Sep 11, 2009 6:34:51 PM (15 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:
- 80d2872
- Parents:
- 6ab0ad1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/test/utest_model_calculate_ER.py
rc1e865a r72a05d0 202 202 self.diam.setParam("radius_b",400) 203 203 self.assertAlmostEqual(self.comp.calculate_ER(), self.diam.run(0.1)/2) 204 204 205 class TestTriaxialEllipsoid(unittest.TestCase): 206 """ Unit tests for calculate_ER (TriaxialEllipsoid model) """ 207 208 def setUp(self): 209 from sans.models.TriaxialEllipsoidModel import TriaxialEllipsoidModel 210 from sans.models.DiamEllipFunc import DiamEllipFunc 211 self.comp = TriaxialEllipsoidModel() 212 self.diam = DiamEllipFunc() 213 214 def test(self): 215 """ Test 1D model for a TriaxialEllipsoid """ 216 self.comp.setParam("semi_axisA", 35) 217 self.comp.setParam("semi_axisB", 100) 218 self.comp.setParam("semi_axisC", 400) 219 r_value = math.sqrt(35*100) 220 self.diam.setParam("radius_a", 400) 221 self.diam.setParam("radius_b",r_value) 222 self.assertAlmostEqual(self.comp.calculate_ER(), self.diam.run(0.1)/2) 223 205 224 class TestLamellar(unittest.TestCase): 206 225 """ Unit tests for calculate_ER (Lamellarmodel)"""
Note: See TracChangeset
for help on using the changeset viewer.