A Python wrapper for Apex coordinates
Project description
This is a Python wrapper for the Apex fortran library by Emmert et al. [2010] [1], which allows converting between geodetic, modified apex, and quasi-dipole coordinates as well as getting modified apex and quasi-dipole base vectors (Richmond [1995] [2]). MLT calculations are also included. The package is free software (MIT license).
Quick start
Install (requires NumPy):
pip install apexpy
Conversion is done by creating an Apex object and using its methods to perform the desired calculations. Some simple examples:
>>> from apexpy import Apex >>> A = Apex(date=2015.3) # datetime objects are also supported >>> # geo to apex, scalar input >>> mlat, mlon = A.convert(60, 15, 'geo', 'apex', height=300) >>> mlat 57.469573974609375 >>> mlon 93.633583068847656 >>> # apex to geo, array input >>> glat, glon = A.convert([90, -90], 0, 'apex', 'geo', height=0) >>> glat array([ 83.09959412, -74.38826752]) >>> glon array([ -84.59458923, 125.71492767]) >>> # geo to MLT >>> import datetime as dt >>> mlat, mlt = A.convert(60, 15, 'geo', 'mlt', datetime=dt.datetime(2015, 2, 10, 18, 0, 0)) >>> mlat 56.590423583984375 >>> mlt 19.107855542500815 >>> # can also convert magnetic longitude to mlt >>> mlt = A.mlon2mlt(120, dt.datetime(2015, 2, 10, 18, 0, 0)) >>> mlt 20.893299166361491
If you don’t know or use Python, you can also use the command line. See details in the full documentation.
Documentation
References
Badges
docs |
|
---|---|
tests |
|
package |
Changelog
1.0.0 (2015-11-30)
Initial release
Project details
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 apexpy-1.0.0-cp34-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8a86d027a99d2c285dc0f475b451a421accda8be098e005d97df0ceac5597ff |
|
MD5 | 2351ae7c5d9e5b42dddbb176bf63aaaa |
|
BLAKE2b-256 | 8abda73f5284888827080bbf9766872e885ff939952a14b61ea35d4601b2c384 |
Hashes for apexpy-1.0.0-cp34-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74dd2ed6e2fc762524e0bea0483109561519fad99574f6d55f7c889de75515db |
|
MD5 | 279ad352458d575a8a8b7ebe70ee9b1f |
|
BLAKE2b-256 | 32d172b3275ae494a0f531e10d3c04664cd5749df5c191583f46cf014118a0af |
Hashes for apexpy-1.0.0-cp33-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 332e07fb1a246e8f8890806ac9e57f6fdb7cd136fbd9838264291ffff83f4896 |
|
MD5 | 7da9c8aaa721c0c9029cdaa5c369e96e |
|
BLAKE2b-256 | 8b0f2e2ed8d7891f018a0120f8a4fcc62f194d66b13111cd5ec287e7a9cafed9 |
Hashes for apexpy-1.0.0-cp33-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf07e430b66b27b54df06d82db33f58d9d62840284cd1a148b82c91a0f37558b |
|
MD5 | d77d53ac87183c51e588c869fdb216b2 |
|
BLAKE2b-256 | ec3c0b8cff58f30dec7bb462e527852e12800670454625bcd8f7d8e5c4f1281d |
Hashes for apexpy-1.0.0-cp27-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b1bd5523c91ce6a1a26acb8371ab66abb19fe84e59a1ff39e92ac363e17237c |
|
MD5 | 93b34c7e00bfac0b83519931fc805865 |
|
BLAKE2b-256 | d412f6ddf1412268acf78542edc3729c1afa9a0d96b6317649364b4182092586 |
Hashes for apexpy-1.0.0-cp27-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6688cda6c61eccec072ecab87b97885f6b3ea59def1924cfc977dfca0f82e474 |
|
MD5 | 9fafc68676c48f8519ab4f8f5dcf3acf |
|
BLAKE2b-256 | bdb555cf011e8c20430feb2b34a51c8c7d527dc79c9d47544f4e4f5cccd68f4d |