Skip to main content

IGRF-14 Model by Python

Project description

pyIGRF

What is pyIGRF?

This is a package of IGRF-14 (International Geomagnetic Reference Field) about python version. We can calculate magnetic field intensity and transform coordinate between GeoGraphical and GeoMagnetic. It don't need any Fortran compiler or NumPy package.

How to Install?

Download this package and run install.

python setup.py install

How to Use it?

First import this package.

import pyIGRF

You can calculate magnetic field intensity.

pyIGRF.igrf_value(lat, lon, alt, date)

or calculate the annual variation of magnetic filed intensity.

pyIGRF.igrf_variation(lat, lon, alt, date)

the response is 7 float number about magnetic filed which is:

  • D: declination (+ve east)
  • I: inclination (+ve down)
  • H: horizontal intensity
  • X: north component
  • Y: east component
  • Z: vertical component (+ve down)
  • F: total intensity
    unit: degree or nT

If you want to use IGRF-14 more flexibly, you can use module calculate. There is two function which is closer to Fortran. You can change it for different coordination.

from pyIGRF import calculate

Another module load_coeffs can be used to get g[m][n] or h[m][n] same as that in formula.

from pyIGRF.load_coeffs import get_coeffs

Model Introduction and igrf13-coeffs File Download

https://www.ngdc.noaa.gov/IAGA/vmod/igrf.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyigrf14-1.0.2-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file pyigrf14-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyigrf14-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pyigrf14-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4c3f5d98a2a72040628856e042a1fa4246f4af2974c8aa3c51bfea7496906085
MD5 4f1ee6efa03f0cb33bc9a2a054246d28
BLAKE2b-256 0f6247cf285a15f3da6d2ca6b5b0646979f984d588e0cb66c1ec59e19bcbaba6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page