Horizons SPK¶
API reference for the JPL Horizons SPK client. All types are available via brahe.datasets.horizons.
HorizonsClient¶
HorizonsClient ¶
HorizonsClient(base_url: str = None)
Client for the JPL Horizons SPK generation API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_url | str | Override the Horizons base URL (for testing). | None |
Example
Initialize instance.
get_spk method descriptor ¶
get_spk(request: HorizonsSPKRequest) -> HorizonsSPKResponse
Generate (or reuse a cached) SPK for the request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request | HorizonsSPKRequest | The SPK generation request. | required |
Returns:
| Name | Type | Description |
|---|---|---|
HorizonsSPKResponse | HorizonsSPKResponse | Handle to the cached .bsp. |
HorizonsSPKRequest¶
HorizonsSPKRequest ¶
A request to generate a small-body SPK over a time span.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
command | str | Horizons COMMAND target, e.g. "DES=20000001;". | required |
start | Epoch | SPK span start. | required |
stop | Epoch | SPK span stop. | required |
Initialize instance.
for_spkid staticmethod ¶
for_spkid(spkid: int, start: Epoch, stop: Epoch) -> HorizonsSPKRequest
Create a request targeting a small body by SPK-ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
spkid | int | Small-body SPK-ID (NAIF ID). | required |
start | Epoch | SPK span start. | required |
stop | Epoch | SPK span stop. | required |
Returns:
| Name | Type | Description |
|---|---|---|
HorizonsSPKRequest | HorizonsSPKRequest | The configured request. |
with_center method descriptor ¶
with_center(center: str) -> HorizonsSPKRequest
Override the CENTER body (default "500@0", the SSB).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
center | str | Horizons center specification. | required |
Returns:
| Name | Type | Description |
|---|---|---|
HorizonsSPKRequest | HorizonsSPKRequest | The request with the new center. |
HorizonsSPKResponse¶
HorizonsSPKResponse ¶
A handle to a generated (or cached) Horizons SPK kernel.
Attributes:
| Name | Type | Description |
|---|---|---|
path | str | Path to the cached .bsp kernel. |
spk_file_id | str | None | Horizons spk_file_id, if returned. |
Initialize instance.
See Also¶
- Horizons SPK (Learn) - Overview, caching, and usage
- SBDB Lookup - Resolve a name to the NAIF ID a request needs