The settings of the run that produced a simulation.
simulate_system records the gravitational constant, softening length, integrator and time step it used alongside its result. The analysis functions read them from there, so that get_energy, for example, uses the same G and softening as the run. This function returns them as a dict, and works the same way for pandas and polars results.
Parameters
Name
Type
Description
Default
sim_data
DataFrame
The output of simulate_system, continue_simulation or shift_reference_frame, as a pandas or polars DataFrame.
required
Returns
Name
Type
Description
dict
The recorded settings: • G: gravitational constant in m^3 kg^-1 s^-2. • softening: softening length in meters. • method: the integrator, "verlet", "euler_cromer" or "euler". • time_step: time between recorded states in seconds. After continue_simulation this is the step of the latest segment. The dict is a copy, so changing it does not change the DataFrame. It is empty if nothing is recorded for sim_data.
set_backend: Choose between pandas and polars results.
Notes
For a pandas DataFrame the settings live in sim_data.attrs, and this function returns a copy of that dict. pandas carries attrs through most operations, such as filtering rows.
A polars DataFrame has nowhere to keep them, so they are remembered only for the exact DataFrame pyorbiter returned. Anything you derive from it (filter, sort, with_columns, clone, a file read back) gives an empty dict here. For a polars run that did not use the defaults, pass G and softening to the analysis functions, and G, softening and method to continue_simulation, yourself.