galpy.orbit.Orbit.plotSOS¶
- Orbit.plotSOS(pot, *args, ncross=500, surface=None, t0=0.0, method='dop853_c', skip=100, progressbar=True, **kwargs)[source]¶
NAME:
plotSOS
PURPOSE:
Calculate and plot a surface of section of the orbit
INPUT:
pot - Potential or list of such instances
ncross= (500) number of times to cross the surface
surface= (None) 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)
t0= (0.) time of the initial condition (can be a Quantity)
integration keyword arguments:
- method = ‘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
skip= (100) for non-adaptive integrators, the number of basic steps to take between crossings (these are further refined in the code, but only up to a maximum refinement, so you can use skip to get finer integration in cases where more accuracy is needed)
progressbar= (True) if True, display a tqdm progress bar when integrating multiple orbits (requires tqdm to be installed!)
for more control of the integrator, use the SOS method directly and plot its results
matplotlib.plot inputs+galpy.util.plot.plot inputs
OUTPUT:
sends plot to output device
HISTORY:
2023-03-16 - Written - Bovy (UofT)