igrf
– International Geomagnetic Reference Field¶
This module computes the compass deviation (or variance) at a given point. It allows mapping from true bearings to magnetic bearings.
This is a migration of the Geomag 7.0 software from Fortran to Python.
It relies on the coefficients table, provided by NOAA. See https://www.ngdc.noaa.gov/IAGA/vmod/igrf.html for more information.
Background¶
From the web page.
With \(g_n^m\) and \(h_n^m\) are the coefficients to determine
phase and amplitude. These are provided by the associated igrf13coeffs.txt
file.
\(a\) is the radius of the Earth, 6371.2 km.
\(N\) is the degree of truncation, 13.
The position, \(r,\theta,\phi,t\), is the altitude, latitude, longitude and time. At the surface, \(r = a\).
\(P_n^m\) are associated Legendre functions of the first kind of degree \(n\), order \(m\).
\({}_{2}F_{1}(a,b;c;z)\) is the Hypergeometric function.
The Gamma function is \(\Gamma (n)=(n-1)!\), or \(\Gamma (z)=\int _{0}^{\infty }x^{z-1}e^{-x}\,dx,\ \qquad \Re (z)>0\)
Testing¶
This is tested with IGRF-11, and IGRF-13 coefficients.