legendre.py
Computes associated Legendre functions of degree
levaluated for elementsxlmust be a scalar integer andxmust contain real values ranging -1 <=x<= 1Unnormalized associated Legendre function values will overflow for
l> 150
Calling Sequence
from spatial_interpolators.legendre import legendre
Pl = legendre(l, x)
- spatial_interpolators.legendre(l, x, NORMALIZE=False)[source]
Computes associated Legendre functions of degree
lfollowing [Abramowitz1965] and [Jacobs1987]- Parameters
- l: int
degree of Legrendre polynomials
- x: float
elements ranging from -1 to 1
Typically
cos(theta), wherethetais the colatitude in radians- NORMALIZE: bool, default False
Fully-normalize the Legendre Functions
- Returns
- Pl: legendre polynomials of degree
l
- Pl: legendre polynomials of degree
References
- Abramowitz1965
M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions, 1046 pp., (1965).
- Jacobs1987
J. A. Jacobs, Geomagnetism, Volume 1, 1st Edition, 832 pp., (1987).