pyharm.integ#
Module to compute the following integrals:
a product of two fully-normalized associated Legendre functions and a sine of a co-latitude,
\[\int\limits_{\theta_1}^{\theta_2} \bar{P}_{n_1,m_1}(\cos\theta) \, \bar{P}_{n_2,m_2}(\cos\theta) \, \sin(\theta) \, \mathrm{d}\theta{,} \quad \theta_1 \leq \theta_2{,}\]a product of two
4pi
fully-normalized surface spherical harmonic functions over a rectangular cell on the unit sphere,\[\int\limits_{\theta_1}^{\theta_2} \int\limits_{\lambda_1}^{\lambda_2} \bar{Y}_{n_1,m_1}(\theta, \lambda) \, \bar{Y}_{n_2,m_2}(\theta, \lambda) \, \mathrm{d}\lambda \, \sin(\theta) \, \mathrm{d}\theta{,} \quad \theta_1 \leq \theta_2{,} \quad \lambda_1 \leq \lambda_2{.}\]
Note
This documentation is written for double precision version of PyHarm.
- pyharm.integ.pn1m1pn2m2(cltmin, cltmax, n1, m1, n2, m2, pnmj)#
Analytically computes the integral
\[\mathrm{ip} = \int\limits_{\theta_{\mathrm{min}}}^{\theta_{\mathrm{max}}} \bar{P}_{n_1, m_1}(\cos\theta) \, \bar{P}_{n_2, m_2}(\cos\theta) \, \sin\theta \, \mathrm{d}\theta{,} \quad \theta_{\mathrm{min}} \leq \theta_{\mathrm{max}}{.}\]The computation is based on the Fourier coefficients of the associated Legendre functions (see Eq. 33 of Pail and Plank, 2001).
References:
Pail, R., Plank, G., Schuh, W.-D. (2001) Spatially restricted data distributions on the sphere: the method of orthonormalized functions and applications. Journal of Geodesy 75:44–56
- Parameters:
cltmin (floating point) – Minimum co-latitude in radians
cltmax (floating point) – Maximum co-latitude in radians
n1 (integer) – Harmonic degree of the first Legendre function
m1 (integer) – Harmonic order of the first Legendre function
n2 (integer) – Harmonic degree of the second Legendre function
m2 (integer) – Harmonic order of the second Legendre function
pnmj (Pnmj) – Fourier coefficients of Legendre functions up to degree
max(n1, n2)
.
- Returns:
out – The output value
ip
of the integral.- Return type:
floating point
- pyharm.integ.yi1n1m1yi2n2m2(cltmin, cltmax, lonmin, lonmax, i1, n1, m1, i2, n2, m2, pnmj)#
Analytically computes the integral
\[\mathrm{iy} = \int\limits_{\theta_{\mathrm{min}}}^{\theta_{\mathrm{max}}} \int\limits_{\lambda_{\mathrm{min}}}^{\lambda_{\mathrm{max}}} \bar{Y}_{i_1,n_1,m_1}(\theta, \lambda) \, \bar{Y}_{i_2,n_2,m_2}(\theta, \lambda) \, \mathrm{d} \lambda \, \sin(\theta) \, \mathrm{d}\theta{,} \quad \theta_{\mathrm{min}} \leq \theta_{\mathrm{max}}{,} \quad \lambda_{\mathrm{min}} \leq \lambda_{\mathrm{max}}{,}\]where
\[\begin{split}\bar{Y}_{i,n,m}(\theta, \lambda) = \begin{cases} \bar{P}_{nm}(\cos\theta) \, \cos(m \, \lambda) \quad &\textrm{if} \quad i = 0{,}\\ \bar{P}_{nm}(\cos\theta) \, \sin(m \, \lambda) \quad &\textrm{if} \quad i = 1{.} \end{cases}\end{split}\]- Parameters:
cltmin (floating point) – Minimum co-latitude in radians
cltmax (floating point) – Maximum co-latitude in radians
lonmin (floating point) – Minimum longitude in radians
lonmax (floating point) – Maximum longitude in radians
i1 (integer) –
0
if the first spherical harmonic function is of thecos
type,1
for thesin
typen1 (integer) – Harmonic degree of the first spherical harmonic function
m1 (integer) – Harmonic order of the first spherical harmonic function
i2 (integer) – The same as
i1
but for the second spherical harmonic functionn2 (integer) – Harmonic degree of the second spherical harmonic function
m2 (integer) – Harmonic order of the second spherical harmonic function
pnmj (Pnmj) – Fourier coefficients of Legendre functions at least up to degree
max(n1, n2)
.
- Returns:
out – The value
iy
of the integral.- Return type:
floating point