Skip to main content

Calculate and plot maps of the model Average Magnetic field and Polar current System (AMPS)

Project description

Overview
========
|docs| |version| |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:

- numpy
- pandas
- dask
- matplotlib (with LaTeX support, see https://matplotlib.org/users/usetex.html)
- scipy (scipy.interpolate for plotting purposes)
- apexpy (magnetic coordinate conversion)

Quick Start
-----------
.. code-block:: python

>>> # 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()

.. image:: docs/static/example_plot.png
:alt: Field-aligned (colour) and horizontal (pins) currents

.. code-block:: python

>>> # 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.25088252, -0.05726114])

Documentation
-------------
See `http://pyamps.readthedocs.io`

References
----------
Laundal, K. M., Finlay, C. C., Olsen, N. & Reistad, J. P. (submitted 2018), Solar wind and seasonal influence on ionospheric currents from Swarm and CHAMP measurements, Journal of Geophysical Research - Space Physics. `doi:10.1029/2018JA025387 <https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2018JA025387>`_

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 <https://earth-planets-space.springeropen.com/articles/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
------

.. list-table::
:stub-columns: 1

* - docs
- |docs|
* - tests
- | |travis| |appveyor| |requires|
* - package
- | |version|

.. |docs| image:: https://readthedocs.org/projects/pyamps/badge/?version=latest
:target: http://pyamps.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. |version| image:: https://badge.fury.io/py/pyamps.svg
:alt: PyPI Package latest release
:target: https://badge.fury.io/py/pyamps

.. |coveralls| image:: https://coveralls.io/repos/github/klaundal/pyAMPS/badge.svg
:target: https://coveralls.io/github/klaundal/pyAMPS
:alt: Coverage Status

.. |requires| image:: https://requires.io/github/klaundal/pyAMPS/requirements.svg?branch=master
:target: https://requires.io/github/klaundal/pyAMPS/requirements/?branch=master
:alt: Requirements Status

.. |travis| image:: https://travis-ci.org/klaundal/pyAMPS.svg?branch=master
:alt: Travis CI Build Status
:target: https://travis-ci.org/klaundal/pyAMPS

.. |appveyor| image:: https://ci.appveyor.com/api/projects/status/gyh9ognf7qbpsos7?svg=true
:alt: AppVeyor Build Status
:target: https://ci.appveyor.com/project/klaundal/pyamps

.. |doi| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1182931.svg
:target: https://doi.org/10.5281/zenodo.1182931
Changelog
=========

No changes have been made since version 1.0.

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

pyamps-1.1.0.tar.gz (13.9 MB view details)

Uploaded Source

Built Distributions

pyamps-1.1.0-py2.py3-none-any.whl (204.4 kB view details)

Uploaded Python 2 Python 3

pyamps-1.1.0-py2.7.egg (245.1 kB view details)

Uploaded Source

File details

Details for the file pyamps-1.1.0.tar.gz.

File metadata

  • Download URL: pyamps-1.1.0.tar.gz
  • Upload date:
  • Size: 13.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.15

File hashes

Hashes for pyamps-1.1.0.tar.gz
Algorithm Hash digest
SHA256 bab821749e124ecfc3f42a357d7496cccebf3834778f95ed2f1bd6201ca82cd3
MD5 ee0384d8e50940f3486a4e1876c3242b
BLAKE2b-256 ae54776a5cff4ba4ffc8b7485ca8ef48981d75d272ab513b87e1f0def7567820

See more details on using hashes here.

File details

Details for the file pyamps-1.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pyamps-1.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 204.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.15

File hashes

Hashes for pyamps-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 988db133888e0b6f25d01401a06c070868c0ec935eb1b597a6c6495ef4d2cf39
MD5 4c281ec58ee4d8f134efa11e0e0356ba
BLAKE2b-256 7e12897f08cf130d42890b963b3ac3d4574745f4307c0997b139e8cd4cf3b8fe

See more details on using hashes here.

File details

Details for the file pyamps-1.1.0-py2.7.egg.

File metadata

  • Download URL: pyamps-1.1.0-py2.7.egg
  • Upload date:
  • Size: 245.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.15

File hashes

Hashes for pyamps-1.1.0-py2.7.egg
Algorithm Hash digest
SHA256 7fb570f10b22df42e0227ec07ea5262f8778b98fc5ffb55101e01aff2d47066c
MD5 258545583e149e4e2cd49de2cbac9019
BLAKE2b-256 2c67562d01e9bc8a3326c83a74b6b93888a19202bd2d3c5b9fe50c9894b82b6e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page