From fa12561de3522d29de6633723a65de1e3804df3e Mon Sep 17 00:00:00 2001 From: radonnachie Date: Wed, 4 Dec 2024 09:06:54 +0200 Subject: [PATCH] + tests uvh5 sidereal addition #1506 --- tests/uvdata/test_uvh5.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/uvdata/test_uvh5.py b/tests/uvdata/test_uvh5.py index d408de6f9..d05c7a9a1 100644 --- a/tests/uvdata/test_uvh5.py +++ b/tests/uvdata/test_uvh5.py @@ -414,6 +414,27 @@ def test_uvh5_compression_options(casa_uvfits, tmp_path): return +@pytest.mark.filterwarnings("ignore:The uvw_array does not match the expected values") +def test_uvh5_addition(casa_uvfits, tmp_path): + testfile = os.path.join(tmp_path, "uv_test_addition.uvh5") + + casa_uvfits.phase( + lon=casa_uvfits.phase_center_catalog[0]["cat_lon"], + lat=casa_uvfits.phase_center_catalog[0]["cat_lat"], + phase_frame="icrs", + cat_type="sidereal", + cat_name=casa_uvfits.phase_center_catalog[0]["cat_name"], + ) + casa_uvfits.write_uvh5(testfile, clobber=True) + uv = UVData() + uv.read(testfile) + uv + uv.copy() + + os.remove(testfile) + + return + + @pytest.mark.filterwarnings("ignore:The uvw_array does not match the expected values") def test_uvh5_read_multiple_files(casa_uvfits, tmp_path): """