swiftest.Simulation.add_solar_system_body#
- Simulation.add_solar_system_body(name=None, ephemeris_id=None, date=None, align_to_central_body_rotation=False, **kwargs)[source]#
Adds a solar system body to an existing simulation Dataset from the JPL Horizons ephemeris service.
The JPL Horizons service will be searched for a body matching the string passed by name, or alternatively ephemeris_id if passed. Bodies will be named in the Swiftest initial conditions Dataset using name. Use ephemeris_id to have finer control over which body is searched in Horizons while using a custom name.
If name is not passed, then the target name property is used as the name. You must pass either name and/or ephemeris_id.
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 ephemeris_id == β999β for Pluto.
- Parameters:
name (str, optional | List[str]) β Add solar system body by name. This will be the name used in the Swiftest initial conditions Dataset unless not supplied
ephemeris_id (int | List[int], optional but must be the same length as name if passed.) β In that case, the id is passed to the ephemeris service and the name is used.
date (str, optional) β ISO-formatted date sto use when obtaining the ephemerides in the format YYYY-MM-DD. Defaults to value set by ephemeris_date.
align_to_central_body_rotation (bool, default False) β If True, the cartesian coordinates will be aligned to the rotation pole of the central body. Otherwise, the This is only valid for when rotation is enabled.
verbose (bool, default True) β If True, then warnings will be printed if the name is already in use in the Dataset.
**kwargs (Any) β Additional keyword arguments to pass to the query method (i.e. astroquery.Horizons)
- Returns:
None β initial conditions data stored as a SwiftestDataset in the init_cond instance variable