Skip to main content

sph_harm_y_all

Function sph_harm_y_all 

Source
pub fn sph_harm_y_all(
    n: usize,
    m: usize,
    theta: f64,
    phi: f64,
) -> Vec<Vec<Complex64>>
Expand description

All spherical harmonics up to the specified degree $n$ and order $m$

Corresponds to scipy.special.sph_harm_y_all.

§Notes

Output shape is (n + 1, 2 * m + 1). The entry at (j, i) corresponds to degree $j$ and order $i$ for all $0 \leq j \leq n$ and $-m \leq i \leq m$.

Note: Unlike Python, Rust uses only positive array indices. The mapping from array index to spherical harmonic order is:

  • Index $0$ to $m$: orders $0, 1, 2, \ldots, m$
  • Index $m+1$ to $2*m$: orders $-m, -(m-1), \ldots, -1$

§See also