A simple Python package to deal with main Space Physics WebServices (CDA,CSA,AMDA_Webservice,..) mainly written to ease development of SciQLop.
Space Physics made EASY
Speasy is an open source Python client for Space Physics web services such as CDAWEB or AMDA. Most space physics data analysis starts with finding which server provides which dataset then figuring out how to download them. This can be difficult specially for students or newcomers, Speasy try to remove all difficulties by providing an unique and simple API to access them all. Speasy aims to support as much as possible web services and also cover a maximum of features they propose.
Installing Speasy with pip (more details here):
$ pip install speasy # or $ pip install --user speasy
Getting data is as simple as:
import speasy as spz ace_mag = spz.get_data('amda/imf', "2016-6-2", "2016-6-5")
Where amda is the webservice and imf is the product id you will get with this request.
Using the dynamic inventory this can be even simpler:
import speasy as spz amda_tree = spz.inventory.data_tree.amda ace_mag = spz.get_data(amda_tree.Parameters.ACE.MFI.ace_imf_all.imf, "2016-6-2", "2016-6-5")
Will produce the exact same result than previous example but has the advantage to be easier to manipulate since you can discover available data from your favourite Python environment completion such as IPython or notebooks (might not work from IDEs).
This also works with SSCWEB, you can easily download trajectories:
import speasy as spz sscweb_tree = spz.inventory.data_tree.ssc solo = spz.get_data(sscweb_tree.Trajectories.solarorbiter, "2021-01-01", "2021-02-01")
Check out the documentation and examples at speasy documentation.
- Simple and intuitive API (spz.get_data to get them all)
- Pandas DataFrame like interface for variables
- Quick functions to convert a variable to a Pandas DataFrame
- Local cache to avoid repeating twice the same request
- Can take advantage of SciQLop dedicated poxy as a community backed ultra fast cache
- Full support of AMDA API.
See here for a complete list of examples.
- installing speasy on both python 3.7 or less and python 3.8 or plus at the same time doesn’t work since entries stored in cache by python 3.8+ are not readable by python 3.7-.
- Speasy is not a plotting package, while it provides basic plot features, it is not meant to produce publication ready figures.
- Adds support for all AMDA products, even private ones
- Adds support for AMDA credentials
- Adds dynamic inventory for AMDA and SSC
- Adds possibility to set config values from ENV
- Drops Python 3.6 support and adds 3.10
- New API documentation using numpydoc
- New user documentation using numpydoc
- Most code examples are tested with doctest
- Renames SSCWeb module get_orbit to get_trajectory
- Fix AMDA module bug #24 downloading multidimensional data fails
- Adds SPWC migration tool
- Rename SpwcVariable to SpeasyVariable
- Package renamed from SPWC to SPEASY
- Some doc and CI improvements
- sscweb trajectories are always in km
- Fixes minimum request duration for sscweb
- Full support for trajectories and 0.2 proxy version
- ccsweb/proxy: Fix missing coordinate system parameter
- Fix project URL on PyPi
- SSCWEB support to get satellites trajectories.
- Few bug fixes.
- Totally disabled cdf support for now.
- First release on PyPI.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for speasy-0.10.2-py2.py3-none-any.whl