integrate_orbit_with_events#
- cogsworth.kicks.integrate_orbit_with_events(w0, t1, t2, dt, potential={'bulge': <HernquistPotential: m=5.00e+09 solMass, c=1.00 kpc (kpc, Myr, solMass, rad)>, 'disk': <MN3ExponentialDiskPotential: m=4.77e+10 solMass, h_R=2.60 kpc, h_z=0.30 kpc (kpc, Myr, solMass, rad)>, 'halo': <NFWPotential: m=5.54e+11 solMass, r_s=15.63 kpc, a=1.00, b=1.00, c=1.00 (kpc, Myr, solMass, rad)>, 'nucleus': <HernquistPotential: m=1.81e+09 solMass, c=0.07 kpc (kpc, Myr, solMass, rad)>}, events=None, store_all=True, integrator=<class 'gala.integrate.pyintegrators.dopri853.DOPRI853Integrator'>, integrator_kwargs={}, max_retries=2, timestep_multiplier=0.1)[source]#
Integrate
PhaseSpacePositionin aPotentialwith events that occur at certain times- Parameters:
- w0
PhaseSpacePosition Initial phase space position
- t1
Quantity[time] Integration start time
- t2
Quantity[time] Integration end time
- dt
Quantity[time] Integration initial timestep size (integrator may adapt timesteps)
- potential
Potential, optional Potential in which you which to integrate the orbits, by default the
MilkyWayPotential- eventsvaries
Events that occur during the orbit evolution (such as supernova resulting in kicks). If no events occur then set events=None (this will result in a simple call to potential.integrate_orbit). If this is a disrupted binary then supply a list of 2 lists of events. Each event list should contain the following parameters: time, m_1, m_2, a, ecc, delta_v_sys_xyz (and will be passed to get_kick_differential).
- store_allbool, optional
Whether to store the entire orbit, by default True. If not then only the final PhaseSpacePosition will be stored - this cuts down on memory usage.
- integrator
Integrator, optional The integrator used by gala for evolving the orbits of binaries in the galactic potential
- max_retriesint, optional
The maximum number of times to retry an orbit integration that fails (default is 2)
- timestep_multiplierfloat, optional
The factor by which to multiply the timestep size for each retry (default is 0.1, i.e. reduce the timestep by a factor of 10 for each retry)
- w0
- Returns:
- full_orbit
Orbit Integrated orbit. If a disrupted binary with two event lists was supplied then two orbit classes will be returned. If the orbit integration failed for any reason then None is returned.
- full_orbit