Skip to main content

Python Space Physics Environment Data Analysis Software (SPEDAS)

Project description

pySPEDAS

Build Status Coverage Status Version License Status Downloads

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

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 or Anaconda:

PyPI

pip install pyspedas --upgrade

Anaconda

conda install -c spedas pyspedas

You can upgrade to the latest version using:

conda update -c spedas pyspedas

Usage

To get started, import pyspedas and pytplot:

import pyspedas
import pytplot

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 ?
  • 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

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

pyspedas-0.9.14.tar.gz (520.8 kB view details)

Uploaded Source

Built Distribution

pyspedas-0.9.14-py2.py3-none-any.whl (632.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pyspedas-0.9.14.tar.gz.

File metadata

  • Download URL: pyspedas-0.9.14.tar.gz
  • Upload date:
  • Size: 520.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for pyspedas-0.9.14.tar.gz
Algorithm Hash digest
SHA256 4bf2c2d5f9a9a6845c96f8e5851588f23156c1c7516d4d34e8b5b9c7c3ff77c2
MD5 075405bb316c5bd9eb87eb6494d76277
BLAKE2b-256 79e38b3daab3cd68031923d2cbbf4eab35a3c3393a2d54c778e5a09c9e542ae5

See more details on using hashes here.

File details

Details for the file pyspedas-0.9.14-py2.py3-none-any.whl.

File metadata

  • Download URL: pyspedas-0.9.14-py2.py3-none-any.whl
  • Upload date:
  • Size: 632.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.22.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for pyspedas-0.9.14-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5c292eb3abb6baecf9e16ea4ef200fce49ecd7e33a9184209429d179387988c6
MD5 fdd96621236f85c57635d79e4dd61efc
BLAKE2b-256 4ea450f8edd67db63ca6143bbcb50988af8eacb1210450c0202c7efc00428aab

See more details on using hashes here.

Supported by

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