Spice utilities and common code for TTS.
Project description
TTS Spice
About Teamtools Studio
Teamtools Studio Utilities is part of JPL's Teamtools Studio (TTS).
TTS is an effort originated in JPL's Planning and Execution section to centralize shared repositories across missions. This benefits JPL by reducing cost through reducing duplicated code, collaborating across missions, and unifying standards for development and design across JPL.
Although Planning and Execution is primarily concerned with flight operations, the TTS suite has been generalized and atomized to the point where many of these tools are applicable during other mission phases and even in non-spaceflight contexts. Through our work flying space missions, we hope to provide tools to the open source community that have utility in data analysis or planning for any complex system where failure is not an option.
For more infomation on how to contribute, and how these libraries form a complete ecosystem for high reliability data analysis, see the Full TTS Documentation.
What is TTS Spice?
Overview
TTS Spice is a library that provides a clean, organized approach to SPICE kernel management. As we developed the Teamtools Studio suite, we found ourselves needing to put kernels in every repository, leading to duplication and inconsistency. This library centralizes kernel management, allowing the TTS team to manage which kernels are used and update them in a single place when new ones are released.
The library provides:
- A structured way to organize SPICE kernels by type and celestial body
- Functions to load standard kernels (leap seconds, planetary ephemerides, etc.)
- Body-specific kernel loading (Earth, Moon, etc.)
- Mission-specific kernel setup
- Kernel tracking to prevent duplicate loading
- Clean error handling and logging
Features
- Organized Kernel Management: Kernels are organized by type (LSK, SPK, PCK, etc.) and by celestial body
- Standard Kernel Loading: Easy loading of commonly used kernels
- Body-Specific Kernels: Load rotation models and other kernels for specific bodies
- Mission Setup: Configure SPICE for specific missions with a single function call
- Duplicate Prevention: Automatically tracks loaded kernels to prevent duplicates
- Error Handling: Proper error handling and logging for kernel loading issues
Usage Examples
# Load standard kernels (leap seconds, planetary ephemerides, constants)
from tts_spice import standard_kernels, rotation_kernels, clear_kernels
# Load the basic kernels needed for most operations
standard_kernels()
# Load Earth and Moon rotation kernels
rotation_kernels(["earth", "moon"])
# Use SPICE functions as normal
import spiceypy as sp
et = sp.str2et("2026-01-17")
position, _ = sp.spkpos("EARTH", et, "J2000", "NONE", "SUN")
# Always clean up when done
clear_kernels()
Available Kernels
The library includes these standard kernels:
- Leap Seconds:
naif0012.tls - Planetary Ephemerides:
de430.bsp - Planetary Constants:
pck00010.tpc
Body-specific kernels:
- Earth:
earth_latest_high_prec.bpc - Moon:
moon_pa_de421_1900-2050.bpc
TTS dependencies
- TTS Utilities
Extending the Library
Adding New Kernels
To add new kernels to the library:
- Place the kernel file in the
tts_spice/kernels/directory - Update the
KernelRegistryclass infurnish.pyto include the new kernel
For mission-specific kernels, create a subdirectory in tts_spice/kernels/missions/mission_name/
Recommended Additional Kernels
Depending on your mission needs, you might want to add:
- Higher precision ephemerides (e.g.,
de440.bsporde441.bsp) - Additional planetary rotation models
- Spacecraft-specific kernels
- DSK (shape) kernels for small bodies
- Instrument kernels for specific missions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tts_spice-0.1.2.tar.gz.
File metadata
- Download URL: tts_spice-0.1.2.tar.gz
- Upload date:
- Size: 5.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c840979e5768008a6fd8e20feca3fab7f60eccc4d675438073facb49e46b7bb
|
|
| MD5 |
a652f1f46273dccd47d25e3751aaa8d2
|
|
| BLAKE2b-256 |
5ef1faf737a888541ead8ae907d012a2d11e9f62ac1e2e31354e5725a2daaae4
|
File details
Details for the file tts_spice-0.1.2-py3-none-any.whl.
File metadata
- Download URL: tts_spice-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85db4f426e9ba8b7b8bef69af59e96c72cb4749fa58b5f128bda5b2af230807f
|
|
| MD5 |
575f0daf066f27d465ff92e2e51bbc70
|
|
| BLAKE2b-256 |
03517aab3e9f89864357773da6ad3e4864a1fd31c674e0b89b732f5caa49a0d2
|