Skip to content

Commit

Permalink
remove unused code causing sonar scan violation
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed May 14, 2024
1 parent 8b254ae commit a3398b5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions jwst/wfss_contam/tests/test_observations.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,19 @@ def test_disperse_oversample_same_result(grism_wcs, segmentation_map):
wmin, wmax = np.min(sens_waves), np.max(sens_waves)
sens_resp = np.ones(100)
seg_wcs = segmentation_map.meta.wcs
0, (300, 500), 2, False,
xoffset = 2200
yoffset = 1000


xs, ys, areas, lams_out, counts_1, ID = dispersed_pixel(
x0, y0, width, height, lams, flxs, order, wmin, wmax,
sens_waves, sens_resp, seg_wcs, grism_wcs, ID, naxis,
oversample_factor=1, extrapolate_sed=False, xoffset=xoffset,
yoffset=yoffset)

xs, ys, areas, lams_out, counts_3, ID = dispersed_pixel(
x0, y0, width, height, lams, flxs, order, wmin, wmax,
sens_waves, sens_resp, seg_wcs, grism_wcs, ID, naxis,
oversample_factor=3, extrapolate_sed=False, xoffset=xoffset,
yoffset=yoffset)

assert np.isclose(np.sum(counts_1), np.sum(counts_3), rtol=1/sens_waves.size)
assert np.isclose(np.sum(counts_1), np.sum(counts_3), rtol=1/sens_waves.size)

0 comments on commit a3398b5

Please sign in to comment.