Conference site ยป Proceedings

SpacePy - A Python-based Library of Tools for the Space Sciences

Steven K. Morley
Los Alamos National Laboratory

Daniel T. Welling
Los Alamos National Laboratory

Josef Koller
Los Alamos National Laboratory

Brian A. Larsen
Los Alamos National Laboratory

Michael G. Henderson
Los Alamos National Laboratory

Jonathan Niehof
Los Alamos National Laboratory

Abstract

Space science deals with the bodies within the solar system and the interplanetary medium; the primary focus is on atmospheres and above—at Earth the short timescale variation in the the geomagnetic field, the Van Allen radiation belts and the deposition of energy into the upper atmosphere are key areas of investigation.

SpacePy is a package for Python, targeted at the space sciences, that aims to make basic data analysis, modeling and visualization easier. It builds on the capabilities of the well-known NumPy and matplotlib packages. Publication quality output direct from analyses is emphasized. The SpacePy project seeks to promote accurate and open research standards by providing an open environment for code development. In the space physics community there has long been a significant reliance on proprietary languages that restrict free transfer of data and reproducibility of results. By providing a comprehensive library of widely-used analysis and visualization tools in a free, modern and intuitive language, we hope that this reliance will be diminished for non-commercial users.

SpacePy includes implementations of widely used empirical models, statistical techniques used frequently in space science (e.g. superposed epoch analysis), and interfaces to advanced tools such as electron drift shell calculations for radiation belt studies. SpacePy also provides analysis and visualization tools for components of the Space Weather Modeling Framework including streamline tracing in vector fields. Further development is currently underway. External libraries, which include well-known magnetic field models, high-precision time conversions and coordinate transformations are accessed from Python using ctypes and f2py. The rest of the tools have been implemented directly in Python.

The provision of open-source tools to perform common tasks will provide openness in the analysis methods employed in scientific studies and will give access to advanced tools to all space scientists, currently distribution is limited to non-commercial use.

Keywords

astronomy, atmospheric science, space weather, visualization

Bibtex entry

Full text PDF