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. MLT calculations are also included. The package is free software (MIT license).
Quick start
Install (requires NumPy):
pip install aacgmv2
Convert between AACGM and magnetic 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.09467412, 339.09467412])
If you don’t know or use Python, you can also use the command line. See details in the full documentation.
Documentation
Badges
docs |
|
---|---|
tests |
|
package |
Changelog
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for aacgmv2-1.0.12-cp35-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e310f02e7ba38e564d250d62df428ff98a143af008972054fa54e4083e50baa |
|
MD5 | e6f140ded8536660c884a0277d084e31 |
|
BLAKE2b-256 | a03fec8b240682ebaf20ac5927bee6f8eebcf203691c6bf2bdb990f9aa4bba47 |
Hashes for aacgmv2-1.0.12-cp35-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35393c5c7440a5e379d107bb6b4f093de31ab882dbc2f32c5bc0e8f1e51c689c |
|
MD5 | 9d347071a8986dfe53aca465ad54b22c |
|
BLAKE2b-256 | 48627a53d301244bf5be0f1e2ba8390935dbdd7e4c719a01d780d00385432ffe |
Hashes for aacgmv2-1.0.12-cp34-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7146bc754d0ecb70e74f194fe058e293bf1bbfa51af85c617a3693e8cf852e69 |
|
MD5 | 85849b70fa180e993da9165e36a305de |
|
BLAKE2b-256 | 4071eed07580be389793f9ac5b67d21e63adc04eac5c8a1fd223898d9568f25d |
Hashes for aacgmv2-1.0.12-cp34-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 156718d71119af5d80f202b176e2b1f6dbc3e565811e0f61a4106607f21c4d70 |
|
MD5 | 43bb93d32164f43441ed3f35ee7f6655 |
|
BLAKE2b-256 | bc3360e7d11b61442833bd1d6f45cb0f6a3035e08895e361f4b35139df3f557a |
Hashes for aacgmv2-1.0.12-cp33-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 880f1530392aabd85b248fa4c037bed05426e6f7593cff9183e887299c34dbb8 |
|
MD5 | 245939fdff7c446fbe1d454540647799 |
|
BLAKE2b-256 | 19864cbb9860803371049384a39edb7c74106c7133a5b2dbc04e7aa08affd2ca |
Hashes for aacgmv2-1.0.12-cp33-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59839d2e86f803ce1aa23e7f83fa1d64ff3c25f70646d4de2c05599c9bd4bc84 |
|
MD5 | 4d0c3aee18cbd7d38e34f0d7d9176ae9 |
|
BLAKE2b-256 | 754abc9c275e09e195708c27067f558d616618cf04ec2fcb72fa77b7e4aab62f |
Hashes for aacgmv2-1.0.12-cp27-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c512b8e10a19ec81287a4974f632085bb5802114e5b071e8876649e10d577e4b |
|
MD5 | 75f2c886889009da378297099ec120a1 |
|
BLAKE2b-256 | f7446584371013cd6b30da44ea81602bf5287d7ecf2766468e1f6e7e873f1717 |
Hashes for aacgmv2-1.0.12-cp27-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5597b23fa6c279b598daea76c95edbaa42bf9172155bd02b5ccd87b43430b2d5 |
|
MD5 | be3f86f8494f3967c18eeea5ba5a80bc |
|
BLAKE2b-256 | 011cc29fd947cc12b209b4dd4e4dc3c4da9a31673ed7049b87b8061896fc1f6a |