pyamps


Namepyamps JSON
Version 1.6 PyPI version JSON
download
home_pagehttps://github.com/klaundal/pyAMPS
SummaryCalculate and plot maps of the model Average Magnetic field and Polar current System (AMPS)
upload_time2024-03-31 09:44:40
maintainerNone
docs_urlNone
authorKarl M. Laundal
requires_pythonNone
licenseMIT
keywords amps average magnetic field and polar current system magnetic field spherical harmonics model associated legendre polynomial mlt magnetic local time subsolar dipole coordinates converting
VCS
bugtrack_url
requirements setuptools future numpy matplotlib scipy toolz pandas dask apexpy
Travis-CI
coveralls test coverage
            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.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 <https://agupubs.onlinelibrary.wiley.com/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 <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
      - |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

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

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 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/klaundal/pyAMPS",
    "name": "pyamps",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "AMPS, Average Magnetic field and Polar current System, magnetic field, spherical harmonics model, associated Legendre polynomial, mlt, magnetic local time, subsolar, dipole coordinates, converting",
    "author": "Karl M. Laundal",
    "author_email": "karl.laundal@ift.uib.no",
    "download_url": "https://files.pythonhosted.org/packages/81/27/22b516c7a6f53078cc27227c0338dffdda71ac41d39f72738ec0e68f45e7/pyamps-1.6.tar.gz",
    "platform": null,
    "description": "Overview\n========\n|docs| |version| |doi|\n\nPython interface for the Average Magnetic field and Polar current System (AMPS) model.\n\nThe 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.\n\npyAMPS 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:\n\n- field aligned current (scalar)\n- divergence-free current function (scalar)\n- divergence-free part of horizontal current (vector)\n- curl-free part of horizontal current (vector)\n- total horizontal current (vector)\n- eastward or northward ground perturbation corresponding to equivalent current (scalars)\n\nFor questions and comments, please contact karl.laundal at ift.uib.no\n\nInstallation\n------------\n\nUsing pip::\n\n    pip install pyamps\n\n\nDependencies:\n\n- numpy\n- pandas\n- dask\n- matplotlib (with LaTeX support, see https://matplotlib.org/users/usetex.html)\n- scipy (scipy.interpolate for plotting purposes)\n- apexpy (magnetic coordinate conversion)\n\nQuick Start\n-----------\n.. code-block:: python\n\n    >>> # initialize by supplying a set of external conditions:\n    >>> from pyamps import AMPS\n    >>> m = AMPS(350, # Solar wind velocity in km/s \n                  -4, # IMF By (GSM) in nT\n                  -3, # IMF Bz (GSM) in nT, \n                  20, # dipole tilt angle in degrees \n                  80) # F107_index\n    >>> # make summary plot:\n    >>> m.plot_currents()\n\n.. image:: docs/static/example_plot.png\n    :alt: Field-aligned (colour) and horizontal (pins) currents\n    \n.. code-block:: python\n\n    >>> # All the different current functions can be calculated on\n    >>> # a pre-defined or user-specified grid.\n    >>> import numpy as np \n    >>> mlat, mlt = np.array([75, -75]), np.array([12, 12])\n    >>> Ju = m.get_upward_current(mlat, mlt)\n    >>> Ju\n    array([ 0.23323377, -0.05599236])\n\nDocumentation\n-------------\nSee `http://pyamps.readthedocs.io` \n\nReferences\n----------\nLaundal, 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 <https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2018JA025387>`_\n\n*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*\n\nSee also:\nLaundal, 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>`_ \n\n\nAcknowledgments\n---------------\nThe 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\n\n\nBadges\n------\n\n.. list-table::\n    :stub-columns: 1\n\n    * - docs\n      - |docs|\n    * - tests\n      - |requires| \n    * - package\n      - | |version|\n\n.. |docs| image:: https://readthedocs.org/projects/pyamps/badge/?version=latest\n    :target: http://pyamps.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\n.. |version| image:: https://badge.fury.io/py/pyamps.svg\n    :alt: PyPI Package latest release\n    :target: https://badge.fury.io/py/pyamps\n\n.. |coveralls| image:: https://coveralls.io/repos/github/klaundal/pyAMPS/badge.svg\n    :target: https://coveralls.io/github/klaundal/pyAMPS\n    :alt: Coverage Status\n\n.. |requires| image:: https://requires.io/github/klaundal/pyAMPS/requirements.svg?branch=master\n    :target: https://requires.io/github/klaundal/pyAMPS/requirements/?branch=master\n    :alt: Requirements Status\n\n.. |doi| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1182931.svg\n    :target: https://doi.org/10.5281/zenodo.1182931\n\nChangelog\n=========\n\nVersion 1.1: Added support for calculations on regular mlat/mlt grids with less memory use\nVersion 1.4: Updated model vectors and fixed a bug which affected toroidal field\nVersion 1.4.1: Now using IGRF-13 when calculating dipole position (used in mlt_utils)\nVersion 1.5: Updated model vector + removed LaTeX dependencies + a couple of minor fixes\nVersion 1.6: Updated model vector + removed deprecated Multi-dimensional indexing \n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Calculate and plot maps of the model Average Magnetic field and Polar current System (AMPS)",
    "version": "1.6",
    "project_urls": {
        "Homepage": "https://github.com/klaundal/pyAMPS"
    },
    "split_keywords": [
        "amps",
        " average magnetic field and polar current system",
        " magnetic field",
        " spherical harmonics model",
        " associated legendre polynomial",
        " mlt",
        " magnetic local time",
        " subsolar",
        " dipole coordinates",
        " converting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "83914ce3562e88c72abb08828df929bef559f01f8c63b9f261776427e34dc5fb",
                "md5": "ac4ef818c1a17d65a25e4a7d801388c9",
                "sha256": "81b175ecf63f7cb126d8fc84f0d20d8a33ee04882909b14cea01121d28e90ee8"
            },
            "downloads": -1,
            "filename": "pyamps-1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ac4ef818c1a17d65a25e4a7d801388c9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 1059959,
            "upload_time": "2024-03-31T09:44:23",
            "upload_time_iso_8601": "2024-03-31T09:44:23.463450Z",
            "url": "https://files.pythonhosted.org/packages/83/91/4ce3562e88c72abb08828df929bef559f01f8c63b9f261776427e34dc5fb/pyamps-1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "812722b516c7a6f53078cc27227c0338dffdda71ac41d39f72738ec0e68f45e7",
                "md5": "9f0ad99d752054c41884a64ae567353c",
                "sha256": "44f26e291d307f4ad8c2e108fc4168710276ecee6d341b5576cb3de4b2df1a81"
            },
            "downloads": -1,
            "filename": "pyamps-1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "9f0ad99d752054c41884a64ae567353c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14642272,
            "upload_time": "2024-03-31T09:44:40",
            "upload_time_iso_8601": "2024-03-31T09:44:40.100026Z",
            "url": "https://files.pythonhosted.org/packages/81/27/22b516c7a6f53078cc27227c0338dffdda71ac41d39f72738ec0e68f45e7/pyamps-1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-31 09:44:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "klaundal",
    "github_project": "pyAMPS",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": false,
    "requirements": [
        {
            "name": "setuptools",
            "specs": [
                [
                    ">=",
                    "30.3.0"
                ]
            ]
        },
        {
            "name": "future",
            "specs": [
                [
                    ">=",
                    "0.16"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.14"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": []
        },
        {
            "name": "scipy",
            "specs": [
                [
                    ">=",
                    "0.9"
                ]
            ]
        },
        {
            "name": "toolz",
            "specs": [
                [
                    ">=",
                    "0.8"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    ">=",
                    "0.20"
                ]
            ]
        },
        {
            "name": "dask",
            "specs": []
        },
        {
            "name": "apexpy",
            "specs": [
                [
                    ">=",
                    "1.0"
                ]
            ]
        }
    ],
    "lcname": "pyamps"
}
        
Elapsed time: 0.20987s