pyrfu

Python routines to work with space data, particularly with MMS data. Also some general plasma routines.

https://github.com/louis-richard/irfu-python

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.0%) to scientific vocabulary

Keywords

python3 space-physics
Last synced: 4 months ago · JSON representation ·

Repository

Python routines to work with space data, particularly with MMS data. Also some general plasma routines.

Basic Info
  • Host: GitHub
  • Owner: louis-richard
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 68.7 MB
Statistics
  • Stars: 23
  • Watchers: 3
  • Forks: 5
  • Open Issues: 7
  • Releases: 13
Topics
python3 space-physics
Created over 5 years ago · Last pushed 7 months ago
Metadata Files
Readme Contributing License Citation

README.rst

.. -*- mode: rst -*-

pyRFU
=====

.. start-marker-intro-do-not-remove

.. |License| image:: https://img.shields.io/pypi/l/pyrfu
.. _License: https://opensource.org/licenses/MIT

.. |Python| image:: https://img.shields.io/pypi/pyversions/pyrfu.svg?logo=python
.. _Python: https://pypi.org/project/pyrfu/

.. |PyPi| image:: https://img.shields.io/pypi/v/pyrfu.svg?logo=pypi
.. _PyPi: https://pypi.org/project/pyrfu/

.. |Format| image:: https://img.shields.io/pypi/format/pyrfu?color=blue&logo=pypi
.. _Format: https://pypi.org/project/pyrfu/

.. |Wheel| image:: https://img.shields.io/pypi/wheel/pyrfu?logo=pypi&color=blue
.. _Wheel: https://pypi.org/project/pyrfu/

.. |Status| image:: https://img.shields.io/pypi/status/pyrfu?logo=pypi&color=blue
.. _Status: https://pypi.org/project/pyrfu/

.. |Downloads| image:: https://img.shields.io/pypi/dm/pyrfu?logo=pypi&color=blue
.. _Downloads: https://pypi.org/project/pyrfu/

.. |CI| image:: https://github.com/louis-richard/irfu-python/actions/workflows/tests.yml/badge.svg
.. _CI: https://github.com/louis-richard/irfu-python/actions/workflows/tests.yml

.. |PyLintB| image:: https://github.com/louis-richard/irfu-python/actions/workflows/pylint.yml/badge.svg
.. _PyLintB: https://github.com/louis-richard/irfu-python/actions/workflows/pylint.yml

.. |CodeQL| image:: https://github.com/louis-richard/irfu-python/actions/workflows/codeql.yml/badge.svg
.. _CodeQL: https://github.com/louis-richard/irfu-python/actions/workflows/codeql.yml

.. |CodeCov| image:: https://codecov.io/gh/louis-richard/irfu-python/coverage.svg?branch=main
.. _CodeCov: https://codecov.io/gh/louis-richard/irfu-python/branch/main

.. |Issues| image:: https://img.shields.io/github/issues/louis-richard/irfu-python?logo=github&color=9cf
.. _Issues: https://github.com/louis-richard/irfu-python/issues

.. |Commits| image:: https://img.shields.io/github/last-commit/louis-richard/irfu-python?logo=github&color=9cf
.. _Commits: https://github.com/louis-richard/irfu-python/commits/master

.. |Readthedocs| image:: https://img.shields.io/readthedocs/pyrfu?logo=read-the-docs&color=blueviolet
.. _Readthedocs: https://pyrfu.readthedocs.io/en/latest/

.. |Matrix| image:: https://matrix.to/img/matrix-badge.svg
.. _Matrix: https://matrix.to/#/#pyrfu:matrix.org

.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
.. _Black: https://github.com/psf/black

.. |Doi| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.10678695.svg
.. _Doi: https://doi.org/10.5281/zenodo.10678695

|License|_ |Python|_ |PyPi|_ |Format|_ |Wheel|_ |Status|_ |Downloads|_ |CI|_
|PyLintB|_ |CodeQL|_ |CodeCov|_ |Issues|_ |Commits|_ |Readthedocs|_ |Matrix|_
|Black|_ |Doi|_

The Python package ``pyrfu`` is a software based on the IRFU-MATLAB library to work with space data, particularly the Magnetospheric MultiScale (MMS) mission.

It is distributed under the open-source MIT license.

Quickstart
==========

Installing pyrfu with pip (`more details here `_):

.. code-block:: console

    $ python -m pip install pyrfu
    # or
    $ python -m pip install --user pyrfu

Import `pyrfu.mms `_ package with routines specific to work with the
Magnetospheric Multiscale mission (MMS)

.. code:: python

    from pyrfu import mms

Setup path to MMS data

.. code:: python

    mms.db_init("/Volumes/mms")


Load magnetic field and ion bulk velocity data

.. code:: python

    tint = ["2019-09-14T07:54:00.000", "2019-09-14T08:11:00.000"]
    b_gsm = mms.get_data("b_gsm_fgm_srvy_l2", tint, 1)
    v_gse_i = mms.get_data("vi_gse_fpi_fast_l2", tint, 1)


Import `pyrfu.pyrf `_ package with generic routines

.. code:: python

    from pyrfu import pyrf

Transform ion bulk velocity to geocentric solar magnetospheric (GSM) coordinates

.. code:: python

    v_gsm_i = pyrf.cotrans(v_gse_i, "gse>gsm")

Import `pyrfu.plot `_ package with plotting routines

.. code:: python

    from pyrfu import plot


Plot time series of magnetic field and ion bulk velocity

.. code:: python

    import matplotlib.pyplot as plt

    f, axs = plt.subplots(2, sharex="all")
    plot.plot_line(axs[0], b_gsm)
    axs[0].set_ylabel("$B~[\\mathrm{nT}]$")
    axs[0].legend(["$B_{x}$", "$B_{y}$", "$B_{z}$"], ncol=4)

    plot.plot_line(axs[1], v_gsm_i)
    axs[1].set_ylabel("$V_i~[\\mathrm{km}~\\mathrm{s}^{-1}]$")
    axs[1].legend(["$V_{ix}$", "$V_{iy}$", "$V_{iz}$"], ncol=4)

.. end-marker-intro-do-not-remove

Documentation
=============
Full documentation can be found on `pyrfu.readthedocs.io `_

Examples
========
A list of examples is available `here `_

Credits
=======
This software was developed by Louis RICHARD (louisr@irfu.se) based on the IRFU-MATLAB library.

Acknowledgement
===============
Please use the following to acknowledge use of pyrfu in your publications:
Data analysis was performed using the pyrfu analysis package available at https://github.com/louis-richard/irfu-python

Additional Information
======================
MMS Science Data Center: https://lasp.colorado.edu/mms/sdc/public/

MMS Datasets: https://lasp.colorado.edu/mms/sdc/public/datasets/

MMS - Goddard Space Flight Center: http://mms.gsfc.nasa.gov/

Owner

  • Name: Louis Richard
  • Login: louis-richard
  • Kind: user
  • Location: Uppsala, Sweden
  • Company: Swedish Institute of Space Physics (IRF)

PhD Student @ Swedish Institute of Space Physics (IRF)

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
type: software
authors:
  - name: "PyRFU team"
  - family-names: Richard
    given-names: Louis
    affiliation: IRF Uppsala, Sweden
    orcid: "https://orcid.org/0000-0003-3446-7322"
  - family-names: Khotyaintsev
    given-names: Yuri
    affiliation: IRF Uppsala, Sweden
    orcid: "https://orcid.org/0000-0001-5550-3113"
  - family-names: Vaivads
    given-names: Andris
    affiliation: KTH, Sweden
    orcid: "https://orcid.org/0000-0003-1654-841X"
  - family-names: Graham
    given-names: Daniel
    affiliation: IRF Uppsala, Sweden
    orcid: "https://orcid.org/0000-0002-1046-746X"
  - family-names: Norgren
    given-names: Cecilia
    affiliation: IRF Uppsala, Sweden
    orcid: "https://orcid.org/0000-0002-6561-2337"
  - family-names: Johlander
    given-names: Andreas
    affiliation: Swedish Defence Research Agency, Sweden
    orcid: "https://orcid.org/0000-0001-7714-1870"
title: "pyrfu"
abstract: "An Open-Source Python Package for Advanced In-Situ Space Plasma Analysis."
license: MIT
doi: 10.5281/zenodo.10678695
url: "https://pyrfu.readthedocs.io/"
repository-code: 'https://github.com/louis-richard/irfu-python'

GitHub Events

Total
  • Create event: 5
  • Issues event: 5
  • Release event: 4
  • Watch event: 8
  • Issue comment event: 5
  • Member event: 1
  • Push event: 32
  • Pull request event: 11
  • Fork event: 2
Last Year
  • Create event: 5
  • Issues event: 5
  • Release event: 4
  • Watch event: 8
  • Issue comment event: 5
  • Member event: 1
  • Push event: 32
  • Pull request event: 11
  • Fork event: 2

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 353
  • Total Committers: 2
  • Avg Commits per committer: 176.5
  • Development Distribution Score (DDS): 0.048
Top Committers
Name Email Commits
louis-richard l****r@i****e 336
louis-richard 6****d@u****m 17
Committer Domains (Top 20 + Academic)
irfu.se: 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 15
  • Total pull requests: 15
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 18 days
  • Total issue authors: 7
  • Total pull request authors: 2
  • Average comments per issue: 1.07
  • Average comments per pull request: 0.2
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 4
  • Pull requests: 7
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 18 minutes
  • Issue authors: 3
  • Pull request authors: 1
  • Average comments per issue: 1.25
  • Average comments per pull request: 0.0
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • harryclewis (7)
  • louis-richard (3)
  • CLiptrott (1)
  • sapols (1)
  • ChiZhang123456 (1)
  • zhang-chi-IGGCAS (1)
  • Zhugexiaoyuanyuan (1)
Pull Request Authors
  • louis-richard (16)
  • dependabot[bot] (5)
Top Labels
Issue Labels
enhancement (1) dependencies (1)
Pull Request Labels
dependencies (5)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 233 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 96
  • Total maintainers: 1
pypi.org: pyrfu

Python Space Physics (RymdFysik) Utilities

  • Documentation: https://pyrfu.readthedocs.io/
  • License: MIT License Copyright (c) 2020 L. RICHARD Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 2.4.17
    published 9 months ago
  • Versions: 96
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 233 Last month
Rankings
Downloads: 9.2%
Dependent packages count: 10.1%
Average: 13.6%
Dependent repos count: 21.6%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/codeql.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite
.github/workflows/publish-to-pypi.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v2 composite
.github/workflows/pylint.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/tests.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • codecov/codecov-action v3 composite
docs/requirements.txt pypi
  • nbsphinx ==0.9.2
  • numpydoc ==1.5.0
  • pydata-sphinx-theme ==0.13.3
  • sphinx ==7.0.0
  • sphinx-codeautolink ==0.15.0
  • sphinx-copybutton ==0.5.2
  • sphinx-gallery ==0.13.0
  • sphinxcontrib-apidoc ==0.3.0
pyproject.toml pypi
  • cdflib >=1.0.4
  • geopack >=1.0.9
  • matplotlib >=3.5.2
  • numba >=0.54.1
  • numpy >=1.20.3,<1.25.0
  • pandas >=1.3.4
  • python-dateutil >=2.8.2
  • requests >=2.26.0
  • scipy >=1.7.3
  • tqdm >=4.62.3
  • xarray >=0.20.1
requirements.txt pypi
  • cdflib >=1.2.0
  • geopack ==1.0.10
  • matplotlib >=3.8.0
  • numba >=0.59.0
  • numpy <1.27>=1.22
  • pandas ==1.5.0
  • pycdfpp ==0.6.0
  • python-dateutil ==2.8.2
  • requests <2.32.0,>=2.26.0
  • scipy <1.11.0,>=1.7.3
  • tqdm <4.66.0,>=4.62.3
  • xarray ==2023.9.0