NAIF Functions¶
Functions for downloading planetary DE, satellite ephemeris, and lunar-orientation kernels from NASA JPL's NAIF archive.
All functions are available via brahe.datasets.naif.<function_name>.
download_spice_kernel builtin ¶
Download a NAIF kernel with caching support
Downloads the named NAIF kernel file (planetary DE, satellite ephemeris, or binary PCK) from NASA JPL's NAIF archive and caches it locally. If the kernel is already cached, returns the cached path without re-downloading. Optionally copies the kernel to a user-specified location.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | Kernel name. Supported: the planetary (DE) ephemerides "de430", "de432s", "de435", "de438", "de440", "de440s", "de442", "de442s"; the satellite ephemeris kernels "mar099", "mar099s", "jup365", "sat441", "ura184", "nep097", "plu060"; and the binary PCK "moon_pa_de440". | required |
output_path | str | Optional path to copy the kernel to after download/cache retrieval. If not specified, returns the cache location. | None |
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Path to the kernel file (cache location or output_path if specified). |
Raises:
| Type | Description |
|---|---|
RuntimeError | If kernel name is unsupported, download fails, or file operations fail. |
Example
Note
- DE kernels are long-term stable products and are not refreshed once cached
- Files are cached to ~/.cache/brahe/naif/ (or $BRAHE_CACHE/naif/ if set)
- Kernel files vary in size (de440s: ~33 MB, de440: ~120 MB)
- Available at: https://naif.jpl.nasa.gov/pub/naif/generic_kernels/
See Also¶
- NAIF Ephemeris Kernels - Supported kernels, caching behavior, and usage examples
- SPICE Kernels - Loading, querying, and PCK orientation
- NASA NAIF Website - Official NAIF data archive