spacepy¶
SpacePy: Space Science Tools for Python
SpacePy is a package of tools primarily aimed at the space science community. This __init__.py file sets the parameters for import statements.
If running the ipython shell, simply type ‘?’ after any command for help. ipython also offers tab completion, so hitting tab after ‘<module name>.’ will list all available functions, classes and variables.
Detailed HTML documentation is available online by typing:
>>> spacepy.help()
Most functionality is in spacepy’s submodules. Each module has specific help available:
Copyright 2010-2016 Los Alamos National Security, LLC.
Submodules
Lstar and Lmax calculation using artificial neural network (ANN) technique. |
|
Module for reading and dealing with AE9AP9 data files. |
|
Implementation of Coords class functions for coordinate transformations |
|
CTrans: Module for backend coordinate transformations in SpacePy |
|
Tools for manipulating paths, data, and subsets |
|
Data model conceptually similar to HDF5 and CDF. |
|
Module with some useful empirical models (plasmapause, magnetopause, Lmax) |
|
International Geomagnetic Reference Field model |
|
Wrapper for the fortran library irbem_lib |
|
Support for fast C-based versions of spacepy routines. |
|
Tools to read and process omni data (Qin-Denton, etc.) |
|
plot: SpacePy plotting routines |
|
PoPPy -- Point Processes in Python. |
|
Module for reading, manipulating, and visualizing BATS-R-US and SWMF output. |
|
Interface to the Common Data Format (CDF) library |
|
The realtime module fetches realtime data and forecasts from other sites |
|
Created on Mon Sep 10 13:09:11 2012 |
|
SeaPy -- Superposed Epoch in Python. |
|
Time conversion, manipulation and implementation of Ticktock class |
|
Toolbox of various functions and generic utilities. |
Functions
|
Decorator to deprecate a function/method |
|
Launches web browser with SpacePy documentation |
- spacepy.deprecated(version, message, docstring=None)[source]¶
Decorator to deprecate a function/method
Modifies a function so that calls to it raise
DeprecationWarning
and the docstring has a deprecation note added in accordance with numpydoc format- Parameters:
- versionstr
What is the first version where this was deprecated?
- messagestr
Message to include in the deprecation warning and in the docstring.
- Other Parameters:
- docstringstr
Added in version 0.2.2.
If specified,
docstring
will be added to the modified function’s docstring instead ofmessage
(which will only be used in the deprecation warning.) It can be a multi-line string (separated with\n
). It will be indented to match the existing docstring.
Notes
On Python 2, the deprecated function’s signature won’t be preserved. The function will work but will not have proper argument names listed in e.g.
help
.This warning will show as coming from SpacePy, not the deprecated function.
Examples
>>> import spacepy >>> @spacepy.deprecated('0.2.1', 'Use a different function instead', ... docstring='A different function is better\n' ... 'because of reasons xyz') ... def foo(x): ... '''This is a test function ... ... It may do many useful things. ... ''' ... return x + 1 >>> help(foo) Help on function foo in module __main__: foo(x) This is a test function .. deprecated:: 0.2.1 A different function is better because of reasons xyz It may do many useful things. >>> foo(2) DeprecationWarning: Use a different function instead 3
- spacepy.help(keyword=None)[source]¶
Launches web browser with SpacePy documentation
- Parameters:
- keywordstr, optional
Added in version 0.7.0.
Search for this keyword. If not specified, opens the front page of the documentation.
Notes
Online help is always for the latest release of SpacePy.
Examples
>>> import spacepy >>> spacepy.help("coordinates")