Spherical-Laguerre#
- s2ball.transform.laguerre.forward(f: ndarray, L: int, P: int, tau: float = 1.0, matrices: ndarray | None = None, method: str = 'jax', spin: int = 0, save_dir: str = '.matrices', adjoint: bool = False) ndarray #
Compute the forward spherical-Laguerre transform.
This transform trivially supports batching.
- Parameters:
f (np.ndarray) – Signal on the ball, with shape [P, L, 2L-1].
L (int) – Harmonic band-limit.
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 – Deployment method not in {“numpy”, “jax”}.
- Returns:
Spherical-Laguerre coefficients with shape [P, L, 2L-1].
- Return type:
np.ndarray
Note
Currently only Leistedt & McEwen sampling on the ball is supported, though this approach can be extended to alternate sampling schemes, e.g. HEALPix+.
- s2ball.transform.laguerre.forward_transform(f: ndarray, matrices: ndarray, shift: int = 0) ndarray #
Compute the forward spherical-Laguerre transform with Numpy.
This transform trivially supports batching.
- Parameters:
f (np.ndarray) – Signal on the ball, with shape [P, L, 2L-1].
matrices (np.ndarray) – List of matrices corresponding to all necessary precomputed values.
shift (int, optional) – Used internally to handle adjoint transforms.
- Returns:
Spherical-Laguerre coefficients with shape [P, L, 2L-1].
- Return type:
np.ndarray
Note
Currently only Leistedt & McEwen sampling on the ball is supported, though this approach can be extended to alternate sampling schemes, e.g. HEALPix+.
- s2ball.transform.laguerre.forward_transform_jax(f: Array, matrices: Array, shift: int = 0) Array #
Compute the forward spherical-Laguerre transform with JAX and JIT.
This transform trivially supports batching.
- Parameters:
f (jnp.ndarray) – Signal on the ball, with shape [P, L, 2L-1].
matrices (jnp.ndarray) – List of matrices corresponding to all necessary precomputed values.
shift (int, optional) – Used internally to handle adjoint transforms.
- Returns:
Spherical-Laguerre coefficients with shape [P, L, 2L-1].
- Return type:
jnp.ndarray
Note
Currently only Leistedt & McEwen sampling on the ball is supported, though this approach can be extended to alternate sampling schemes, e.g. HEALPix+.
- s2ball.transform.laguerre.inverse(flmp: ndarray, L: int, P: int, tau: float = 1.0, matrices: ndarray | None = None, method: str = 'jax', spin: int = 0, save_dir: str = '.matrices', adjoint: bool = False) ndarray #
Compute the inverse spherical-Laguerre transform.
This transform trivially supports batching.
- Parameters:
flmp (np.ndarray) – Spherical-Laguerre coefficients with shape [P, L, 2L-1].
L (int) – Harmonic band-limit.
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, L, 2L-1].
- Return type:
np.ndarray
Note
Currently only Leistedt & McEwen sampling on the ball is supported, though this approach can be extended to alternate sampling schemes, e.g. HEALPix+.
- s2ball.transform.laguerre.inverse_transform(flmp: ndarray, matrices: ndarray, shift: int = 0) ndarray #
Compute the inverse spherical-Laguerre transform with Numpy.
This transform trivially supports batching.
- Parameters:
flmp (np.ndarray) – Spherical-Laguerre coefficients with shape [P, L, 2L-1].
matrices (np.ndarray) – List of matrices corresponding to all necessary precomputed values.
shift (int, optional) – Used internally to handle adjoint transforms.
- Returns:
Signal on the ball, with shape [P, L, 2L-1].
- Return type:
np.ndarray
Note
Currently only Leistedt & McEwen sampling on the ball is supported, though this approach can be extended to alternate sampling schemes, e.g. HEALPix+.
- s2ball.transform.laguerre.inverse_transform_jax(flmp: Array, matrices: Array, shift: int = 0) Array #
Compute the inverse spherical-Laguerre transform with JAX and JIT.
This transform trivially supports batching.
- Parameters:
flmp (jnp.ndarray) – Spherical-Laguerre coefficients with shape [P, L, 2L-1].
matrices (jnp.ndarray) – List of matrices corresponding to all necessary precomputed values.
shift (int, optional) – Used internally to handle adjoint transforms.
- Returns:
Signal on the ball, with shape [P, L, 2L-1].
- Return type:
jnp.ndarray
Note
Currently only Leistedt & McEwen sampling on the ball is supported, though this approach can be extended to alternate sampling schemes, e.g. HEALPix+.