legendre_polynomials

  • Computes fully-normalized Legendre polynomials for an array of x values and their first derivative

  • Calculates Legendre polynomials for zonal harmonics (order 0)

Calling Sequence

from gravity_toolkit.legendre_polynomials import legendre_polynomials
pl,dpl = legendre_polynomials(LMAX, x)

Source code

gravity_toolkit.legendre_polynomials(lmax, x, ASTYPE=<class 'numpy.float64'>)[source]

Computes fully-normalized Legendre polynomials and their first derivative following Hofmann-Wellenhof and Moritz [25]

Parameters:
lmax: int

maximum degree of Legendre polynomials

x: np.ndarray

elements ranging from -1 to 1

Typically cos(theta), where theta is the colatitude in radians

ASTYPE: np.dtype, default np.float64

output variable data type

Returns:
pl: np.ndarray

fully-normalized Legendre polynomials

dpl: np.ndarray

first derivative of Legendre polynomials