Skip to main content

A Python Wrapper for the NAIF CSPICE Toolkit

Project description

Continuous Integration Code Coverage Docs Chat Citation
Travis Build Status Windows Build Status Coverage Status Documentation Status Join the chat Citation

SpiceyPy is a Python wrapper for the NAIF C SPICE Toolkit (N65), compatible with Python 2 and 3, written using ctypes.

Introduction

The SPICE Toolkit. In short it is an essential tool for scientists and engineers alike in the planetary science field for Solar System Geometry.
Please visit the NAIF website for more details.

IMPORTANT: I have no current affiliation with NASA, NAIF, or JPL. The code is provided “as is”, use at your own risk.

Travis and Coveralls Status

A secondary list (non-maintained) of what functions have been wrapped can be found here.
A majority of SPICE functions have written wrappers along with tests mainly derived from the CSPICE documentation.
A small number of functions have no wrapper functions of any kind due to lack of necessity, they are labeled as “Skipped”.
The rest of the functions generally have written wrapper functions but remain untested, mostly due to lack of SPICE documentation (the EK kernel functions are one example of this).
Functions that utilize call-backs have not been wrapped or tested yet, although ctypes does support call-backs so they will be revisited.
If you encounter an error with a function please report it or push a PR with a fix, with ctypes it is easy!

Documentation

The SpiceyPy docs are available at: spiceypy.readthedocs.org.

The documentation for SpiceyPy is intentionally abridged so as to utilize the excellent documentation provided by the NAIF.
Please refer to C and IDL documentation available on the NAIF website for in-depth explanations. Each function has a link to the corresponding C function in the NAIF docs at a minimum.

How to Help

Feedback is always welcomed, if you discover that a function is not working as expected, submit an issue detailing how
to reproduce the problem. If you utilize SpiceyPy frequently please consider contributing to the project by:
writing a test, writing a wrapper, doing some code review, adding documentation, improving infrastructure code (like setup.py), or by spreading the word.

Citing SpiceyPy

If the use of SpiceyPy is used in a publication, please consider citing SpiceyPy and the SPICE toolkit. The citation information for SPICE can be found on the NAIF website. To cite SpiceyPy please utalize the zenodo DOI badge at the top of this readme.

Design Goals

  • [x] Majorly complete coverage of all existing CSPICE commands, within reason.
  • [x] Useful, but abbreviated commenting on functions.
  • [x] Python 2 and 3 support.
  • [x] Numpy Support.
  • [x] Enable vectorization of certain functions to be more like ICY.

Installation

First install the dependencies (numpy, six, pytest) for the project. Then run pip install spiceypy to install from pypi.

If you wish to install spiceypy by hand first download the project. Then extract it, and inside just run python setup.py install. If you are updating to the newest commit/version, be sure to completely delete the SpiceyPy folder in your site-packages. This is normally by running pip uninstall spiceypy

Known Working Environments:

SpicyPy is now compatible with modern Linux, Mac, and Windows environments. Since the package is a wrapper, any environment not supported by the NAIF is similarly not supported by SpiceyPy. Below is a list of known working environments. If you run into issues with your system please submit an issue with details.

  • Python 3.4.1 64-bit Mac OS X 10.10.4
  • Python 3.3.3 64-bit Mac OS X 10.9.4
  • Python 2.7.5 64-bit Mac OS X 10.9.4
  • Python 3.3.3 64-bit Mac OS X 10.9.2
  • Python 2.7.5 64-bit Mac OS X 10.9.2
  • Python 3.2.3 64-bit Ubuntu 12.04 LTS (VM)
  • Python 3.4.3 64-bit Windows (Appveyor), using Visual Studio 2013
  • Python 3.4.3 32-bit Windows (Appveyor), using Visual Studio 2013
  • Python 2.7.9 64-bit Windows (Appveyor), using Visual Studio 2013
  • Python 2.7.9 32-bit Windows (Appveyor), using Visual Studio 2013

Acknowledgements

DaRasch wrote spiceminer, which I looked at to get SpiceCells working, thanks!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for spiceypy, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size spiceypy-1.0.0-cp27-none-win32.whl (1.0 MB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size spiceypy-1.0.0-cp27-none-win_amd64.whl (1.1 MB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size spiceypy-1.0.0-cp34-none-win32.whl (1.0 MB) File type Wheel Python version cp34 Upload date Hashes View hashes
Filename, size spiceypy-1.0.0-cp34-none-win_amd64.whl (1.1 MB) File type Wheel Python version cp34 Upload date Hashes View hashes
Filename, size spiceypy-1.0.0-cp35-none-win32.whl (1.0 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size spiceypy-1.0.0-cp35-none-win_amd64.whl (1.1 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size spiceypy-1.0.0.tar.gz (92.9 kB) File type Source Python version None Upload date Hashes View hashes
Filename, size spiceypy-1.0.0.zip (100.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page