Add ability to simulate visibilities used a user-supplied beam basis and basis coefficients#66
Draft
tyler-a-cox wants to merge 7 commits into
Draft
Add ability to simulate visibilities used a user-supplied beam basis and basis coefficients#66tyler-a-cox wants to merge 7 commits into
tyler-a-cox wants to merge 7 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #66 +/- ##
==========================================
- Coverage 95.22% 87.40% -7.83%
==========================================
Files 18 19 +1
Lines 566 635 +69
Branches 86 97 +11
==========================================
+ Hits 539 555 +16
- Misses 17 66 +49
- Partials 10 14 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR builds on the per-antenna beam simulation functionality introduced in #63.
Currently, the scaling of fftvis with the number of unique beams is computationally expensive, scaling between ~N_beams and N_beams^2. This creates a performance bottleneck when running simulations with large arrays of unique beams.
This PR introduces the option to simulate visibilities using a reduced basis formed from a stack of unique beams. Assuming the beams used for simulation are largely similar to one another, we can form a basis using the SVD/PCA of the beam stack to reduce the effective number of unique beams passed to fftvis. This reduces the number of required NUFFTs and beam interpolation from ~N_beams^2 down to N_eigenbeams^2.
Here, we introduce a new function, which accepts a list UVBeam objects and returns a list of "eigenbeams" (also stored as UVBeam objects) and beam coefficients (of size
(nants, ncoefs, nfreqs)) that map the eigenbeams to the input UVBeam objects. These beams/coefficients can then be passed tofftvis.simulate_visvia the beam parameter and the neweigenbeam_coefsparameter to produce visibilities with per-antenna beams.