This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A Python wrapper for AACGM-v2 magnetic coordinates

Project Description

This is a Python wrapper for the AACGM-v2 C library, which allows converting between geographic and magnetic coordinates. The currently included version of the C library is 2.2. The wrapper is provided “as is” in the hopes that it will be useful to the space science community, and will not automatically be updated when new versions of the C library is released. MLT calculations are included in the wrapper (not part of the C library, please see the documentation for implementation details). 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.08967974,  339.08967974])

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

Badges

docs
tests
package

Changelog

2.0.0 (2016-11-03)

  • Change method of calculating MLT, see documentation of convert_mlt for details

1.0.13 (2015-10-30)

  • Correctly convert output of subsol() to geodetic coordinates (the error in MLT/mlon conversion was not large, typically two decimal places and below)

1.0.12 (2015-10-26)

  • Return nan in forbidden region instead of throwing exception

1.0.11 (2015-10-26)

  • Fix bug in subsolar/MLT conversion

1.0.10 (2015-10-08)

  • No code changes, debugged automatic build/upload process and needed new version numbers along the way

1.0.0 (2015-10-07)

  • Initial release
Release History

Release History

This version
History Node

2.0.0

History Node

1.0.13

History Node

1.0.12

History Node

1.0.11

History Node

1.0.10

History Node

1.0.9

History Node

1.0.8

History Node

1.0.7

History Node

1.0.6

History Node

1.0.5

History Node

1.0.3

History Node

1.0.1

History Node

1.0.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
aacgmv2-2.0.0-cp27-cp27m-win32.whl (471.8 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Nov 3, 2016
aacgmv2-2.0.0-cp27-cp27m-win_amd64.whl (476.0 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Nov 3, 2016
aacgmv2-2.0.0-cp33-cp33m-win32.whl (471.7 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Nov 3, 2016
aacgmv2-2.0.0-cp33-cp33m-win_amd64.whl (476.1 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Nov 3, 2016
aacgmv2-2.0.0-cp34-cp34m-win32.whl (471.7 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Nov 3, 2016
aacgmv2-2.0.0-cp34-cp34m-win_amd64.whl (476.1 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Nov 3, 2016
aacgmv2-2.0.0-cp35-cp35m-win32.whl (474.6 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Nov 3, 2016
aacgmv2-2.0.0-cp35-cp35m-win_amd64.whl (481.2 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Nov 3, 2016
aacgmv2-2.0.0.zip (520.3 kB) Copy SHA256 Checksum SHA256 Source Nov 3, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting