galpy.orbit.Orbit.integrate

Orbit.integrate(t, pot, method='symplec4_c', progressbar=True, dt=None, numcores=2, force_map=False)[source]

Integrate the orbit instance with multiprocessing.

Parameters:
  • 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 to use. Default is ‘symplec4_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 (int or Quantity, 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 is OMP_NUM_THREADS.

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

Returns:

Get the actual orbit using getOrbit() or access the individual attributes (e.g., R, vR, etc.).

Return type:

None

Notes

  • Possible integration methods are:

    • ‘odeint’ for scipy’s odeint

    • ‘leapfrog’ for a simple leapfrog implementation

    • ‘leapfrog_c’ for a simple leapfrog implementation in C

    • ‘symplec4_c’ for a 4th order symplectic integrator in C

    • ‘symplec6_c’ for a 6th order symplectic integrator in C

    • ‘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

  • 2018-10-13 - Written as parallel_map applied to regular Orbit integration - Mathew Bub (UofT)

  • 2018-12-26 - Written to use OpenMP C implementation - Bovy (UofT)