Welcome to ritzLavelyPy’s documentation!

Ritzwoller-Lavely polynomials

Module to handle decomposition of functions in terms of Ritzwoller-Lavely polynomials (Ritzwoller & Lavely, 1991) and reconstruction of functions from the Ritzwoller-Lavely coefficients.

class ritzLavelyPy.rlclass.ritzLavelyPoly(ell, jmax)[source]

Bases: object

Class to handle Ritzwoller-Lavely polynomials and coefficients.

ell - int

The spherical harmonic degree

jmax - int

The maximum order of polynomial

m - np.ndarray(ndim=1, dtype=int)

Array containing azimuthal order (-ell, -ell+1, …, ell-1, ell)

L - float

sqrt(ell*(ell+1))

m_by_L - np.ndarray(ndim=1, dtype=float)

m/L

Pjl - np.ndarray(ndim=1, dtype=float)

Ritzwoller-Lavely polynomials axis=0 : polynomial order axis=1 : azimuthal order m

Pjl_exists - bool

flag to check if polynomials are already computed

get_Pjl - computes Ritzwoller-Lavely polynomials get_coeffs - computes Ritzwoller-Lavely coefficients of a given function polyval - uses Ritzwoller-Lavely coefficients to compute the function

Class instance initializer

get_Pjl()[source]

Computes the Ritzwoller-Lavely polynomials for given ell and jmax

get_coeffs(arrm)[source]

Decomposition of input array into Ritzwoller-Lavely coefficients.

arrm - np.ndarray(ndim=1, dtype=float)

array that needs to be decomposed

aj - np.ndarray(ndim=1, dtype=float)

Ritzwoller-Lavely coefficients

polyval(acoeffs)[source]

Reconstruction of function from the Ritzwoller-Lavely coefficients.

acoeffs - np.ndarray(ndim=1, dtype=float)

the array containing Ritzwoller-Lavely coefficients

sum(acoeffs * Pjl) - np.ndarray(ndim=1, dtype=float)

the reconstructed function