Python Space Physics Environment Data Analysis Software (SPEDAS)
Project description
pySPEDAS
pySPEDAS is an implementation of the SPEDAS framework in 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.
Projects Supported
- Advanced Composition Explorer (ACE)
- Cluster
- Colorado Student Space Weather Experiment (CSSWE)
- Deep Space Climate Observatory (DSCOVR)
- Equator-S
- Fast Auroral Snapshot Explorer (FAST)
- Geotail
- Geostationary Operational Environmental Satellite (GOES)
- Imager for Magnetopause-to-Aurora Global Exploration (IMAGE)
- Mars Atmosphere and Volatile Evolution (MAVEN)
- Magnetic Induction Coil Array (MICA)
- Magnetospheric Multiscale (MMS)
- OMNI
- Polar Orbiting Environmental Satellites (POES)
- Polar
- Parker Solar Probe (PSP)
- Van Allen Probes (RBSP)
- Solar Terrestrial Relations Observatory (STEREO)
- Time History of Events and Macroscale Interactions during Substorms (THEMIS)
- Two Wide-Angle Imaging Neutral-Atom Spectrometers (TWINS)
- Wind
Requirements
Python 3.5+ is required.
We recommend Anaconda which comes with a suite of packages useful for scientific data analysis.
Installation
pySPEDAS supports Windows, macOS and Linux. To get started, install the pyspedas
package using PyPI:
PyPI
pip install pyspedas --upgrade
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 formatstime_clip
: if set, clip the variables to the exact time range specified by thetrange
keywordsuffix
: string specifying a suffix to append to the loaded variablesvarformat
: string specifying which CDF variables to load; accepts the wild cards * and ?get_support_data
: if set, load the support variables from the CDFsdownloadonly
: if set, download the files but do not load them into tplotno_update
: if set, only load the data from the local cachenotplot
: 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
Code of Conduct
Additional Information
For pytplot, see: https://github.com/MAVENSDC/PyTplot
For cdflib, see: https://github.com/MAVENSDC/cdflib
For SPEDAS, see http://spedas.org/
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 pyspedas-0.9.22.tar.gz
.
File metadata
- Download URL: pyspedas-0.9.22.tar.gz
- Upload date:
- Size: 529.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c05c116cbedbff35b17137b42b716cb36dca8bfee239caa1be6cc27dc981c27 |
|
MD5 | b80c545da9888f981764915c6223cef8 |
|
BLAKE2b-256 | a08949a1b37d77d498803f92e92e7a15c21b33725019e044fd702ec14c230267 |
File details
Details for the file pyspedas-0.9.22-py2.py3-none-any.whl
.
File metadata
- Download URL: pyspedas-0.9.22-py2.py3-none-any.whl
- Upload date:
- Size: 627.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fb8da2c326b209d47c5ed8e650c470119a24a18c2dddd208a70fa8212aee66d |
|
MD5 | ff2b24ac2abefb6fcaa3439fd329cc21 |
|
BLAKE2b-256 | 4a903a645f8e4b508058ee269b47f6e255dab791d2bd215e2617003f2c992aaa |