Tutorials#

This section contains a series of tutorial notebooks which go through some of the key features of the S2FFT package.

At a high-level the S2FFT package is structured such that the two primary transforms, the Wigner and spherical harmonic transforms, can easily be accessed.

Core usage 🚀#

To import and use S2FFT is as simple follows:

For a signal on the sphere

import s2fft

# Specify sampled signal and harmonic bandlimit
f = ...
L = ...

# Compute harmonic coefficients
flm = s2fft.forward(f, L, method="jax")

# Map back to pixel-space signal
f = s2fft.inverse(flm, L, method="jax")

For a signal on the rotation group

import s2fft

# Define sampled signal, harmonic & azimuthal bandlimits
f = ...
L, N = ...

# Compute Wigner coefficients
flmn = s2fft.wigner.forward(f, L, N, method="jax")

# Map back to pixel-space signal
f = s2fft.wigner.inverse(flmn, L, N, method="jax")

Tutorial notebooks#

Below are a few short tutorials that cover how to use specific features of S2FFT.

We also have a notebook demonstrating how to use CUDA-accelerated HEALPix spherical harmonic transforms in S2FFT, which is accessible in notebook format here, or alternatively can be opened in Google Colab.

Rotate a signal

Rotate a signal

Torch frontend guide

Torch frontend guide

Spherical harmonic transform

Spherical harmonic transform

JAX SSHT frontend

JAX SSHT frontend

Wigner transform

Wigner transform

JAX HEALPix Frontend

JAX HEALPix Frontend

Gallery generated by Sphinx-Gallery