Writes one row per body with its name, mass, position and velocity. A CSV file opens in a spreadsheet or any other tool, which makes this the way to take a system’s starting state out of Python. The gravitational constant is not written, so to save a system you intend to load again, use save_system(). Also available as the chained method system.export_bodies(path).
Parameters
Name
Type
Description
Default
system
OrbitSystem
The system whose bodies to export.
required
path
str or path - like
The CSV file to write. It is overwritten if it exists.
required
Returns
Name
Type
Description
OrbitSystem
The same system, unchanged, so the call can sit in the middle of a chain.
Raises
Name
Type
Description
TypeError
If system is not an OrbitSystem.
See Also
save_system: Save the whole system, including G, to reload later.