rewind_to_formation#
- cogsworth.hydro.rewind.rewind_to_formation(subsnap, pot, dt=<Quantity -1. Myr>, processes=1)[source]#
Rewind a snapshot to the time of formation of each particle
- Parameters:
- subsnap
pynbody.snapshot.SimSnap A subset of a snapshot containing only the particles to rewind
- pot
gala.potential.potential.CompositePotential The potential of the snapshot
- dt
Quantity[time], optional Timestep size, by default -1*u.Myr
- processesint, optional
How many processes to use, by default 1 (run single-threaded)
- subsnap
- Returns:
- init_particles
DataFrame A dataframe containing the initial mass, metallicity, formation time, ID, position and velocity of each particle
- init_particles