Implement an SVD-truncated or regularized version of O2GF action solver #417
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.
Describe your changes
This has been a curiosity of mine for too long, but finally decided to try implementing a test of the idea.
The main idea here starts with the O2GF action estimation method by @jlsanders. This method solves for the generating function and its derivatives that transforms from "toy" actions and angles to the "correct" action/angle values for an integrated orbit. This works by approximating the generating function as a Fourier series in the toy angles, and solves for the coefficients using a matrix solve. This is unstable when the integrated orbit is short or sparsely sampled because the design matrix can be ill-conditioned or the system underdetermined.
The demo implementation here replaces the standard linalg solve with a version that uses a low-rank approximation of A (via SVD), where the rank is set by the magnitude of the singular values. This effectively applies a low-pass filter to the Fourier modes of the generating function, which may reduce over-fitting and make the solve better conditioned.
I tried it on one orbit and it seems to work, but the performance gain over integrating an orbit for longer and using the standard method isn't huge. Specifically: orbit 1 integrated for 10 radial orbital periods with 128 steps per period, orbit 2 integrated for 4 radial orbital periods with 32 steps per period. The low-rank solve on orbit 2 was ~30% faster than the standard O2GF on orbit 1.
cc @nstarman and @jnibauer because I was mainly scoping this out as a potential addition to Galax, but now I think that standard O2GF is a first priority.
🤷
Checklist
CHANGES.rst
)