Skip to content

Commit

Permalink
Increase tolerance to compare fit values
Browse files Browse the repository at this point in the history
  • Loading branch information
eneights committed Oct 24, 2024
1 parent c6c3ccd commit 715df97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/polarization/test_polarization_asad.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_convolve_spectrum():

assert polarization._expectation.unit.is_equivalent('keV')

assert np.allclose(polarization._expectation.project('Em').contents[0], 7657.331992884072)
assert np.allclose(polarization._expectation.project('Em').contents[0], 7657.331992884072, atol=5.0)

assert np.allclose([polarization._azimuthal_angle_bins[5].rad, polarization._azimuthal_angle_bins[12].rad,
polarization._azimuthal_angle_bins[25].rad, polarization._azimuthal_angle_bins[40].rad],
Expand Down Expand Up @@ -152,7 +152,7 @@ def test_polarization_fit():
mu_100 = polarization.calculate_mu100(asad_polarized, asad_unpolarized)

assert np.allclose([mu_100['mu'], mu_100['uncertainty']],
[0.02068036893603115, 9.3940548992881e-07])
[0.02068036893603115, 9.3940548992881e-07], atol=[0.01, 1e-7])

asad_corrected = polarization.correct_asad(asad, asad_unpolarized)

Expand All @@ -167,4 +167,4 @@ def test_polarization_fit():

assert np.allclose([polarization_fit['fraction'], polarization_fit['fraction uncertainty'],
polarization_fit['angle'].angle.rad, polarization_fit['angle uncertainty'].rad],
[15.270059610935844, 2.3931615504423474, 1.53994098472832, 0.07217196641713962])
[15.270059610935844, 2.3931615504423474, 1.53994098472832, 0.07217196641713962], atol=[1.0, 0.5, 1.0, 0.1])

0 comments on commit 715df97

Please sign in to comment.