s2ball is currently in an open alpha, please provide feedback on GitHub

Wigner-Laguerre#

s2ball.transform.wigner_laguerre.forward(f: ndarray, L: int, N: int, P: int, tau: float = 1.0, matrices: ndarray | None = None, method: str = 'jax', save_dir: str = '.matrices', adjoint: bool = False) ndarray#

Compute the forward Wigner-Laguerre transform.

This transform trivially supports batching.

Parameters:
  • f (np.ndarray) – Signal on the ball, with shape [P, 2N-1, L, 2L-1].

  • L (int) – Harmonic band-limit.

  • N (int) – Directional band-limit. Must be < L.

  • P (int) – Radial band-limit.

  • tau (float, optional) – Laguerre polynomial scale factor. Defaults to 1.0.

  • matrices (np.ndarray, optional) – List of matrices corresponding to all necessary precomputed values. Defaults to None.

  • method (str, optional) – Evaluation method in {“numpy”, “jax”}. Defaults to “jax”.

  • spin (int, optional) – _description_. Defaults to 0.

  • save_dir (str, optional) – Directory in which to save precomputed matrices. Defaults to “.matrices”.

  • adjoint (bool, optional) – Whether to return adjoint transformation. Defaults to False.

Raises:

ValueError – Method not in {“numpy”, “jax”}.

Returns:

Wigner-Laguerre coefficients with shape [P, 2N-1, L, 2L-1].

Return type:

np.ndarray

Note

Currently only Price & McEwen sampling on \(SO(3) \times \mathbb{R}^+\) is supported, though this approach can be extended to alternate sampling schemes, e.g. HEALPix+.

s2ball.transform.wigner_laguerre.forward_transform(f: ndarray, matrices: ndarray, L: int, N: int, shift: int = 0) ndarray#

Compute the forward Wigner-Laguerre transform with Numpy.

This transform trivially supports batching.

Parameters:
  • f (np.ndarray) – Signal on the ball, with shape [P, 2N-1, L, 2L-1].

  • matrices (np.ndarray) – List of matrices corresponding to all necessary precomputed values.

  • L (int) – Harmonic band-limit.

  • N (int) – Directional band-limit. Must be < L.

  • shift (int, optional) – Used internally to handle adjoint transforms.

Returns:

Wigner-Laguerre coefficients with shape [P, 2N-1, L, 2L-1].

Return type:

np.ndarray

Note

Currently only Price & McEwen sampling on \(SO(3) \times \mathbb{R}^+\) is supported, though this approach can be extended to alternate sampling schemes, e.g. HEALPix+.

s2ball.transform.wigner_laguerre.forward_transform_jax(f: Array, matrices: Array, L: int, N: int, shift: int = 0) Array#

Compute the forward Wigner-Laguerre transform with JAX and JIT.

This transform trivially supports batching.

Parameters:
  • f (jnp.ndarray) – Signal on the ball, with shape [P, 2N-1, L, 2L-1].

  • matrices (np.ndarray) – List of matrices corresponding to all necessary precomputed values.

  • L (int) – Harmonic band-limit.

  • N (int) – Directional band-limit. Must be < L.

  • shift (int, optional) – Used internally to handle adjoint transforms.

Returns:

Wigner-Laguerre coefficients with shape [P, 2N-1, L, 2L-1].

Return type:

jnp.ndarray

Note

Currently only Price & McEwen sampling on \(SO(3) \times \mathbb{R}^+\) is supported, though this approach can be extended to alternate sampling schemes, e.g. HEALPix+.

s2ball.transform.wigner_laguerre.inverse(flmnp: ndarray, L: int, N: int, P: int, tau: float = 1.0, matrices: ndarray | None = None, method: str = 'jax', save_dir: str = '.matrices', adjoint: bool = False) ndarray#

Compute the inverse Wigner-Laguerre transform.

This transform trivially supports batching.

Parameters:
  • flmnp (np.ndarray) – Wigner-Laguerre coefficients with shape [P, 2N-1, L, 2L-1].

  • L (int) – Harmonic band-limit.

  • N (int) – Directional band-limit. Must be < L.

  • P (int) – Radial band-limit.

  • tau (float, optional) – Laguerre polynomial scale factor. Defaults to 1.0.

  • matrices (np.ndarray, optional) – List of matrices corresponding to all necessary precomputed values. Defaults to None.

  • method (str, optional) – Evaluation method in {“numpy”, “jax”}. Defaults to “jax”.

  • spin (int, optional) – _description_. Defaults to 0.

  • save_dir (str, optional) – Directory in which to save precomputed matrices. Defaults to “.matrices”.

  • adjoint (bool, optional) – Whether to return adjoint transformation. Defaults to False.

Raises:

ValueError – Method not in {“numpy”, “jax”}.

Returns:

Signal on the ball, with shape [P, 2N-1, L, 2L-1].

Return type:

np.ndarray

Note

Currently only Price & McEwen sampling on \(SO(3) \times \mathbb{R}^+\) is supported, though this approach can be extended to alternate sampling schemes, e.g. HEALPix+.

s2ball.transform.wigner_laguerre.inverse_transform(flmnp: ndarray, matrices: ndarray, L: int, shift: int = 0) ndarray#

Compute the inverse Wigner-Laguerre transform with Numpy.

This transform trivially supports batching.

Parameters:
  • flmnp (np.ndarray) – Wigner-Laguerre coefficients with shape [P, 2N-1, L, 2L-1].

  • matrices (np.ndarray) – List of matrices corresponding to all necessary precomputed values.

  • L (int) – Harmonic band-limit.

  • shift (int, optional) – Used internally to handle adjoint transforms.

Returns:

Signal on the ball, with shape [P, 2N-1, L, 2L-1].

Return type:

np.ndarray

Note

Currently only Price & McEwen sampling on \(SO(3) \times \mathbb{R}^+\) is supported, though this approach can be extended to alternate sampling schemes, e.g. HEALPix+.

s2ball.transform.wigner_laguerre.inverse_transform_jax(flmnp: Array, matrices: Array, L: int, shift: int = 0) Array#

Compute the inverse Wigner-Laguerre transform with JAX and JIT.

This transform trivially supports batching.

Parameters:
  • flmnp (jnp.ndarray) – Wigner-Laguerre coefficients with shape [P, 2N-1, L, 2L-1].

  • matrices (np.ndarray) – List of matrices corresponding to all necessary precomputed values.

  • L (int) – Harmonic band-limit.

  • shift (int, optional) – Used internally to handle adjoint transforms.

Returns:

Signal on the ball, with shape [P, 2N-1, L, 2L-1].

Return type:

jnp.ndarray

Note

Currently only Price & McEwen sampling on \(SO(3) \times \mathbb{R}^+\) is supported, though this approach can be extended to alternate sampling schemes, e.g. HEALPix+.