Skip to main content

Overview

Documentation Status PyPI Package latest release doi

Python interface for the Average Magnetic field and Polar current System (AMPS) model.

The AMPS model is an empirical model of the ionospheric current system and associated magnetic field. The model magnetic field and currents are continuous functions of solar wind velocity, the interplanetary magnetic field, the tilt of the Earth’s dipole magnetic field with respect to the Sun, and the 10.7 cm solar radio flux index F10.7. Given these parameters, model values of the ionospheric magnetic field can be calculated anywhere in space, and, with certain assumptions, on ground. The full current system, horizontal + field-aligned, are defined everywhere in the polar regions. The model is based on magnetic field measurements from the low Earth orbiting Swarm and CHAMP satellites.

pyAMPS can be used to calculate and plot average magnetic field and current parameters on a grid. The parameters that are available for calculation/plotting are:

  • field aligned current (scalar)

  • divergence-free current function (scalar)

  • divergence-free part of horizontal current (vector)

  • curl-free part of horizontal current (vector)

  • total horizontal current (vector)

  • eastward or northward ground perturbation corresponding to equivalent current (scalars)

For questions and comments, please contact karl.laundal at ift.uib.no

Installation

Using pip:

pip install pyamps

Dependencies:

Quick Start

>>> # initialize by supplying a set of external conditions:
>>> from pyamps import AMPS
>>> m = AMPS(350, # Solar wind velocity in km/s
              -4, # IMF By (GSM) in nT
              -3, # IMF Bz (GSM) in nT,
              20, # dipole tilt angle in degrees
              80) # F107_index
>>> # make summary plot:
>>> m.plot_currents()
Field-aligned (colour) and horizontal (pins) currents
>>> # All the different current functions can be calculated on
>>> # a pre-defined or user-specified grid.
>>> import numpy as np
>>> mlat, mlt = np.array([75, -75]), np.array([12, 12])
>>> Ju = m.get_upward_current(mlat, mlt)
>>> Ju
array([ 0.23323377, -0.05599236])

Documentation

See http://pyamps.readthedocs.io

References

Laundal, K. M., Finlay, C. C., Olsen, N. & Reistad, J. P. (2018), Solar wind and seasonal influence on ionospheric currents from Swarm and CHAMP measurements, Journal of Geophysical Research - Space Physics. doi:10.1029/2018JA025387

pyAMPS uses an updated set of model coefficients compared to the model discussed in the paper. You can use pyAMPS and the scripts in pyamps/climatology_plots/ to produce updated versions of Figures 5-7 and 9-11 from the paper

See also: Laundal, K. M., Finlay, C. C. & Olsen, N. (2016), Sunlight effects on the 3D polar current system determined from low Earth orbit measurements. Earth Planets Space. doi:10.1186/s40623-016-0518-x

Acknowledgments

The code is produced with support from ESA through the Swarm Data Innovation and Science Cluster (Swarm DISC). For more information on Swarm DISC, please visit https://earth.esa.int/web/guest/missions/esa-eo-missions/swarm/disc

Badges

docs

Documentation Status

tests

Requirements Status

package

PyPI Package latest release

Changelog

Version 1.1: Added support for calculations on regular mlat/mlt grids with less memory use Version 1.4: Updated model vectors and fixed a bug which affected toroidal field Version 1.4.1: Now using IGRF-13 when calculating dipole position (used in mlt_utils) Version 1.5: Updated model vector + removed LaTeX dependencies + a couple of minor fixes Version 1.6: Updated model vector + removed deprecated Multi-dimensional indexing Version 1.7: Added get_J_horiz function to calculate horizontal currents efficiently with dask Version 1.7.1: Now using IGRF-14 when calculating dipole position (used in mlt_utils) Version 1.8: Updated model vector

Metadata

Release files for pyamps 1.8

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

Source distribution (sdist)

Source distribution for pyamps 1.8
File Size Uploaded
pyamps-1.8.tar.gz 8.3 MB Details

Built distribution (wheel)

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

Total release size: 9.6 MB

Release files / pyamps-1.8.tar.gz

Download URL pyamps-1.8.tar.gz
Size 8.3 MB
Tags Source
SHA-256 checksum
How to use checksums
df81b3b85e70fb37702496de194cf673abcb5b34ff39791898530b6597324666
BLAKE2b-256 checksum
How to use checksums
96e0dea5e4fcd9a777a4cf1319ee62af55be5583c1337b6d397ecca519b811c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.14

Release files / pyamps-1.8-py3-none-any.whl

Download URL pyamps-1.8-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
682045bc562b924ec60519507f85b32f240262576510c6faf59098928195ffe6
BLAKE2b-256 checksum
How to use checksums
77262031eff8eb43229b776b1dd7727e03b1be830aec4187737ed1d419ed273f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.14

Release history Release notifications | RSS feed

This release

1.8 This release

2 release files

1.7.0

2 release files

1.6

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

3 release files

1.0.0

2 release files

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