Skip to main content

Overview

ChaosMagPy is a simple Python package for evaluating the CHAOS geomagnetic field model, as well as other models of Earth’s magnetic field. The latest CHAOS model is available at http://www.spacecenter.dk/files/magnetic-models/CHAOS-8/.

Documentation

The documentation of the current release is available on Read the Docs (https://chaosmagpy.readthedocs.io/en/)

pypi Documentation Status doi license

Citation

To reference ChaosMagPy in publications, please cite the package itself

https://doi.org/10.5281/zenodo.3352398

and, for CHAOS-8, the relevant journal publication:

Kloss, C.; Finlay, C.C.; Olsen, N.; Tøffner-Clausen, L.; Gillet, N.; Grayver, A. (2026) The CHAOS-8 geomagnetic field model, Earth Planets Space, doi:10.1186/s40623-025-02352-0

or, for the earlier CHAOS models, one of the following:

Finlay, C.C., Kloss, C., Olsen, N., Hammer, M. Toeffner-Clausen, L., Grayver, A and Kuvshinov, A. (2020), The CHAOS-7 geomagnetic field model and observed changes in the South Atlantic Anomaly, Earth Planets and Space 72, doi:10.1186/s40623-020-01252-9

Finlay, C.C., Olsen, N., Kotsiaros, S., Gillet, N. and Toeffner-Clausen, L. (2016), Recent geomagnetic secular variation from Swarm and ground observatories as estimated in the CHAOS-6 geomagnetic field model Earth Planets Space, Vol 68, 112. doi: 10.1186/s40623-016-0486-1

Olsen, N., Luehr, H., Finlay, C.C., Sabaka, T. J., Michaelis, I., Rauberg, J. and Toeffner-Clausen, L. (2014), The CHAOS-4 geomagnetic field model, Geophys. J. Int., Vol 197, 815-827, doi: 10.1093/gji/ggu033.

Olsen, N., Luehr, H., Sabaka, T.J., Mandea, M. ,Rother, M., Toeffner-Clausen, L. and Choi, S. (2006), CHAOS — a model of Earth’s magnetic field derived from CHAMP, Ørsted, and SAC-C magnetic satellite data, Geophys. J. Int., vol. 166 67-75

Installation

ChaosMagPy relies on the following (some are optional):

  • python>=3.7

  • numpy (>=2 if python>=3.12)

  • scipy

  • pandas

  • h5py

  • hdf5storage (>=0.2 if python>=3.12)

  • pyshp>=2.3.1

  • apexpy>=2.1.0 (optional, used for evaluating the ionospheric E-layer field)

  • matplotlib>=3.6 (optional, used for plotting)

  • lxml (optional, used for downloading latest RC-index file)

Specific installation steps for all dependencies, including optional packages, using the conda/pip package managers are as follows:

  1. Install packages with conda:

    >>> conda install python numpy scipy pandas pyshp h5py matplotlib lxml
    
  2. Install remaining packages with pip:

    >>> pip install hdf5storage apexpy
    
  3. Finally, install ChaosMagPy with pip:

    >>> pip install chaosmagpy
    

    Alternatively, if you have downloaded the distribution archives from the Python Package Index (PyPI) at https://pypi.org/project/chaosmagpy/#files, install ChaosMagPy using the built or source distributions:

    >>> pip install chaosmagpy-x.x-py3-none-any.whl
    

    or

    >>> pip install chaosmagpy-x.x.tar.gz
    

    replacing x.x with the relevant version.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chaosmagpy-0.16.tar.gz (3.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chaosmagpy-0.16-py3-none-any.whl (3.0 MB view details)

Uploaded Python 3

File details

Details for the file chaosmagpy-0.16.tar.gz.

File metadata

  • Download URL: chaosmagpy-0.16.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for chaosmagpy-0.16.tar.gz
Algorithm Hash digest
SHA256 46ee9b3574eff9d4e7fdab7b3b08683782a03c49f6b92a0936a7444bdf7ebb87
MD5 8bbfed1754ffe912ea0c70d2687f0823
BLAKE2b-256 442224f533aaa74fbc5c03be448d604c2816325e06e5b95f198deb7417048e7b

See more details on using hashes here.

File details

Details for the file chaosmagpy-0.16-py3-none-any.whl.

File metadata

  • Download URL: chaosmagpy-0.16-py3-none-any.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for chaosmagpy-0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 3132122b4516d85a4dee4481007976f5f71901a23c08bf31a2ee33580931364f
MD5 364fc189a113704a98c28c6d1e136939
BLAKE2b-256 45fad35fbc15653ca49ece9b9ef572135718d01486ead32a038f7b858ceaf763

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page