Wigner samples#

s2fft.sampling.so3_samples.elmn2ind(el: int, m: int, n: int, L: int, N: int) int#

Convert from Wigner space 3D indexing of (,m,n) to 1D index.

Parameters:
  • el (int) – Harmonic degree .

  • m (int) – Harmonic order m.

  • n (int) – Directional order n.

  • L (int) – Harmonic band-limit.

  • N (int, optional) – Directional band-limit. Defaults to 1.

Returns:

Corresponding 1D index in Wigner space.

Return type:

int

s2fft.sampling.so3_samples.f_shape(L: int, N: int, sampling: str = 'mw', nside: int | None = None) Tuple[int, int, int]#

Computes the pixel-space sampling shape for signal on the rotation group SO(3).

Note

Importantly, the convention adopted for storage of f is [β,α,γ], for Euler angles (α,β,γ) following the zyz Euler convention, in order to simplify indexing for internal use. For a given γ we thus recover a signal on the sphere indexed by [θ,ϕ], i.e. we associate β with θ and α with ϕ.

Parameters:
  • L (int) – Harmonic band-limit.

  • N (int) – Directional band-limit.

  • sampling (str, optional) – Sampling scheme. Supported sampling schemes include {“mw”, “mwss”, “dh”, “gl”}. Defaults to “mw”.

  • nside (int, optional) – HEALPix Nside resolution parameter. Only required if sampling=”healpix”. Defaults to None.

Raises:

ValueError – Unknown sampling scheme.

Returns:

Shape of pixel-space sampling of rotation group SO(3).

Return type:

Tuple[int,int,int]

s2fft.sampling.so3_samples.flmn_1d_to_3d(flmn_1d: ndarray, L: int, N: int) ndarray#

Convert from 1D indexed Wigner coefficients to 3D indexed coefficients.

Parameters:
  • flm_1d (np.ndarray) – 1D indexed Wigner coefficients, C flatten index priority n,,m.

  • L (int) – Harmonic band-limit.

  • N (int) – Directional band-limit.

Raises:
  • ValueErrorflmn is already 3D indexed.

  • ValueErrorflmn is not 1D.

Returns:

3D indexed Wigner coefficients, index order [,m,n].

Return type:

np.ndarray

s2fft.sampling.so3_samples.flmn_3d_to_1d(flmn_3d: ndarray, L: int, N: int) ndarray#

Convert from 3D indexed Wigner coefficients to 1D indexed coefficients.

Parameters:
  • flm_3d (np.ndarray) – 3D indexed Wigner coefficients, index order [,m,n].

  • L (int) – Harmonic band-limit.

  • N (int, optional) – Directional band-limit.

Raises:
  • ValueErrorflmn is already 1D indexed.

  • ValueErrorflmn is not 3D.

Returns:

1D indexed Wigner coefficients, C flatten index priority n,,m.

Return type:

np.ndarray

s2fft.sampling.so3_samples.flmn_shape(L: int, N: int) Tuple[int, int, int]#

Computes the shape of Wigner coefficients for signal on the rotation group SO(3).

Parameters:
  • L (int) – Harmonic band-limit.

  • N (int) – Directional band-limit.

Returns:

Shape of Wigner space sampling of rotation group

SO(3).

Return type:

Tuple[int,int,int]

s2fft.sampling.so3_samples.flmn_shape_1d(L: int, N: int) int#

Computes the number of non-zero Wigner coefficients.

Parameters:
  • L (int) – Harmonic band-limit.

  • N (int) – Directional band-limit.

Returns:

Total number of non-zero Wigner coefficients.

Return type:

int

s2fft.sampling.so3_samples.fnab_shape(L: int, N: int, sampling: str = 'mw', nside: int | None = None) Tuple[int, int, int]#

Computes the shape of Wigner coefficients for signal on the rotation group SO(3).

Parameters:
  • L (int) – Harmonic band-limit.

  • N (int) – Directional band-limit.

  • sampling (str, optional) – Sampling scheme. Supported sampling schemes include {“mw”, “mwss”, “dh”, “gl”}. Defaults to “mw”.

  • nside (int, optional) – HEALPix Nside resolution parameter.

Raises:

ValueError – Unknown sampling scheme.

Returns:

Shape of Wigner space sampling of rotation group

SO(3).

Return type:

Tuple[int,int,int]