Skip to content

Commit

Permalink
Fix for custom wcs test
Browse files Browse the repository at this point in the history
  • Loading branch information
melanieclarke committed Dec 19, 2024
1 parent 046a030 commit 5f4367b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions jwst/resample/tests/test_resample_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,9 +831,9 @@ def test_resample_undefined_variance(nircam_rate, shape):

@pytest.mark.parametrize('ratio', [0.7, 1.2])
@pytest.mark.parametrize('rotation', [0, 15, 135])
@pytest.mark.parametrize('crpix', [(100, 101), (101, 101)])
@pytest.mark.parametrize('crval', [(22.01, 12), (22.15, 12.01)])
@pytest.mark.parametrize('shape', [(10205, 10100)])
@pytest.mark.parametrize('crpix', [(600, 550), (601, 551)])
@pytest.mark.parametrize('crval', [(22.04, 11.98), (22.041, 11.981)])
@pytest.mark.parametrize('shape', [(1205, 1100)])
def test_custom_wcs_resample_imaging(nircam_rate, ratio, rotation, crpix, crval, shape):
im = AssignWcsStep.call(nircam_rate, sip_approx=False)
im.data += 5
Expand All @@ -848,6 +848,9 @@ def test_custom_wcs_resample_imaging(nircam_rate, ratio, rotation, crpix, crval,

t = result.meta.wcs.forward_transform

# make sure results are nontrivial
assert not np.all(np.isnan(result.data))

# test rotation
pc = t['pc_rotation_matrix'].matrix.value
orientation = np.rad2deg(np.arctan2(pc[0, 1], pc[1, 1]))
Expand Down

0 comments on commit 5f4367b

Please sign in to comment.