Returns the current state of every body: its name, mass, position and velocity. Use it to inspect a system before simulating, or to pull the starting state into your own analysis. The table is a copy, so editing it does not change the system. Also available as orb.get_bodies(system, ...).
Parameters
Name
Type
Description
Default
backend
str
The kind of DataFrame to return: "pandas" or "polars". The default, None, uses the backend chosen with set_backend(), which is pandas unless you changed it.
None
Returns
Name
Type
Description
DataFrame
A pandas DataFrame by default, or a polars DataFrame. One row per body, in the order the bodies were added, with columns: • id: the body’s name. • mass: mass in kilograms. • x, y, z: position in meters. • vx, vy, vz: velocity in meters per second. An empty system gives a table with these columns and no rows.
Raises
Name
Type
Description
ValueError
If backend is not "pandas" or "polars".
ImportError
If backend is "polars" and polars is not installed.
See Also
OrbitSystem.bodies: The same table as a property.
set_backend: Choose pandas or polars for the whole session.