Returns a copy of the system without the named bodies. The other bodies keep their positions and velocities, and G is unchanged. This is useful for “what if” experiments on a ready-made system, such as the solar system without Jupiter. Also available as orb.remove_body(system, ...).
Parameters
Name
Type
Description
Default
id
str or iterable of str
The name of the body to remove, or a list of names. Names are matched exactly, including case.
required
Returns
Name
Type
Description
OrbitSystem
A new system without the named bodies. The original system is not modified.
Raises
Name
Type
Description
ValueError
If id is an empty list or contains something that is not a string, or if any name is not in the system. The message lists the bodies that are present.
Removing a body does not adjust the others. A moon whose planet is removed keeps the velocity it had, and will no longer be in a closed orbit around anything.
Examples
The solar system without Jupiter.
import pyorbiter as orbsystem = orb.load_solar_system().remove_body("Jupiter")system