Fix bug where the real part of the xy autos wasn't corrected
Description
Fix a bug @d3v-null noticed in the MWA correlator FITS file reader.
Motivation and Context
Types of changes
- [x] 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:
- [x] I have read the contribution guide.
- [x] My code follows the code style of this project.
Bug fix checklist:
- [ ] My fix includes a new test that breaks as a result of the bug (if possible).
- [x] All new and existing tests pass.
- [ ] I have updated the CHANGELOG.
@PyxieLouStar can you look at this and make sure it's right?
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
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.
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?
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.93%. Comparing base (
1297c87) to head (ea18751). Report is 101 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1491 +/- ##
=======================================
Coverage 99.93% 99.93%
=======================================
Files 63 63
Lines 21807 21808 +1
=======================================
+ Hits 21792 21793 +1
Misses 15 15
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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.
@PyxieLouStar I added the comments, can you take a look when you have a chance?
Looks great!