Space Physics made EASY

One function for in-situ space physics data.

Speasy fetches data from many space physics data centers with one call, and gives it back in one consistent format, ready for numpy, pandas, xarray or astropy.

import speasy as spz
ace_mag = spz.get_data("amda/imf", "2016-6-2", "2016-6-5")
ace_mag.plot()
ACE interplanetary magnetic field
$ python -m pip install speasy

What do you want to do?

📡 Get data for a study

You want a few products over a few intervals, in Python.

Read Speasy concepts, then pick your archive in Data Providers.

Speasy concepts
📈 Analyse it

Your data is in a SpeasyVariable. You want to select, compute, resample, filter or plot it.

Start with The SpeasyVariable, then NumPy compatibility, SciPy compatibility and Plotting, or browse the examples.

The SpeasyVariable
🗄️ Keep and share a study’s data

You want your notebook to give the same result next year, offline, or on a colleague’s machine.

Use a data index.

Keeping a study’s data
🧩 Bring your own data

Your data lives in files on a server or a disk, or you compute it yourself.

Describe an archive in a YAML file, or write a virtual product.

Direct archive access
⌨️ Work from the shell

You want to download, convert or pre-fetch data, or change settings, without writing Python.

See the speasy command.

Command line
🖱️ No code at all

You want to browse and plot data with your mouse.

SciQLop is a graphical interface built on Speasy.

https://github.com/SciQLop/SciQLop

Why Speasy?

Many data sources, one get_data(product, start, stop) call, one SpeasyVariable that converts to numpy, pandas, xarray and astropy
  • One call for many archives. AMDA, CDAWeb, ESA’s Cluster Science Archive, SSCWeb, CDPP 3DView, the U. Iowa ephemeris tool, every server of the HAPI server list, and your own archives. See Data Providers.

  • Find data by tab-completion. Browse spz.inventories.tree.<provider> in IPython or Jupyter, down to each product.

  • Fast on the second request. Data is cached on your disk, and a community cache server speeds up the first one. See Configuration.

  • Reproducible studies. A data index keeps exactly the data a study used, works offline, and exports as a single file.

  • Fits the tools you already use. Numpy functions work directly on Speasy variables, and they convert to pandas, xarray and astropy.

  • Also in Julia. Speasy.jl brings the same API to Julia.

Speasy only exists thanks to the data centers and teams who produce, archive and serve the data. Its development is supported by the CDPP.