Skip to main content

Python package for NAIF WebGeoCalc API

Project description

Build Coverage PyPI Status Version Python License Examples

In december 2018, JPL/NAIF announced an experimental API RESTful interface for their new WebGeocalc server (which make online SPICE calculations). Documentation and JavaScript examples are already available.

This package is an early attempt to provide a Python interface to make SPICE calculation through this API.

Install

With pip:

$ pip install webgeocalc

With the source files:

$ git clone https://github.com/seignovert/python-webgeocalc.git webgeocalc
$ cd webgeocalc ; python setup.py install

Usage

>>> from webgeocalc import API

>>> API.url
'https://wgc2.jpl.nasa.gov:8443/webgeocalc/api'

>>> kernels = API.kernel_sets() # /kernel-sets
[
    <KernelSetDetails> Solar System Kernels (id: 1),
    <KernelSetDetails> Latest Leapseconds Kernel (id: 2),
    ...
    <KernelSetDetails> SPICE Class -- Binary PCK Lesson Kernels (Earth) (id: 39)
]

>>> kernel = kernels[0]
>>> int(kernel) # kernelSetId
1

>>> str(kernel) # Caption
'Solar System Kernels'

>>> kernel.description
'Generic kernels for planets, satellites, and some asteroids covering from 1950-01-01 to 2050-01-01.'

>>> kernel.keys()
dict_keys(['caption', 'sclkId', 'description', 'kernelSetId', 'missionId'])

>>> kernel.values()
dict_values(['Solar System Kernels', '0', 'Generic kernels for planets, satellites, and some asteroids covering from 1950-01-01 to 2050-01-01.', '1', 'gen'])

Disclaimer

This project is not supported or endorsed by either JPL, NAIF or NASA. The code is provided “as is”, use at your own risk.

Project details


Download files

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

Source Distribution

webgeocalc-0.1.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

webgeocalc-0.1-py2.py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page