swiftest.init_cond.horizons_query

Contents

swiftest.init_cond.horizons_query#

swiftest.init_cond.horizons_query(id, ephemerides_start_date, exclude_spacecraft=True, verbose=False, **kwargs)[source]#

Queries JPL/Horizons for a body matching the id.

If one is found, a HorizonsClass object is returned for the first object that matches the passed id string. If more than one match is found, a list of alternate ids is also returned. If no object is found then None is returned.

Parameters:
  • id (string) – A string identifying which body is requested from JPL/Horizons

  • ephemerides_start_date (string) – Date to use when obtaining the ephemerides in the format YYYY-MM-DD.

  • exclude_spacecraft (bool (optional) - Default True) – Indicate whether spacecraft ids should be exluded from the alternate id list

  • verbose (bool (optional) - Default False) – Indicate whether to print messages about the query or not

Returns:

  • jpl (HorizonsClass | None) – An astroquery.jplhorizons HorizonsClass object. Or None if no match was found.

  • altid (string list | None) – A list of alternate ids if more than one object matches the list