empyrean.query_horizons_vectors

query_horizons_vectors(command, epoch_mjd_tdb, cache_dir=None)[source]

Query JPL Horizons for a Cartesian state vector at a single epoch.

Returns the solar-system-barycenter (SSB) centered, ICRF Cartesian state from the Horizons vector-table query.

Parameters:
  • command (str) – Horizons COMMAND string (e.g. "99942;", "DES=C/2019 Q4;").

  • epoch_mjd_tdb (float) – Epoch in MJD TDB.

  • cache_dir (str | Path | bool | None) –

    • None (default): cache JSON responses under $EMPYREAN_CACHE_DIR/horizons (or ~/.empyrean/cache/horizons).

    • False: disable caching for this call.

    • explicit path: use this directory.

Return type:

tuple[ndarray[Any, dtype[double]], ndarray[Any, dtype[double]]]

Returns:

tuple[np.ndarray, np.ndarray](position, velocity) — length-3 arrays in AU and AU/day, SSB-centered, ICRF.