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.