Python package for NAIF WebGeoCalc API
Project description
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)
Built Distribution
Close
Hashes for webgeocalc-0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 518bf289b0f54c9f3f5777ca1b5e9b5cc2c9ecac65e0482ba8626594f3066a4e |
|
MD5 | ebde9ff53821141c02f844a3a9fb6852 |
|
BLAKE2b-256 | 4df993e6d489e8d42381f1f92e4b8db8dafab85d21fa9efc61178c177bfffeee |