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
to 1D index.- Parameters:
el (int) – Harmonic degree
.m (int) – Harmonic order
.n (int) – Directional order
.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
.Note
Importantly, the convention adopted for storage of f is
, for Euler angles following the 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
.- 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
.L (int) – Harmonic band-limit.
N (int) – Directional band-limit.
- Raises:
ValueError – flmn is already 3D indexed.
ValueError – flmn is not 1D.
- Returns:
3D indexed Wigner coefficients, index order
.- 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
.L (int) – Harmonic band-limit.
N (int, optional) – Directional band-limit.
- Raises:
ValueError – flmn is already 1D indexed.
ValueError – flmn is not 3D.
- Returns:
1D indexed Wigner coefficients, C flatten index priority
.- 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
.- Parameters:
L (int) – Harmonic band-limit.
N (int) – Directional band-limit.
- Returns:
- Shape of Wigner space sampling of rotation group
.
- 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
.- 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
.
- Return type:
Tuple[int,int,int]