Changeset 495809d in sasview for park_integration
- Timestamp:
- May 27, 2008 12:00:12 PM (17 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:
- b11d175
- Parents:
- 197ea24
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
park_integration/test/testfitting.py
rf24b8f4 r495809d 72 72 Fit.set_data(data1,1) 73 73 Fit.set_model(model,1) 74 self.assertEqual(Fit.fit_engine("scipy"),True) 74 75 chisqr, out, cov=Fit.fit({'A':2,'B':1},None,None) 75 76 #print"fit only one data",chisqr, out, cov 76 77 #Testing results 77 self.assertEqual(Fit.fit_engine("scipy"),True)78 78 79 self.assert_(math.fabs(out[1]-2.5)/math.sqrt(cov[1][1]) < 2) 79 80 self.assert_(math.fabs(out[0]-4.0)/math.sqrt(cov[0][0]) < 2) … … 113 114 Fit.set_data(data2,2) 114 115 Fit.set_model(model,2) 115 116 self.assertEqual(Fit.fit_engine("scipy"),True) 117 self.assertEqual(Fit.fit_engine("scipys"),False) 116 118 chisqr, out, cov=Fit.fit({'A':2,'B':1},None,None) 117 119 #print"fit only one data",chisqr, out, cov 118 120 119 121 #Testing results 120 self.assertEqual(Fit.fit_engine("scipy"),True)122 121 123 self.assert_(math.fabs(out[1]-2.5)/math.sqrt(cov[1][1]) < 2) 122 124 self.assert_(math.fabs(out[0]-4.0)/math.sqrt(cov[0][0]) < 2) 123 125 self.assert_(chisqr/len(data1.x) < 2) 124 126 127
Note: See TracChangeset
for help on using the changeset viewer.