Changeset 26e4a24 in sasview for sansmodels/src/sans/models/test/utest_dispersity.py
- Timestamp:
- Aug 7, 2009 11:24:39 AM (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:
- ecc58e72
- Parents:
- 58c6ba6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/test/utest_dispersity.py
reba9885 r26e4a24 57 57 58 58 new_model = self.model.clone() 59 print "gaussian",self.model.run(0.001)60 59 self.assertAlmostEqual(new_model.run(0.001), 4723.32213339, 3) 61 60 self.assertAlmostEqual(new_model.runXY([0.001,0.001]), 4743.56, 2) 62 63 def test_schulz_zero(self):64 from sans.models.dispersion_models import SchulzDispersion65 disp = SchulzDispersion()66 self.model.set_dispersion('radius', disp)67 self.model.dispersion['radius']['width'] = 5.068 #self.model.dispersion['radius']['width'] = 0.069 self.model.dispersion['radius']['npts'] = 10070 #self.model.setParam('scale', 1.0)71 self.model.setParam('scale', 10.0)72 print "schulz",self.model.run(0.001), self.model.dispersion73 self.assertAlmostEqual(self.model.run(0.001), 450.355, 3)74 self.assertAlmostEqual(self.model.runXY([0.001,0.001]), 452.299, 3)75 76 def test_lognormal_zero(self):77 from sans.models.dispersion_models import LogNormalDispersion78 disp = LogNormalDispersion()79 self.model.set_dispersion('radius', disp)80 self.model.dispersion['radius']['width'] = 5.081 #self.model.dispersion['radius']['width'] = 0.082 self.model.dispersion['radius']['npts'] = 10083 #self.model.setParam('scale', 1.0)84 self.model.setParam('scale', 10.0)85 print "model dispersion",self.model.dispersion86 print "lognormal",self.model.run(0.001)87 self.assertAlmostEqual(self.model.run(0.001), 450.355, 3)88 self.assertAlmostEqual(self.model.runXY([0.001,0.001]), 452.299, 3)89 61 90 62 def test_gaussian_zero(self):
Note: See TracChangeset
for help on using the changeset viewer.