Skip to content

Commit

Permalink
fixed silly mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
penaguerrero committed Apr 18, 2024
1 parent cce3baa commit 0fa6d7b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions jwst/regtest/test_nirspec_fs_spec3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0fa6d7b

Please sign in to comment.