adam_core.orbits.query.sbdb module¶
- adam_core.orbits.query.sbdb.query_sbdb(ids: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) Orbits[source]¶
Query JPL’s Small-Body Database (SBDB) for orbits. The epoch at which the orbits are returned are near the epoch as published by the Minor Planet Center.
By default, the orbit’s covariance matrices are also queried for. If they are not available, then the 1-sigma uncertainties are used to construct the covariance matrices.
- Parameters:
ids (list) – List of object IDs to query.
- Returns:
orbits – Orbits object containing the queried orbits.
- Return type:
~adam_core.orbits.orbits.Orbits
- Raises:
NotFoundError – If any of the queries object IDs are not found.:
- adam_core.orbits.query.sbdb.query_sbdb_new(ids: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], *, max_concurrent_requests: int = 1, timeout_s: float = 60.0, max_attempts: int = 5, allow_missing: bool = False, orbit_id_from_input: bool = False) Orbits[source]¶
Query JPL SBDB for orbits using direct HTTP requests (new implementation).
This is intended to be a drop-in alternative to query_sbdb that: - avoids SBDB.clear_cache(), - provides explicit timeout/retry controls, and - can optionally fetch multiple objects concurrently.
Notes
JPL’s SSD/CNEOS API fair use policy requests only one in-flight API request at a time. Therefore, the default max_concurrent_requests=1 is the recommended setting.
- Parameters:
allow_missing (bool, optional) – If True, do not raise when an ID is not found in SBDB. Instead, return an Orbits table containing only the successfully resolved IDs (potentially empty).
orbit_id_from_input (bool, optional) – If True, set the returned Orbits.orbit_id values to the input IDs (after any missing filtering). This is useful when callers need to map rows back to the requested identifiers.