From 0ea38e320502e1a45a50d4bde3e891a10c20d49c Mon Sep 17 00:00:00 2001 From: PyxieLouStar Date: Sat, 23 Mar 2024 10:59:33 -0700 Subject: [PATCH] update correct_corr_len default --- pyuvdata/uvdata/tests/test_mwa_corr_fits.py | 19 +++++++++++++++++++ pyuvdata/uvdata/uvdata.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/pyuvdata/uvdata/tests/test_mwa_corr_fits.py b/pyuvdata/uvdata/tests/test_mwa_corr_fits.py index a98defa6db..ff2e03ef72 100644 --- a/pyuvdata/uvdata/tests/test_mwa_corr_fits.py +++ b/pyuvdata/uvdata/tests/test_mwa_corr_fits.py @@ -1234,3 +1234,22 @@ def test_bscale(tmp_path): # check mwax data uv4.read(filelist[11:13], use_future_array_shapes=True) assert "SCALEFAC" not in uv4.extra_keywords.keys() + + +@pytest.mark.filterwarnings("ignore:some coarse channel files were not submitted") +@pytest.mark.filterwarnings("ignore:Fixing auto-correlations to be be real-only") +def test_default_corrections(tmp_path): + """Test that default corrections are applied""" + # mwa_corr_fits defaults to applying corrections for cable reflections, + # digital gains, and the polyphase filter bank bandpass + uv1 = UVData() + uv2 = UVData() + uv1.read(filelist[0:2], use_future_array_shapes=True) + uv1.read(filelist[11:13], use_future_array_shapes=True) + + assert "Divided out digital gains" in uv1.history + assert "Divided out digital gains" in uv2.history + assert "Divided out pfb coarse channel bandpass" in uv1.history + assert "Divided out pfb coarse channel bandpass" in uv2.history + assert "Applied cable length correction" in uv1.history + assert "Applied cable length correction" in uv2.history diff --git a/pyuvdata/uvdata/uvdata.py b/pyuvdata/uvdata/uvdata.py index 5bed99dffc..fc877bedb0 100644 --- a/pyuvdata/uvdata/uvdata.py +++ b/pyuvdata/uvdata/uvdata.py @@ -11540,7 +11540,7 @@ def read( use_aoflagger_flags=None, remove_dig_gains=True, remove_coarse_band=True, - correct_cable_len=None, + correct_cable_len=True, correct_van_vleck=False, cheby_approx=True, flag_small_auto_ants=True,