SpacePy Capabilities

This page lists some capabilities of SpacePy and, in some cases, of other packages that might be of interest to SpacePy users. It is organized by topic; searching within this page is recommended. See the module reference for every class/function available in SpacePy, organized by module.

Array manipulation

Various toolbox functions are useful in manipulating NumPy arrays. datamanager also contains many functions for indexing arrays and manipulating them in ways that do not depend on the interpretation of their contents.

Coordinate Transforms

coordinates provides a class for transforming among most coordinate systems used in Earth magnetospheric and ionospheric physics.

It also provides generalized coordinate transforms via quaternions.

File I/O

pycdf provides reading and writing of NASA CDF files, with additional functionality for those with ISTP-compliant metadata.

datamodel provides easy reading and writing of HDF5 and most netCDF files. It also supports reading and writing ASCII-based data files with rich JSON metadata, supported by tools such as Autoplot.

numpy.loadtxt() and related functions are helpful for reading various “plain-text” files into numerical arrays. reads IDL savesets. supports FITS files.


ae9ap9 supports import and visualization of data from the AE9/AP9 empirical radiation belt model.

empiricals implements several simple empirical and/or analytic models for magnetospheric and solar wind phenomena, including the plasmapause location, the Shue magnetopause model, and solar wind temperature.

pybats supports output analysis and visualization of many models compatible with the Space Weather Modeling Framework, including the BATS-R-US global MHD model and the RAM-SCB ring current model.

omni provides ready access to the OMNI near-Earth solar wind dataset, useful for model inputs.


poppy supports determining confidence intervals on

population metrics using the non-parametric bootstrap method.

Time conversions

time contains a class that easily allows time to be represented in, and converted among, many representations, including Python datetimes, ISO time strings, GPS time, TAI, etc.

Time series analysis and correlations

poppy implements association analysis to determine the relationship between point-in-time events.

seapy implements superposed epoch analysis, the statistical evaluation of the time evolution of a system relative to a set of starting epochs.


plot provides tools useful in making publication-quality plots with the matplotlib toolkit.