Skip to content

Implement an SVD-truncated or regularized version of O2GF action solver #417

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

adrn
Copy link
Owner

@adrn adrn commented Apr 25, 2025

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

  • Did you add tests?
  • Did you add documentation for your changes?
  • Did you reference any relevant issues?
  • Did you add a changelog entry? (see CHANGES.rst)
  • Are the CI tests passing?
  • Is the milestone set?

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

Successfully merging this pull request may close these issues.

1 participant