Turok & Bucher#

s2fft.recursions.turok.compute_full(beta: float, el: int, L: int) → ndarray#

Compute the complete Wigner-d matrix at polar angle \(\beta\) using Turok & Bucher recursion.

The Wigner-d plane for a given \(\ell\) (el) and \(\beta\) is computed recursively over \(m, m^{\prime}\).

The Wigner-d plane \(d^\ell_{m, m^{\prime}}(\beta)\) is indexed for \(-L < m, m^{\prime} < L\) by dl[L - 1 + \(m\), L - 1 + \(m^{\prime}\)] but is only computed for the eighth of the plane \(m^{\prime} <= m < \ell, 0 <= m^{\prime} <= \ell\). Symmetry relations are used to fill in the remainder of the plane (see fill()).

Parameters:
  • beta (float) – Polar angle in radians.

  • el (int) – Harmonic degree of Wigner-d matrix.

  • L (int) – Harmonic band-limit.

Raises:

ValueError – If el is greater than L.

Returns:

Wigner-d matrix of dimension [2L-1, 2L-1].

Return type:

np.ndarray

s2fft.recursions.turok.compute_quarter(dl: ndarray, beta: float, ell: int, L: int) → ndarray#

Compute the left quarter triangle of the Wigner-d matrix via Turok & Bucher recursion.

Parameters:
  • dl (np.ndarray) – Wigner-d matrix slice to populate (shape: 2L-1, 2L-1).

  • beta (float) – Polar angle in radians.

  • ell (int) – Harmonic degree of Wigner-d matrix.

  • L (int) – Harmonic band-limit.

Returns:

Wigner-d matrix of dimension [2L-1, 2L-1] with left quarter triangle populated.

Return type:

np.ndarray

s2fft.recursions.turok.compute_quarter_slice(dl: ndarray, beta: float, el: int, L: int, mm: int, positive_m_only: bool = False) → ndarray#

Compute a single slice at \(m^{\prime}\) of the Wigner-d matrix evaluated at \(\beta\).

Parameters:
  • dl (np.ndarray) – Wigner-d matrix slice to populate (shape: 2L-1).

  • beta (float) – Polar angle in radians.

  • l (int) – Harmonic degree of Wigner-d matrix.

  • L (int) – Harmonic band-limit.

  • mm (int) – Harmonic order at which to slice the matrix.

  • positive_m_only (bool, optional) – Compute Wigner-d matrix for slice at m greater than zero only. Defaults to False.

Returns:

Wigner-d matrix slice of dimension [2L-1] populated only on the mm slice.

Return type:

np.ndarray

s2fft.recursions.turok.compute_slice(beta: float, el: int, L: int, mm: int, positive_m_only: bool = False) → ndarray#

Compute a particular slice \(m^{\prime}\), denoted mm, of the complete Wigner-d matrix at polar angle \(\beta\) using Turok & Bucher recursion.

The Wigner-d slice for a given \(\ell\) (el) and \(\beta\) is computed recursively over \(m\) labelled ‘m’ at a specific \(m^{\prime}\), by two half recursions running inwards from the edges \(m = \mp\ell\). Each half recursion is only stable while the slice grows in its direction, so the halves meet at \(m^\star = \mathrm{round}(m^\prime\cos\beta)\), the centre of the oscillatory region of the slice, rather than at \(m = 0\); near the poles the slice peaks at \(m = \pm m^\prime\) and decays away from it. The starting values are evaluated directly and the iterates rescaled by exact powers of two, as in compute_all_slices().

The Wigner-d slice \(d^\ell_{m, m^{\prime}}(\beta)\) is indexed for \(-L < m < L\) by dl[m + L - 1]. This implementation has computational scaling \(\mathcal{O}(L)\) and typically requires \(\sim 2L\) operations.

Parameters:
  • beta (float) – Polar angle in radians.

  • el (int) – Harmonic degree of Wigner-d matrix.

  • L (int) – Harmonic band-limit.

  • mm (int) – Harmonic order at which to slice the matrix.

  • positive_m_only (bool, optional) – Compute Wigner-d matrix for slice at m greater than zero only. Defaults to False.

  • construction (Whether to exploit conjugate symmetry. By) – this only leads to significant improvement for mm = 0. Defaults to False.

Raises:
  • ValueError – If el is greater than L.

  • ValueError – If el is less than mm.

  • Warning – If positive_m_only is true but mm not 0.

Returns:

Wigner-d matrix mm slice of dimension [2L-1].

Return type:

np.ndarray

s2fft.recursions.turok.fill(dl: ndarray, ell: int, L: int) → ndarray#

Reflects Wigner-d quarter plane to complete full matrix by using symmetry properties of the Wigner-d matrices.

Parameters:
  • dl (np.ndarray) – Wigner-d matrix to populate by symmetry.

  • ell (int) – Harmonic degree of Wigner-d matrix.

  • L (int) – Harmonic band-limit.

Returns:

A complete Wigner-d matrix of dimension [2L-1, 2L-1].

Return type:

np.ndarray