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

maint: update API to conform to new pyuvdata conventions. #99

Merged
merged 7 commits into from
Nov 22, 2024

Conversation

steven-murray
Copy link
Contributor

@steven-murray steven-murray commented Nov 8, 2024

Description

This updates several internal APIs to use the new AnalyticBeam and BeamInterface objects that came with pyuvdata 3.1.0.

The user-facing API should be essentially unchanged, except that it is now allowed to pass BeamInterface objects in the beams parameter of simulate() and simulate_vis().

EDIT: there is one API breaking change to prepare_unpolarized_beam. The parameter use_pol has changed to use_feed, which is more general. This function is not really considered a core part of the API, so updating it should be fine.

Checklist

I have

  • Added a test covering your new feature adequately?
  • Added a docstring (or note to a docstring) describing your feature?
  • (Optional): Added a tutorial / section to a tutorial showing usage of your new feature?
  • Important: this feature does not break API compatibility.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@steven-murray
Copy link
Contributor Author

@bhazelton I've tagged you on review in case you want to see some of these updates in action. These tests will not pass until the PR RadioAstronomySoftwareGroup/pyuvdata#1496 is merged though.

Copy link
Contributor

@tyler-a-cox tyler-a-cox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, that this took me so long to get to! All of these changes look reasonable to me! Thanks for the edits, @steven-murray

@tyler-a-cox
Copy link
Contributor

Just realized that the tests are failing because the beam updates from pyuvdata aren't being used here. Should we update setup.cfg to install pyuvdata from main?

@steven-murray
Copy link
Contributor Author

@tyler-a-cox I think it's easier if we just wait til the next version comes out.

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.00%. Comparing base (5c7dc96) to head (9717524).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #99      +/-   ##
==========================================
+ Coverage   97.85%   98.00%   +0.14%     
==========================================
  Files          21       22       +1     
  Lines         838      900      +62     
  Branches       93       94       +1     
==========================================
+ Hits          820      882      +62     
  Misses          9        9              
  Partials        9        9              
Flag Coverage Δ
unittests 97.44% <100.00%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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


🚨 Try these New Features:

setup.cfg Outdated Show resolved Hide resolved
src/matvis/core/beams.py Outdated Show resolved Hide resolved
@steven-murray steven-murray merged commit b7fb290 into main Nov 22, 2024
13 checks passed
@steven-murray steven-murray deleted the fix-analytic-beam branch November 22, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants