Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix correct_cable_len default #1419

Merged
merged 3 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Fixed
- Bug in which `correct_cable_len` defaulted to `None` instead of `True`
for `read_mwa_corr_fits`.

## [2.4.3] - 2024-3-25

### Added
Expand Down
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)
uv2.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 @@ -11553,7 +11553,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
Loading