Skip to content

Commit

Permalink
Wider tolerance for skybrightness: intel vs. m2
Browse files Browse the repository at this point in the history
  • Loading branch information
rhiannonlynne committed Jun 14, 2024
1 parent 5999147 commit d691dc6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/skybrightness/test_skymodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def test_setups(self):
dummy, spec1 = sm1.return_wave_spec()
dummy, spec2 = sm2.return_wave_spec()

np.testing.assert_array_equal(spec1, spec2)
np.testing.assert_allclose(spec1, spec2, rtol=1e-13)

# Check that the degrees kwarg works
sm2.set_params(
Expand Down Expand Up @@ -192,7 +192,8 @@ def test_setups(self):

def test_mags(self):
"""
Test that the interpolated mags are similar to mags computed from interpolated spectra
Test that the interpolated mags are similar to mags computed
from interpolated spectra
"""

through_path = os.path.join(get_data_dir(), "throughputs", "baseline")
Expand All @@ -217,8 +218,10 @@ def test_mags(self):
mag2 = sm2.return_mags()

# Let's set the tolerance for matching the throughputs to be 0.001
# This allows for small changes in the filter throughputs without requiring recomputation of
# sims_skybrighntess_pre, while still requiring a reasonable match against the measured sky
# This allows for small changes in the filter throughputs
# without requiring recomputation of
# sims_skybrighntess_pre, while still requiring a
# reasonable match against the measured sky
for i, filtername in enumerate(filters):
np.testing.assert_allclose(mags1[filtername], mag2[filtername], rtol=5e-3)

Expand Down

0 comments on commit d691dc6

Please sign in to comment.