Skip to content

Add reduced Gaussian grids to the JAX transforms - #460

Draft
ASKabalan wants to merge 6 commits into
mainfrom
ASKabalan/reduced-gaussian-grid
Draft

ASKabalan wants to merge 6 commits into
mainfrom
ASKabalan/reduced-gaussian-grid

Conversation

@ASKabalan

Copy link
Copy Markdown
Collaborator

Closes #434.

Adds ECMWF's reduced Gaussian grids to the spherical and Wigner transforms (methods "jax" and "torch"):

  • sampling="octahedral": O_N for any N, with 4i + 16 points on ring i from the pole.
  • sampling="reduced_gaussian": the classic N320 grid of ERA5, with the ring lengths of Atlas (Apache-2.0 notice kept).
  • n_gauss gives N, the number of rings between a pole and the equator.

The 2N rings lie at the Gauss–Legendre latitudes, and ring t holds the orders |m| ≤ m_max[t] of the ectrans cut-off. The transforms agree with ectrans 1.6.0 to a relative 1.6e-13 on O8–O160 and on N320 at L = 320, 426 and 640. They are exact when every ring keeps the orders up to L − 1 and 2N ≥ L. The six touched test files pass on CPU (3,817 tests).

Interface changes:

  • use_healpix_custom_primitive becomes use_cuda_custom_primitive in forward_jax and inverse_jax. With the flag, the reduced grids raise NotImplementedError until a CUDA ring FFT exists.
  • "numpy" and "jax_ssht" raise ValueError on the reduced grids.

TODO:

@codecov

codecov Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.07%. Comparing base (22692a7) to head (b2bb719).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #460      +/-   ##
==========================================
+ Coverage   96.98%   97.07%   +0.09%     
==========================================
  Files          36       37       +1     
  Lines        3577     3693     +116     
==========================================
+ Hits         3469     3585     +116     
  Misses        108      108              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

Support additional reduced grids (sampling schemes)

1 participant