Skip to content

Commit 4494166

Browse files
committed
Update tutorials index page to be consistent with README
1 parent dc64267 commit 4494166

File tree

1 file changed

+21
-36
lines changed

1 file changed

+21
-36
lines changed

docs/tutorials/index.rst

Lines changed: 21 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,42 @@
11
:html_theme.sidebar_secondary.remove:
22

3-
**************************
4-
Notebooks
5-
**************************
6-
A series of tutorial notebooks which go through the absolute base level application of
7-
``S2FFT`` apis. Post alpha release we will add examples for more involved applications,
8-
in the time being feel free to contact contributors for advice! At a high-level the
9-
``S2FFT`` package is structured such that the 2 primary transforms, the Wigner and
10-
spherical harmonic transforms, can easily be accessed.
3+
*****************************
4+
Tutorials
5+
*****************************
6+
7+
This section contains a series of tutorial notebooks which go through some of the
8+
key features of the ``S2FFT`` package.
9+
10+
At a high-level the ``S2FFT`` package is structured such that the two primary transforms,
11+
the Wigner and spherical harmonic transforms, can easily be accessed.
1112

1213
Core usage |:rocket:|
13-
-----------------
14-
To import and use ``S2FFT`` is as simple follows:
14+
-----------------------------
15+
16+
To import and use ``S2FFT`` is as simple follows:
1517

1618
+-------------------------------------------------------+------------------------------------------------------------+
1719
|For a signal on the sphere |For a signal on the rotation group |
1820
| | |
1921
|.. code-block:: Python |.. code-block:: Python |
2022
| | |
23+
| import s2fft | import s2fft |
24+
| | |
25+
| # Specify sampled signal and harmonic bandlimit | # Define sampled signal, harmonic & azimuthal bandlimits |
26+
| f = ... | f = ... |
27+
| L = ... | L, N = ... |
28+
| | |
2129
| # Compute harmonic coefficients | # Compute Wigner coefficients |
22-
| flm = s2fft.forward_jax(f, L) | flmn = s2fft.wigner.forward_jax(f, L, N) |
30+
| flm = s2fft.forward(f, L, method="jax") | flmn = s2fft.wigner.forward(f, L, N, method="jax") |
2331
| | |
2432
| # Map back to pixel-space signal | # Map back to pixel-space signal |
25-
| f = s2fft.inverse_jax(flm, L) | f = s2fft.wigner.inverse_jax(flmn, L, N) |
33+
| f = s2fft.inverse(flm, L, method="jax") | f = s2fft.wigner.inverse(flmn, L, N, method="jax") |
2634
+-------------------------------------------------------+------------------------------------------------------------+
2735

28-
C/C++ backend usage |:bulb:|
29-
-----------------
30-
``S2FFT`` also provides JAX support for existing C/C++ packages, specifically `HEALPix <https://healpix.jpl.nasa.gov>`_
31-
and `SSHT <https://github.com/astro-informatics/ssht>`_. This works
32-
by wrapping python bindings with custom JAX frontends. Note that currently this C/C++ to JAX interoperability is currently
33-
limited to CPU, however for many applications this is desirable due to memory constraints.
34-
35-
For example, one may call these alternate backends for the spherical harmonic transform by:
36-
37-
.. code-block:: python
38-
39-
# Forward SSHT spherical harmonic transform
40-
flm = s2fft.forward(f, L, sampling=["mw"], method="jax_ssht")
41-
42-
# Forward HEALPix spherical harmonic transform
43-
flm = s2fft.forward(f, L, nside=nside, sampling="healpix", method="jax_healpy")
44-
45-
All of these JAX frontends supports out of the box reverse mode automatic differentiation,
46-
and under the hood is simply linking to the C/C++ packages you are familiar with. In this
47-
way ``S2FFT`` enhances existing packages with gradient functionality for modern signal processing
48-
applications!
49-
50-
5136
.. toctree::
5237
:hidden:
5338
:maxdepth: 3
54-
:caption: Jupyter Notebooks
39+
:caption: Tutorials
5540

5641
spherical_harmonic/spherical_harmonic_transform.nblink
5742
wigner/wigner_transform.nblink

0 commit comments

Comments
 (0)