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.

Release files for chaosmagpy 0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chaosmagpy 0.16
File Size Uploaded
chaosmagpy-0.16.tar.gz 3.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for chaosmagpy 0.16
File Interpreter ABI Platform
chaosmagpy-0.16-py3-none-any.whl Python 3 none any Details

Total release size: 6.1 MB

Release files / chaosmagpy-0.16.tar.gz

Download URL chaosmagpy-0.16.tar.gz
Size 3.0 MB
Tags Source
SHA-256 checksum
How to use checksums
46ee9b3574eff9d4e7fdab7b3b08683782a03c49f6b92a0936a7444bdf7ebb87
BLAKE2b-256 checksum
How to use checksums
442224f533aaa74fbc5c03be448d604c2816325e06e5b95f198deb7417048e7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release files / chaosmagpy-0.16-py3-none-any.whl

Download URL chaosmagpy-0.16-py3-none-any.whl
Size 3.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
3132122b4516d85a4dee4481007976f5f71901a23c08bf31a2ee33580931364f
BLAKE2b-256 checksum
How to use checksums
45fad35fbc15653ca49ece9b9ef572135718d01486ead32a038f7b858ceaf763
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page