Skip to content
Snippets Groups Projects
Commit 3b2bc49c authored by WHITFIELDRE email's avatar WHITFIELDRE email
Browse files

Fix unittests for GSL2

parent b51a816a
No related merge requests found
...@@ -39,8 +39,8 @@ class NMoldyn4InterpolationTest(unittest.TestCase): ...@@ -39,8 +39,8 @@ class NMoldyn4InterpolationTest(unittest.TestCase):
self.assertNotEqual(len(inter_X), sim.getAxis(0).length()) self.assertNotEqual(len(inter_X), sim.getAxis(0).length())
self.assertEqual(inter_Q_length, osiris_Q_length) self.assertEqual(inter_Q_length, osiris_Q_length)
self.assertNotEqual(inter_Q_length, sim.getNumberHistograms()) self.assertNotEqual(inter_Q_length, sim.getNumberHistograms())
self.assertAlmostEqual(sample_Y_data[0], 0.020095312677012457, 12) self.assertAlmostEqual(sample_Y_data[0], 0.020095312, 9)
self.assertAlmostEqual(sample_Y_data[30], 1.7310334927635238, 12) self.assertAlmostEqual(sample_Y_data[30], 1.73103349, 7)
def test_X_min_too_big(self): def test_X_min_too_big(self):
x_data = np.arange(-0.5, 2., 0.05) x_data = np.arange(-0.5, 2., 0.05)
......
...@@ -1031,7 +1031,7 @@ class CrystalFieldFitTest(unittest.TestCase): ...@@ -1031,7 +1031,7 @@ class CrystalFieldFitTest(unittest.TestCase):
self.assertAlmostEqual(cf.peaks.param[0]['FWHM'], 1.0112, 4) self.assertAlmostEqual(cf.peaks.param[0]['FWHM'], 1.0112, 4)
self.assertAlmostEqual(cf.peaks.param[1]['FWHM'], 1.5811, 4) self.assertAlmostEqual(cf.peaks.param[1]['FWHM'], 1.5811, 4)
self.assertAlmostEqual(cf.peaks.param[2]['FWHM'], 1.7947, 4) self.assertAlmostEqual(cf.peaks.param[2]['FWHM'], 1.794, 2)
def test_resolution_single_spectrum_fit_variation(self): def test_resolution_single_spectrum_fit_variation(self):
from CrystalField import CrystalField, CrystalFieldFit from CrystalField import CrystalField, CrystalFieldFit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment