hermpy.net.client_spice#
Attributes#
Classes#
Client for managing and loading SPICE kernels from remote and local sources. |
Functions#
|
Return filenames from a simple Apache-style directory listing. |
|
Module Contents#
- hermpy.net.client_spice.DEFAULT_KERNEL_LOCATIONS: Dict[str, Dict[str, Any]]#
- class hermpy.net.client_spice.ClientSPICE(KERNEL_LOCATIONS: Dict[str, Dict[str, Any]] = DEFAULT_KERNEL_LOCATIONS)#
Client for managing and loading SPICE kernels from remote and local sources.
Handles downloading kernels from NAIF (or other configured sources), resolving filename patterns against remote directory listings, and furnishing the resulting files to SpiceyPy via a context manager.
- KERNEL_LOCATIONS#
- _query_buffer: list[str] = []#
- _local_buffer: list[pathlib.Path] = []#
- add_local_kernels(paths: list[pathlib.Path]) None#
Stages local kernel files to be furnished on the next fetch.
Files are held in an internal buffer and included alongside any remotely downloaded kernels when fetch() is called.
- fetch() list[str]#
Resolves, downloads, and returns all kernel file paths.
Expands each configured source’s filename patterns against its remote directory listing, downloads any files not already cached, appends any staged local kernels, and clears the remote query buffer. Returns the combined list of absolute file paths ready to be furnished to SpiceyPy.
- KernelPool()#
Context manager that furnishes all configured kernels for the duration of the block.
Calls fetch() to resolve and download kernels, then delegates to spiceypy.KernelPool so that all furnished kernels are automatically unloaded on exit. Use this as the standard entry point for any SPICE computation that requires this client’s kernel set.
- Example:
- with client.KernelPool():
et = spice.utc2et(“2024-01-01”)
- hermpy.net.client_spice.list_remote_files(url: str) list[str]#
Return filenames from a simple Apache-style directory listing.
- hermpy.net.client_spice.expand_patterns(base_url: str, directory: str, patterns: list[str]) list[str]#