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.