All Projects → spedas → pyspedas

spedas / pyspedas

Licence: MIT license
Python-based Space Physics Environment Data Analysis Software

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pyspedas

SimpleKeplerOrbits
Unity3d static 2-body orbits simulation
Stars: ✭ 76 (-15.56%)
Mutual labels:  space, space-physics
apod chrome extension
Astronomy Picture of the Day (APOD) Chrome Extension for the new tab screen
Stars: ✭ 16 (-82.22%)
Mutual labels:  space
SpaceX
PowerShell module to interact with api.spacexdata.com
Stars: ✭ 25 (-72.22%)
Mutual labels:  space
TerraGov-Marine-Corps
TGMC: TerraGov Marine Corps, a SS13 mod
Stars: ✭ 109 (+21.11%)
Mutual labels:  space
stellarstation-api
The API definition for StellarStation.
Stars: ✭ 22 (-75.56%)
Mutual labels:  space
api
Open Source API for Launched Spacecrafts & Rockets data of ISRO🚀
Stars: ✭ 62 (-31.11%)
Mutual labels:  space
SS3D
Space Station 3D, another remake of SS13, but with an extra D.
Stars: ✭ 180 (+100%)
Mutual labels:  space
AstroAdventures-Android
A mini-game for Android like Space Invaders, where the entire game engine has been written from scratch, in Kotlin. And every visual asset in the game is drawn with code, using Android Custom Views.
Stars: ✭ 50 (-44.44%)
Mutual labels:  space
rust-spice
WOW! The complete NASA/NAIF Spice toolkit is actually usable on Rust
Stars: ✭ 31 (-65.56%)
Mutual labels:  space
HeySpace
中英文混排自动加空格
Stars: ✭ 35 (-61.11%)
Mutual labels:  space
pytorch integrated cell
Integrated Cell project implemented in pytorch
Stars: ✭ 40 (-55.56%)
Mutual labels:  science-research
GuneyOzsanOutThereMusicVideo
Procedurally generated, real-time, demoscene style, open source music video made with Unity 3D for Out There by Guney Ozsan.
Stars: ✭ 26 (-71.11%)
Mutual labels:  space
scitizen
Scitizen - Help scientific research for the benefit of mankind and humanity 🔬
Stars: ✭ 21 (-76.67%)
Mutual labels:  science-research
nuu
SciFi-MMORPG-2d-Scrolling-Action-Trade-Adventure
Stars: ✭ 17 (-81.11%)
Mutual labels:  space
PWSat2OBC
Source code of the PW-Sat2 On Board Computer (OBC) software.
Stars: ✭ 53 (-41.11%)
Mutual labels:  space
awesome-spacehackers
A curated list of aerospace/space related data and code resources for a community of independent hackers dedicated to furthering humanity's knowledge of the universe through open collaboration.
Stars: ✭ 36 (-60%)
Mutual labels:  space
8 bit hubble
Generate random pixel art galaxies! In honor of Hubble Space Telescope, SNES videogames and Bob Ross
Stars: ✭ 59 (-34.44%)
Mutual labels:  space
public regulated data types
Regulated DSDL definitions for Cyphal (standard and third-party)
Stars: ✭ 62 (-31.11%)
Mutual labels:  space
keeptrack.space
🌎📡 TypeScript Astrodynamics Software for Non-Engineers. 3D Visualization of satellite data and the sensors that track them.
Stars: ✭ 61 (-32.22%)
Mutual labels:  space
senpai
Molecular dynamics simulation software
Stars: ✭ 124 (+37.78%)
Mutual labels:  science-research

PySPEDAS

build Coverage Status Version Language grade: Python Status License

PySPEDAS is an implementation of the SPEDAS framework for Python.

The Space Physics Environment Data Analysis Software (SPEDAS) framework is written in IDL and contains data loading, data analysis and data plotting tools for various scientific missions (NASA, NOAA, etc.) and ground magnetometers.

Please see our documentation at:

https://pyspedas.readthedocs.io/

Projects Supported

Requirements

Python 3.7+ is required.

We recommend Anaconda which comes with a suite of packages useful for scientific data analysis. Step-by-step instructions for installing Anaconda can be found at: Windows, macOS, Linux

Installation

Setup your Virtual Environment

To avoid potential dependency issues with other Python packages, we suggest creating a virtual environment for PySPEDAS; you can create a virtual environment in your terminal with:

python -m venv pyspedas

To enter your virtual environment, run the 'activate' script:

Windows

.\pyspedas\Scripts\activate

macOS and Linux

source pyspedas/bin/activate

Using Jupyter notebooks with your virtual environment

To get virtual environments working with Jupyter, in the virtual environment, type:

pip install ipykernel
python -m ipykernel install --user --name pyspedas --display-name "Python (pySPEDAS)"

(note: "pyspedas" is the name of your virtual environment)

Then once you open the notebook, go to "Kernel" then "Change kernel" and select the one named "Python (PySPEDAS)"

Install

PySPEDAS supports Windows, macOS and Linux. To get started, install the pyspedas package using PyPI:

pip install pyspedas

Upgrade

To upgrade to the latest version of PySPEDAS:

pip install pyspedas --upgrade

Local Data Directories

The recommended way of setting your local data directory is to set the SPEDAS_DATA_DIR environment variable. SPEDAS_DATA_DIR acts as a root data directory for all missions, and will also be used by IDL (if you’re running a recent copy of the bleeding edge).

Mission specific data directories (e.g., MMS_DATA_DIR for MMS, THM_DATA_DIR for THEMIS) can also be set, and these will override SPEDAS_DATA_DIR

Usage

To get started, import pyspedas and pytplot:

import pyspedas
from pytplot import tplot

You can load data into tplot variables by calling pyspedas.mission.instrument(), e.g.,

To load and plot 1 day of THEMIS FGM data for probe 'd':

thm_fgm = pyspedas.themis.fgm(trange=['2015-10-16', '2015-10-17'], probe='d')

tplot(['thd_fgs_gse', 'thd_fgs_gsm'])

To load and plot 2 minutes of MMS burst mode FGM data:

mms_fgm = pyspedas.mms.fgm(trange=['2015-10-16/13:05:30', '2015-10-16/13:07:30'], data_rate='brst')

tplot(['mms1_fgm_b_gse_brst_l2', 'mms1_fgm_b_gsm_brst_l2'])

Note: by default, PySPEDAS loads all data contained in CDFs found within the requested time range; this can potentially load data outside of your requested trange. To remove the data outside of your requested trange, set the time_clip keyword to True

To load and plot 6 hours of PSP SWEAP/SPAN-i data:

spi_vars = pyspedas.psp.spi(trange=['2018-11-5', '2018-11-5/06:00'], time_clip=True)

tplot(['DENS', 'VEL', 'T_TENSOR', 'TEMP'])

To download 5 days of STEREO magnetometer data (but not load them into tplot variables):

stereo_files = pyspedas.stereo.mag(trange=['2013-11-1', '2013-11-6'], downloadonly=True)

Standard Options

  • trange: two-element list specifying the time range of interest. This keyword accepts a wide range of formats
  • time_clip: if set, clip the variables to the exact time range specified by the trange keyword
  • suffix: string specifying a suffix to append to the loaded variables
  • varformat: string specifying which CDF variables to load; accepts the wild cards * and ?
  • varnames: string specifying which CDF variables to load (exact names)
  • get_support_data: if set, load the support variables from the CDFs
  • downloadonly: if set, download the files but do not load them into tplot
  • no_update: if set, only load the data from the local cache
  • notplot: if set, load the variables into dictionaries containing numpy arrays (instead of creating the tplot variables)

Getting Help

To find the options supported, call help on the instrument function you're interested in:

help(pyspedas.themis.fgm)

You can ask questions by creating an issue or by joining the SPEDAS mailing list.

Contributing

We welcome contributions to PySPEDAS; to learn how you can contribute, please see our Contributing Guide

Code of Conduct

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. To learn more, please see our Code of Conduct.

Additional Information

For examples of pyspedas, see: https://github.com/spedas/pyspedas_examples

For MMS examples, see: https://github.com/spedas/mms-examples

For pytplot, see: https://github.com/MAVENSDC/PyTplot

For cdflib, see: https://github.com/MAVENSDC/cdflib

For SPEDAS, see http://spedas.org/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].