Changeset dd0d059 in sasview for sansmodels/test
- Timestamp:
- Dec 13, 2011 12:04:30 PM (13 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:
- d9673d7a
- Parents:
- 55b045a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/test/utest_other_models.py
r55b045a rdd0d059 1109 1109 def testEval_1D(self): 1110 1110 """ Test 1D model for a HayterMSAStructure with evalDistribution""" 1111 self.assert AlmostEquals(math.fabs(self.comp.run(0.4)-self.x_array[0]), 0.001, 2)1112 self.assert AlmostEquals(math.fabs(self.comp.run(1.3)-self.x_array[1]), 0.001, 2)1111 self.assertTrue(math.fabs(self.comp.run(0.4)-self.x_array[0])<0.025, "Difference too big: %g" % math.fabs(self.comp.run(0.4)-self.x_array[0])) 1112 self.assertTrue(math.fabs(self.comp.run(1.3)-self.x_array[1])<0.025, "Difference too big: %g" % math.fabs(self.comp.run(1.3)-self.x_array[1])) 1113 1113 1114 1114 def testEval_2D(self): 1115 1115 """ Test 2D model for a HayterMSAStructure with evalDistribution""" 1116 self.assert AlmostEquals(math.fabs(self.comp.runXY([0.4, 0.5])-self.xy_matrix[0]), 0.001, 2)1117 self.assert AlmostEquals(math.fabs(self.comp.runXY([1.3,1.57])-self.xy_matrix[1]), 0.001, 2)1116 self.assertTrue(math.fabs(self.comp.runXY([0.4, 0.5])-self.xy_matrix[0])<0.05, "Difference too big: %g" % math.fabs(self.comp.runXY([0.4, 0.5])-self.xy_matrix[0])) 1117 self.assertTrue(math.fabs(self.comp.runXY([1.3,1.57])-self.xy_matrix[1])<0.05, "Difference too big: %g" % math.fabs(self.comp.runXY([1.3,1.57])-self.xy_matrix[1])) 1118 1118 1119 1119
Note: See TracChangeset
for help on using the changeset viewer.