Skip to content

Commit

Permalink
Correct the test suite of table lookup distortion wcs
Browse files Browse the repository at this point in the history
  • Loading branch information
ViciousEagle03 committed Sep 1, 2024
1 parent 0919142 commit 6b24fe1
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions asdf_astropy/converters/fits/tests/test_fitswcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from astropy import wcs


def create_sip_distortion_wcs():
def create_sip_distortion_and_tabular_wcs():
rng = np.random.default_rng()
twcs = wcs.WCS(naxis=2)
twcs.wcs.crval = [251.29, 57.58]
Expand Down Expand Up @@ -52,7 +52,7 @@ def create_sip_distortion_wcs():
return (twcs, img_world_wcs)


@pytest.mark.parametrize("wcs", create_sip_distortion_wcs())
@pytest.mark.parametrize("wcs", create_sip_distortion_and_tabular_wcs())
@pytest.mark.filterwarnings("ignore::astropy.wcs.wcs.FITSFixedWarning")
@pytest.mark.filterwarnings(
"ignore:Some non-standard WCS keywords were excluded:astropy.utils.exceptions.AstropyWarning",
Expand All @@ -66,15 +66,3 @@ def test_wcs_serialization(wcs, tmp_path):
with asdf.open(file_path) as af:
loaded_wcs = af["wcs"]
assert wcs.to_header() == loaded_wcs.to_header()


@pytest.mark.xfail(reason="Tabular WCS serialization is currently not supported")
def test_tabular_wcs_serialization(tab_wcs_2di, tmp_path):
file_path = tmp_path / "test_wcs.asdf"
with asdf.AsdfFile() as af:
af["wcs"] = tab_wcs_2di
af.write_to(file_path)

with asdf.open(file_path) as af:
loaded_wcs = af["wcs"]
assert tab_wcs_2di.to_header() == loaded_wcs.to_header()

0 comments on commit 6b24fe1

Please sign in to comment.