Skip to content
forked from aburrell/aacgmv2

Python library for AACGM-v2 magnetic coordinates

License

Notifications You must be signed in to change notification settings

klaundal/aacgmv2

 
 

Repository files navigation

Overview

Documentation Status PyPI Package latest release

This is a Python wrapper for the AACGM-v2 C library, which allows converting between geographic and magnetic coordinates. MLT calculations are also included. The package is free software (MIT license).

Quick start

Install (requires NumPy):

pip install aacgmv2

Convert between AACGM and geographic coordinates:

>>> from aacgmv2 import convert
>>> from datetime import date
>>> # geo to AACGM, single numbers
>>> mlat, mlon = convert(60, 15, 300, date(2013, 11, 3))
>>> mlat
array(57.47207691280528)
>>> mlon
array(93.62138045643167)
>>> # AACGM to geo, mix arrays/numbers
>>> glat, glon = convert([90, -90], 0, 0, date(2013, 11, 3), a2g=True)
>>> glat
array([ 82.96656071, -74.33854592])
>>> glon
array([ -84.66516034,  125.84014944])

Convert between AACGM and MLT:

>>> from aacgmv2 import convert_mlt
>>> from datetime import datetime
>>> # MLT to AACGM
>>> mlon = convert_mlt([0, 12], datetime(2013, 11, 3, 18, 0), m2a=True)
>>> mlon
array([ 159.10097421,  339.10097421])

If you don't know or use Python, you can also use the command line. See details in the full documentation.

Documentation

https://aacgmv2.readthedocs.org/

Badges

docs Documentation Status
tests
package
PyPI Package latest release Supported versions
PyPI Wheel Supported implementations

About

Python library for AACGM-v2 magnetic coordinates

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 66.7%
  • Python 32.2%
  • Batchfile 1.1%