Skip to content

Updating uvcalibrate to work with flex-pol/flex-Jones objects - #1734

Open
kartographer wants to merge 2 commits into
mainfrom
uvcalibrate_flex_pol
Open

kartographer wants to merge 2 commits into
mainfrom
uvcalibrate_flex_pol

Conversation

@kartographer

Copy link
Copy Markdown
Contributor

Description

uvcalibrate has been updated to enable it to correctly work with flex-Jones UVCal and flex-pol UVData objects. To allow for this, a few underlying changes to UVCal where made: UVCal.convert_to_flex_jones was changed so that the number ordering scheme matches that of the corresponding method in UVData and UVCal._slice_array now matches values in UVCal.flex_jones_array for flex-Jones arrays.

Additionally the UVCal.__add__ method has been updated to fix a bug where flex_jones_array was not being appropriately ordered, and the UVCal.remove_flex_jones, UVCal._make_flex_jones, and UVCal.convert_to_flex_jones methods have been updated to fix an error that popped up when UVCal.total_quality_array was set.

Motivation and Context

SMA occasionally uses a split-tuning mode for observing, which is partially what gave rise to the need for flex-pol/Jones objects. Now that we are starting to play around with calibrating data within pyuvdata, I stumbled upon the fact that flex-pol objects don't actually work within uvcalibrate. This PR attempts to remedy that, updating both the underlying module (and some associated methods within UVCal) to enable it to work with flex-Jones UVCal and flex-pol UVData objects.

Along the way, I discovered (and fixed) a couple of bugs within UVCal associated with flex-Jones objects.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist:

Bug fix checklist:

  • My fix includes a new test that breaks as a result of the bug (if possible).
  • I have updated the CHANGELOG.

New feature checklist:

  • I have added or updated the docstrings associated with my feature using the numpy docstring format.
  • I have updated the tutorial to highlight my new feature (if appropriate).
  • I have added/updated tests to cover my new feature.
  • I have updated the CHANGELOG.

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (06f40c2) to head (abc8ba8).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1734   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           71        71           
  Lines        23921     23977   +56     
=========================================
+ Hits         23921     23977   +56     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants