legendre_polynomials

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

Calling Sequence

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

Source code

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

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

Parameters:
lmax: int

maximum degree of Legendre polynomials

x: float

elements ranging from -1 to 1

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

ASTYPE: obj, default np.float64

output variable data type

Returns:
pl: float

fully-normalized Legendre polynomials

dpl: float

first derivative of Legendre polynomials