Reference

The apexpy.Apex class is used for all the main functionality (converting between coordinate systems, field line mapping, and calculating base vectors). The apexpy.helpers sub-module includes additional functions that may be useful, especially subsol(). The apexpy.fortranapex module is the interface to the apex Fortran library by Emmert et al. [2010] [1]. The interface is not documented. Use apexpy.Apex for all conversions and calculations. You can find some documentation of the actual Fortran library in the source file apexsh.f90. These functions may also be accessed through the command-line interface.

API

Command-line interface

When you install this package you will get a command called apexpy, which is an interface to the convert() method. See the documentation for this method for a more thorough explanation of arguments and behaviour.

You can get help on the command by running apexpy -h.

$ apexpy -h
usage: apexpy [-h] [--height HEIGHT] [--refh REFH] [-i FILE_IN]
              [-o FILE_OUT] SOURCE DEST DATE

Converts between geodetic, modified apex, quasi-dipole and MLT

positional arguments:
  SOURCE                Convert from {geo, apex, qd, mlt}
  DEST                  Convert to {geo, apex, qd, mlt}
  DATE                  YYYY[MM[DD[HHMMSS]]] date/time for IGRF
                        coefficients, time part required for MLT
                        calculations

optional arguments:
  -h, --help            show this help message and exit
  --height HEIGHT       height for conversion
  --refh REFH           reference height for modified apex coordinates
  -i FILE_IN, --input FILE_IN
                        input file (stdin if none specified)
  -o FILE_OUT, --output FILE_OUT
                        output file (stdout if none specified)