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 build_fringe_rate_profiles bug when number of pols = 1 #903

Merged
merged 2 commits into from
Jun 27, 2023

Conversation

jsdillon
Copy link
Member

This PR fixes a small bug where .squeeze(), which is designed to eliminate extraneous dimensions in pyuvdata objects, can also squeeze out dimensions in the flag_array when the number of polarizations is 1. This PR prevents that by first doing a np.all over the polarization axis, as was intended, then squeezing (which does nothing when future_array_shapes == True).

This PR also fixes a bunch of pep8 stuff.

@jsdillon
Copy link
Member Author

@aewallwi Not asking you for a review (I know you're busy!) but I thought I'd just flag this for you in case you were curious or if it impacted H4C analysis (I doubt it).

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.06 ⚠️

Comparison is base (c7fdf56) 97.20% compared to head (d86b043) 97.15%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #903      +/-   ##
==========================================
- Coverage   97.20%   97.15%   -0.06%     
==========================================
  Files          21       23       +2     
  Lines        9455    10262     +807     
==========================================
+ Hits         9191     9970     +779     
- Misses        264      292      +28     
Impacted Files Coverage Δ
hera_cal/frf.py 97.50% <100.00%> (ø)

... and 13 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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.

Seems like a pretty straightforward fix, approved. Thanks @jsdillon!

@jsdillon jsdillon merged commit d174d3f into main Jun 27, 2023
3 of 8 checks passed
@jsdillon jsdillon deleted the frf-bug-fix branch June 27, 2023 21:50
@aewallwi
Copy link
Collaborator

Thanks for keeping me in the loop @jsdillon! This all looks good :)

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