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.
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
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
File details
Details for the file aacgmv2-2.0.0.zip
.
File metadata
- Download URL: aacgmv2-2.0.0.zip
- Upload date:
- Size: 520.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9549c9c5c7e7e10ba4f2c1e67f63e90962cf741a00820f43a85b2697514dc11c |
|
MD5 | 913efcb404c6bff8e1db09b42a19804e |
|
BLAKE2b-256 | bea33a20ee8bf01d25b330df4ff82cb1a399b6d7580ade269645fc1d8c49f743 |
File details
Details for the file aacgmv2-2.0.0-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: aacgmv2-2.0.0-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 481.2 kB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f93b2a0803638eb912fcd567ec39d550e668180c3420fa0ea1a8d67ecbfe7858 |
|
MD5 | bca0b7b7bdbce7bdad36ae0173e0788d |
|
BLAKE2b-256 | 398468f25fea2592855c1213340ae81b70e14a1195f6a1e2fbabb8a4bd7122c4 |
File details
Details for the file aacgmv2-2.0.0-cp35-cp35m-win32.whl
.
File metadata
- Download URL: aacgmv2-2.0.0-cp35-cp35m-win32.whl
- Upload date:
- Size: 474.6 kB
- Tags: CPython 3.5m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ce6a3ef5ea6e48a106333e13cf1c1dbbbc289acc8dc3ab63e0a112fd8e058bf |
|
MD5 | 5964b863913ebdc3f36ce61beb6ed4a0 |
|
BLAKE2b-256 | 7d29a6bd5f31fc3fb08f34e669a356efc8a768340197f5a12f51619df603b174 |
File details
Details for the file aacgmv2-2.0.0-cp34-cp34m-win_amd64.whl
.
File metadata
- Download URL: aacgmv2-2.0.0-cp34-cp34m-win_amd64.whl
- Upload date:
- Size: 476.1 kB
- Tags: CPython 3.4m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3fda9a3e97113acbc87cd2c98dfbd2d747bdbc6693fa0d5c1582fe42e757d2c |
|
MD5 | 764cb33bc05c1648ea20614ef3777857 |
|
BLAKE2b-256 | 00a51ee6f37a14201daac7f8a0b0b437e9366c80213ed611cc6edbfba8fe6364 |
File details
Details for the file aacgmv2-2.0.0-cp34-cp34m-win32.whl
.
File metadata
- Download URL: aacgmv2-2.0.0-cp34-cp34m-win32.whl
- Upload date:
- Size: 471.7 kB
- Tags: CPython 3.4m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f729a42aa72c6b1faa51a4ef8751fa19f1338c578cc33310f9e85eb81467c8da |
|
MD5 | 10261fee2e68323248f95963896309fa |
|
BLAKE2b-256 | 87a87a3e529517c9144bc744405c34a31930c40669783cd3a0f99f84771567f7 |
File details
Details for the file aacgmv2-2.0.0-cp33-cp33m-win_amd64.whl
.
File metadata
- Download URL: aacgmv2-2.0.0-cp33-cp33m-win_amd64.whl
- Upload date:
- Size: 476.1 kB
- Tags: CPython 3.3m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6103fa8c788372a4e5434cf9a75c723ad77a765b8281c08218fb34c869bc056 |
|
MD5 | 873802237eb6aa7b3fc1fbc7ab100e32 |
|
BLAKE2b-256 | 6923ce9c9f36cf9016b04c7f48ed75e04b588ee2dccf35ec40287564af8664ca |
File details
Details for the file aacgmv2-2.0.0-cp33-cp33m-win32.whl
.
File metadata
- Download URL: aacgmv2-2.0.0-cp33-cp33m-win32.whl
- Upload date:
- Size: 471.7 kB
- Tags: CPython 3.3m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bf61d944a339c8bd9e43aee0c8e43ce3b6c50a3756ea2a2d995572df257e540 |
|
MD5 | 6618284b7e58169e0dce3c9014f30c3b |
|
BLAKE2b-256 | 1bb0d8f55e01f72ae7746b0834eda51c10839c19c35af39dd11ca78c0757222b |
File details
Details for the file aacgmv2-2.0.0-cp27-cp27m-win_amd64.whl
.
File metadata
- Download URL: aacgmv2-2.0.0-cp27-cp27m-win_amd64.whl
- Upload date:
- Size: 476.0 kB
- Tags: CPython 2.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 957e82b0cea28db277112197d151fc06494c1a1955eb4ab7c33327c80d5c2d1c |
|
MD5 | e4a326c2dbaa2fb48f87d264f7157aaa |
|
BLAKE2b-256 | 89eb0696d70755d537cf346d7ce1120f7267af63e39a1981c1daf9139ee44aae |
File details
Details for the file aacgmv2-2.0.0-cp27-cp27m-win32.whl
.
File metadata
- Download URL: aacgmv2-2.0.0-cp27-cp27m-win32.whl
- Upload date:
- Size: 471.8 kB
- Tags: CPython 2.7m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4e2827b0637db5f79d2c6dfd525e8a78579acd6eda925ff42a53f41714b1d2a |
|
MD5 | 7761c4f593c258be577b9c9ed64542a3 |
|
BLAKE2b-256 | 9c0252fd71237b3c9f080ca6050f9da5bd66d7fc40c955aea2bb0cf1ed93316b |