galpy.orbit.Orbit.bruteSOS

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

Calculate the surface of section of the orbit using a brute-force integration approach.

Parameters:
  • t (numeric, numpy.ndarray or Quantity, optional) – Time at which to get the position. Default is the initial time.

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

  • surface (str, optional) – Surface to punch through (this has no effect in 3D, where the surface is always z=0, but in 2D it can be ‘x’ or ‘y’ for x=0 or y=0), by default None.

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

  • 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), by default None.

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

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

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

Returns:

(R,vR) for 3D orbits, (y,vy) for 2D orbits when surface==’x’, (x,vx) for 2D orbits when surface==’y’

Return type:

tuple

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

  • 2023-05-31 - Written - Bovy (UofT)