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 bug where the real part of the xy autos wasn't corrected #1491

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bhazelton
Copy link
Member

Description

Fix a bug @d3v-null noticed in the MWA correlator FITS file reader.

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation change (documentation changes only)
  • Version change
  • Build or continuous integration change

Checklist:

Bug fix checklist:

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

@bhazelton
Copy link
Member Author

@PyxieLouStar can you look at this and make sure it's right?

@d3v-null
Copy link

I think we determined that it looks like xy aren't being corrected when you read the code, but in fact they are. It's more of a code clarity issue

@PyxieLouStar
Copy link
Contributor

This looks good! Though as @d3v-null says, the code is actually functioning properly. When cheby_approx=False, most of the values are not corrected in-place due to array reshaping. However, the yx autos end up being corrected in-place, so the data_array assignment is redundant in this case.

@bhazelton
Copy link
Member Author

ok. I think we should either do this fix or add a comment so that a future reader isn't confused. What would you prefer?

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.93%. Comparing base (54412ae) to head (2979c4c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1491   +/-   ##
=======================================
  Coverage   99.93%   99.93%           
=======================================
  Files          63       63           
  Lines       21750    21751    +1     
=======================================
+ Hits        21735    21736    +1     
  Misses         15       15           

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

@PyxieLouStar
Copy link
Contributor

I think my preference would be to add the fix and also add a comment noting something like: these autos are corrected in-place and the data_array assignment is there in case the in-place correction changes/stops working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants