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.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
Badges
docs |
|
---|---|
tests |
|
package |
Changelog
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
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.13-cp35-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f431ba27d672239cb1875c43760802a9e95bc0105b1d22c7db50f0faa1bb3309 |
|
MD5 | 1f184aa32f8826f9a258014226f7c6ae |
|
BLAKE2b-256 | ef2ffdf5abe22e42dac9d6eb9dea3dceef5524f49b7e5913f45703d7ab6d6de7 |
Hashes for aacgmv2-1.0.13-cp35-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed585b16f165d731f866590ba3d6d82f8c4c555af973ddb1e443f608f0b0c44e |
|
MD5 | 4df1bdc7a22213d6131d4bea0d65ac28 |
|
BLAKE2b-256 | 6eb496689a93a12259e5267ab912b25f6c40c6fc319f663459176b76b4c4fc30 |
Hashes for aacgmv2-1.0.13-cp34-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b475176fd34b10a923aa85ac28ff7a52a83822f11ebcf8fd1ccace2a4ddb378 |
|
MD5 | 69d1dd6e108af62531e5e0e9d4547057 |
|
BLAKE2b-256 | e813f029e189ecb826e0f263fa57b924b11898271f329aae14cbf8cdc284a33d |
Hashes for aacgmv2-1.0.13-cp34-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de378b898f49515f74398a025fe34d8a5371c51cd1c92d2b9c22f90833c3305c |
|
MD5 | 052d8afdb62b6838fc1a4d6722be1bfa |
|
BLAKE2b-256 | 924f4a133faca357a37b22f0f0b03b2ce32676219f75dbfe1036ab4318d0c17b |
Hashes for aacgmv2-1.0.13-cp33-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbbfe34e1b891f726c2a4075a87b36821190d08248e93a590946ba602ef99058 |
|
MD5 | bcd16361cdf1c4dbd4262271455509a0 |
|
BLAKE2b-256 | 4e9834c0ee409a924870a36608592c1c4dd55d15434ee7e659d606ce71f14257 |
Hashes for aacgmv2-1.0.13-cp33-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a83788f87b83357c9452d4461eff582ec8f252f3d5e0fcba13ca12090369940 |
|
MD5 | 3951e1c7580d4a26cc06f7544297f5ee |
|
BLAKE2b-256 | b71b89abfdac1ef141eaf9199be3cd0f4dbe8889b505cc641ff5cd458444c60b |
Hashes for aacgmv2-1.0.13-cp27-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4d93ad48b5b528afc8b833c35f2dc24566ee88a5f47e8a70fcef6df978def4f |
|
MD5 | de5402f1d2d894e91b5537ceda0c0a81 |
|
BLAKE2b-256 | 7aa0609afa39b9d9d30c08972776f6add6b446e75031eb3e6b314d0f11d4ed9b |
Hashes for aacgmv2-1.0.13-cp27-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44315df57f0b10ae69a0daa63f064a3bdbe90228672c34260a72e1b60dd654ea |
|
MD5 | f09ba45190109d449bec7fd92f527fd4 |
|
BLAKE2b-256 | a1038850508d1af3de2a4733922ad0515e4b67616dcacbd299cc318cd53649ea |