galpy.orbit.Orbit.integrate_dxdv

Currently only supported for planarOrbit instances.

Orbit.integrate_dxdv(dxdv, t, pot, method='dopr54_c', progressbar=True, dt=None, numcores=2, force_map=False, rectIn=False, rectOut=False)[source]

Integrate the orbit and a small area of phase space.

Parameters:
  • dxdv (numpy.ndarray) – Initial conditions for the orbit in cylindrical or rectangular coordinates. The shape of the array should be (*input_shape, 4).

  • t (list, numpy.ndarray or Quantity) – List of equispaced times at which to compute the orbit. The initial condition is t[0].

  • pot (Potential, DissipativeForce or list of such instances) – Gravitational field to integrate the orbit in.

  • method (str, optional) – Integration method. Default is ‘dopr54_c’. See Notes for more information.

  • progressbar (bool, optional) – If True, display a tqdm progress bar when integrating multiple orbits (requires tqdm to be installed!). Default is True.

  • dt (float, optional) – If set, force the integrator to use this basic stepsize; must be an integer divisor of output stepsize (only works for the C integrators that use a fixed stepsize) (can be Quantity).

  • numcores (int, optional) – Number of cores to use for Python-based multiprocessing (pure Python or using force_map=True); default = OMP_NUM_THREADS.

  • force_map (bool, optional) – If True, force use of Python-based multiprocessing (not recommended). Default is False.

  • rectIn (bool, optional) – If True, input dxdv is in rectangular coordinates. Default is False.

  • rectOut (bool, optional) – If True, output dxdv (that in orbit_dxdv) is in rectangular coordinates. Default is False.

Returns:

Get the actual orbit using getOrbit_dxdv(), the orbit that is integrated alongside with dxdv is stored as usual, any previous regular orbit integration will be erased!

Return type:

None

Notes

  • Possible integration methods are:

    • ‘odeint’ for scipy’s odeint

    • ‘rk4_c’ for a 4th-order Runge-Kutta integrator in C

    • ‘rk6_c’ for a 6-th order Runge-Kutta integrator in C

    • ‘dopr54_c’ for a 5-4 Dormand-Prince integrator in C

    • ‘dop853’ for a 8-5-3 Dormand-Prince integrator in Python

    • ‘dop853_c’ for a 8-5-3 Dormand-Prince integrator in C

  • 2011-10-17 - Written - Bovy (IAS)

  • 2014-06-29 - Added rectIn and rectOut - Bovy (IAS)

  • 2019-05-21 - Parallelized and incorporated into new Orbits class - Bovy (UofT)