spherical.utilities.indexing

Source: spherical/utilities/indexing.py

Utilities for computing indexes and total sizes of H, d, and 𝔇 matrices

theta_phi

theta_phi(n_theta, n_phi)

Source: spherical/utilities/indexing.py

Construct (theta, phi) grid This grid is in the order expected by spinsfast

Parameters

  • n_theta: int

    Number of points in the theta direction

  • n_phi: int

    Number of points in the phi direction

Returns

  • theta_phi_grid: ndarray

    Array of pairs of floats giving the respective [theta, phi] pairs. The shape of this array is (n_theta, n_phi, 2).

Note

The array looks like [ [θ, ϕ] for ϕ ∈ [0, 2π) for θ ∈ [0, π] ] (note the open and closed endpoints, respectively), where ϕ and θ are uniformly sampled in their respective ranges.