pyuvdata
pyuvdata copied to clipboard
Add select on read for MWA correlator FITS files
Description
Add support for select on read to MWA correlator FITS files to save memory and time. This adds support for most but not all select keywords. The implementation is a bit complicated because of the structure of MWA correlator FITS files, which is also different between the files written by the legacy correlator and MWAX.
Edit: we have benchmarking now and the benchmarks didn't slow down significantly ~I am a bit concerned that some of these changes may have slowed down the reading when not selecting on read. I think this needs to be tested/profiled more, would love some help on that front.~
I also refactored some selection code for the baseline-time axis and the frequency axis into functions for better code reuse, leading to changes in UVData.select and UVCal.select. And I improved the way the history string is built up.
Motivation and Context
closes #1386
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] 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.
New feature checklist:
- [x] I have added or updated the docstrings associated with my feature using the numpy docstring format.
- [x] I have updated the tutorial to highlight my new feature (if appropriate).
- [x] I have added tests to cover my new feature.
- [x] All new and existing tests pass.
- [x] I have updated the CHANGELOG.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.93%. Comparing base (
05ee100) to head (f41752c). Report is 93 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1458 +/- ##
==========================================
- Coverage 99.93% 99.93% -0.01%
==========================================
Files 62 63 +1
Lines 21756 21748 -8
==========================================
- Hits 21741 21733 -8
Misses 15 15
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.