Expand description
Associated Legendre functions and spherical harmonics.
Conventions: the Condon-Shortley phase (−1)^m is included in P_l^m, and
Y_l^m(θ, φ) = √((2l+1)/(4π) · (l−m)!/(l+m)!) P_l^m(cos θ) e^{imφ} is orthonormal on the unit
sphere, with Y_l^{−m} = (−1)^m conj(Y_l^m) (the physics and quantum-mechanics convention).
See the book entry Orthogonal polynomials and spherical harmonics.
Functions§
- associated_
legendre - The associated Legendre function
P_l^m(x)for|x| ≤ 1and|m| ≤ l(zero otherwise), with the Condon-Shortley phase. Negative orders useP_l^{−m} = (−1)^m (l−m)!/(l+m)! P_l^m. Unnormalized values grow like(2m)!and overflow for orders beyond about 150; usenormalized_associated_legendrefor high degrees. - normalized_
associated_ legendre - The fully normalized
P̄_l^m(x) = √((2l+1)/(4π) · (l−m)!/(l+m)!) P_l^m(x)form ≥ 0, so thatY_l^m(θ, φ) = P̄_l^m(cos θ) e^{imφ}. Computed by the normalized recurrence, which is stable and free of overflow for degrees into the thousands. - real_
spherical_ harmonic - The real spherical harmonic:
√2 (−1)^m Re Y_l^mform > 0,Y_l^0form = 0and√2 (−1)^m Im Y_l^{|m|}form < 0, i.e.√2 P̄_l^{|m|} (−1)^m cos(mφ)orsin(|m|φ). These form a real orthonormal basis. - spherical_
harmonic - The complex spherical harmonic
Y_l^m(θ, φ)(θ polar from +z, φ azimuth from +x), zero for|m| > l.