Python Space Physics (RymdFysik) Utilities
Project description
pyRFU
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("/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 import plot
Plot time series of magnetic field and ion bulk velocity
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)
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
Built Distribution
File details
Details for the file pyrfu-2.4.14.tar.gz
.
File metadata
- Download URL: pyrfu-2.4.14.tar.gz
- Upload date:
- Size: 282.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 760f9cc0ba91a6af31a0885ad23a0f97b23c2f4fce88f0e407132de94d02cbb4 |
|
MD5 | 0612af23d43f56ad437b2281ece652c6 |
|
BLAKE2b-256 | 685d69ba480d1d3dc43bce1e4ca66eea5fe3b6da5e7731bada74f9dc7250f42b |
File details
Details for the file pyrfu-2.4.14-py3-none-any.whl
.
File metadata
- Download URL: pyrfu-2.4.14-py3-none-any.whl
- Upload date:
- Size: 415.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b087fedce0331459690a29dae3d5a2d65357799b910c5ed47e25c84c9e17fc2c |
|
MD5 | 3137741fd793fd190cad1736e87afd00 |
|
BLAKE2b-256 | 2580e19c96a59059d9c53c81a50883c55c001587a0b22ad80d5a9b0b0db2dc97 |