Skip to content

Commit

Permalink
update correct_corr_len default
Browse files Browse the repository at this point in the history
  • Loading branch information
PyxieLouStar committed Mar 23, 2024
1 parent e59eb84 commit 0ea38e3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions pyuvdata/uvdata/tests/test_mwa_corr_fits.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion pyuvdata/uvdata/uvdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0ea38e3

Please sign in to comment.