swiftest.init_cond.get_solar_system_body

swiftest.init_cond.get_solar_system_body#

swiftest.init_cond.get_solar_system_body(name, ephemeris_id=None, ephemerides_start_date='2027-04-30', central_body_name='Sun', verbose=True, **kwargs)[source]#

Initializes a Swiftest dataset containing the major planets of the Solar System at a particular data from JPL/Horizons.

Parameters:
  • name (string) – Name of body to add to Dataset. If id is not supplied, this is also what will be searched for in the JPL/Horizon’s database. The first matching body is found (for major planets, this is the barycenter of a planet-satellite system)

  • ephemeris_id (string (optional)) – If passed, this is passed to Horizons instead of name. This can be used to find a more precise body than given by name.

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

  • central_body_name (string) – Name of the central body to use when calculating the relative position and velocity vectors. Default is β€œSun”

  • verbose (bool) – Indicates whether to print messages about the query or not. Default is True

  • **kwargs (Any) – Additional keyword arguments to pass to the query method (see https://astroquery.readthedocs.io/en/latest/jplhorizons/jplhorizons.html)

Returns:

  • A dictionary containing the following elements

  • name (string) – Name of the body

  • rh ((3,) array of np.float64) – Position vector array relative to the central body in m.

  • vh ((3,) array of np.float64) – Velocity vector array relative to the central body in m/s.

  • Gmass (np.float64) – G*mass values if these are massive bodies in m^3/s^2

  • mass (np.float64) – Mass values if these are massive bodies in kg

  • radius (np.float64) – Radius values if these are massive bodies in m

  • rhill (np.float64) – The Hill’s radius values if these are massive bodies in m

  • Ip ((3,) array of np.float64) – Principal axes moments of inertia vectors if these are massive bodies.

  • rot ((3,) array of np.float) – Rotation rate vectors if these are massive bodies in deg/s

  • j2rp2 (np.float64) – J_2R^2 value for the body if known

  • j4rp4 (np.float64) – J_4R^4 value for the body if known

Notes

When passing name == β€œEarth” or name == β€œPluto”, it a body is generated that has initial conditions matching the system barycenter and mass equal to the sum of Earth+Moon or Pluto+Charon. To obtain initial conditions for either Earth or Pluto alone, pass ephemeris_id == β€œ399” for Earth or id == β€œ999” for Pluto.