Generation#

s2scat.generation.build_encoder(L: int, N: int, J_min: int = 0, reality: bool = True, recursive: bool = False, isotropic: bool = False, delta_j: int | None = None, c_backend: bool = False) Callable#

Builds a scattering covariance encoding function.

Parameters:
  • L (int) – Spherical harmonic bandlimit.

  • N (int) – Azimuthal bandlimit (directionality).

  • J_min (int, optional) – Minimum dyadic wavelet scale to consider. Defaults to 0.

  • reality (bool, optional) – Whether \(f \in \mathbb{R}\), if True exploits hermitian symmetry of harmonic coefficients. Defaults to True.

  • recursive (bool, optional) – Whether to perform a memory efficient recursive transform, or a faster but less memory efficient fully precompute transform. Defaults to False.

  • isotropic (bool, optional) – Whether to return isotropic coefficients, i.e. average over directionality. Defaults to False.

  • delta_j (int, optional) – Range of wavelet scales over which to compute covariances. If None, covariances between all scales will be considered. Defaults to None.

  • c_backend (bool, optional) – Whether to pick up and use the C backend functionality. Defaults to False.

Returns:

Latent encoder which takes arguements

(xlm: jnp.ndarray) with index [batch, theta, phi].

Return type:

Callable

s2scat.generation.build_generator(xlm: Array, L: int, N: int, J_min: int = 0, reality: bool = True, recursive: bool = False, isotropic: bool = False, delta_j: int | None = None, c_backend: bool = False) Callable#

Builds a scattering covariance generator function.

Parameters:
  • flm (jnp.ndarray) – Spherical harmonic coefficients of target signal.

  • L (int) – Spherical harmonic bandlimit.

  • N (int) – Azimuthal bandlimit (directionality).

  • J_min (int, optional) – Minimum dyadic wavelet scale to consider. Defaults to 0.

  • reality (bool, optional) – Whether \(f \in \mathbb{R}\), if True exploits hermitian symmetry of harmonic coefficients. Defaults to True.

  • recursive (bool, optional) – Whether to perform a memory efficient recursive transform, or a faster but less memory efficient fully precompute transform. Defaults to False.

  • isotropic (bool, optional) – Whether to return isotropic coefficients, i.e. average over directionality. Defaults to False.

  • delta_j (int, optional) – Range of wavelet scales over which to compute covariances. If None, covariances between all scales will be considered. Defaults to None.

  • c_backend (bool, optional) – Whether to pick up and use the C backend functionality. Defaults to False.

Returns:

Latent decoder which takes arguements

(key: jax.random.PRNGKey, count: int, niter: int = 400, learning_rate: float = 1e-3)

Return type:

Callable