Skip to main content

Python Space Physics (RymdFysik) Utilities

Project description

pyRFU

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):

$ 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)

from pyrfu import mms

Setup path to MMS data

mms.db_init(default="local", local="/Volumes/mms")

Load magnetic field and ion bulk velocity data

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

from pyrfu import pyrf

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

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

Import pyrfu.plot package with plotting routines

from pyrfu.plot import plot_line

Plot time series of magnetic field and ion bulk velocity

import matplotlib.pyplot as plt

f, axs = plt.subplots(2, sharex="all")
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_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)

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/

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrfu-2.4.21.tar.gz (300.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrfu-2.4.21-py3-none-any.whl (444.7 kB view details)

Uploaded Python 3

File details

Details for the file pyrfu-2.4.21.tar.gz.

File metadata

  • Download URL: pyrfu-2.4.21.tar.gz
  • Upload date:
  • Size: 300.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for pyrfu-2.4.21.tar.gz
Algorithm Hash digest
SHA256 2efc3973c3693b1e1a0c4fadb8cba5dffd778e3cdc99f87097143017cab456f0
MD5 d37192b25b22755f162ee7b8477f574f
BLAKE2b-256 5f74555a8dbaaaaa2934cd73db435a7a2643831d970a22b30573d12392f3b759

See more details on using hashes here.

File details

Details for the file pyrfu-2.4.21-py3-none-any.whl.

File metadata

  • Download URL: pyrfu-2.4.21-py3-none-any.whl
  • Upload date:
  • Size: 444.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for pyrfu-2.4.21-py3-none-any.whl
Algorithm Hash digest
SHA256 4e2257df1458ed0c2e7bf08a35f36f8a76135167234e1179fd7f3efacd5ed697
MD5 626a80234a60b10c82a663fa287b8998
BLAKE2b-256 294bdfa692288cae3f5ac278c5ef546df898bb8b5085c90bf0ab8876912f0596

See more details on using hashes here.

Supported by

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