From 0fa6d7b71955634a87d5294fc5e19d33813fe1ea Mon Sep 17 00:00:00 2001 From: Maria Pena-Guerrero Date: Thu, 18 Apr 2024 13:23:24 -0400 Subject: [PATCH] fixed silly mistake --- jwst/regtest/test_nirspec_fs_spec3.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/jwst/regtest/test_nirspec_fs_spec3.py b/jwst/regtest/test_nirspec_fs_spec3.py index 5e4d789d1d..70f8fca19d 100644 --- a/jwst/regtest/test_nirspec_fs_spec3.py +++ b/jwst/regtest/test_nirspec_fs_spec3.py @@ -52,11 +52,12 @@ def test_nirspec_fs_spec3(run_pipeline, rtdata_module, fitsdiff_default_kwargs, dmt = datamodels.open(rtdata.truth) dmr = datamodels.open(rtdata.output) if isinstance(dmt, datamodels.MultiSlitModel): - w = slit.meta.wcs - x, y = wcstools.grid_from_bounding_box(w.bounding_box, step=(1, 1), center=True) - _, _, wave = w(x, y) - wlr = dmr.slits[slit_idx].wavelength - assert np.all(np.isclose(wave, wlr, atol=tolerance)) + for slit_idx, slit in enumerate(dmt.slits): + w = slit.meta.wcs + x, y = wcstools.grid_from_bounding_box(w.bounding_box, step=(1, 1), center=True) + _, _, wave = w(x, y) + wlr = dmr.slits[slit_idx].wavelength + assert np.all(np.isclose(wave, wlr, atol=tolerance)) else: w = dmt.meta.wcs x, y = wcstools.grid_from_bounding_box(w.bounding_box, step=(1, 1), center=True)