ANISE

raw JSON →
0.9.6 verified Fri May 01 auth: no python

ANISE is a modern replacement for NAIF SPICE, providing Attitude, Navigation, Instrument, Spacecraft, and Ephemeris data handling. Version 0.9.6 (pre-1.0) targets Python ≥3.9, with active development and frequent releases.

pip install anise
error ModuleNotFoundError: No module named 'anise'
cause Missing installation or using Python <3.9.
fix
Run pip install anise and ensure Python >=3.9.
error OSError: Could not find kernel file 'kernel.bsp'
cause Kernel path incorrect or file missing.
fix
Provide absolute path or ensure file exists relative to working directory.
error ValueError: Unsupported kernel version
cause Trying to load a SPICE kernel with an unsupported format.
fix
Use ANISE-native .bsp or .xsp files; convert SPICE kernels using anise.convert_spice.
error TypeError: compute_state() got an unexpected keyword argument 'aberration'
cause API change: aberration correction is now set via configuration instead of parameter.
fix
Set aberration correction via anise.config.aberration = 'NONE' before calling.
breaking API is still evolving. Kernel file format may change without notice.
fix Pin version and check changelog before upgrading.
gotcha Time is in seconds past J2000 (TT), not UTC or TDB unless converted.
fix Use anise.time_convert() for conversions.
gotcha Load order of kernels matters: later kernels override earlier ones for the same data.
fix Ensure consistent kernel load order in scripts.
deprecated The function `anise.query()` is deprecated in favor of `anise.compute_state()`.
fix Replace `anise.query(...)` with `anise.compute_state(...)`.

Basic initialization, kernel loading, and ephemeris computation.

from anise import ANISE
from anise.ephemeris import Ephemeris

# Initialize ANISE with a kernel (example uses a test file)
anise = ANISE()
anise.load_kernel('path/to/kernel.bsp')

# Query ephemeris data
target = 'Mars'
observer = 'Earth'
time = 0.0  # seconds past J2000
state, lt = anise.compute_state(target, observer, time)
print('State:', state)
print('Light time:', lt)