swiftest.Simulation.add_solar_system_body

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