galpy.orbit.Orbit.animate3d

Orbit.animate3d(mw_plane_bg=False, **kwargs)[source]

NAME:

animate3d

PURPOSE:

animate a previously calculated orbit in 3D (with reasonable defaults)

INPUT:

d1= first dimension to plot (‘x’, ‘y’, ‘R’, ‘vR’, ‘vT’, ‘z’, ‘vz’, …), can only be a single entry same as d2, d3

d2= second dimension to plot

d3= third dimension to plot

width= (800) width of output div in px

height= (600) height of output div in px

xlabel= (pre-defined labels) label for the first dimension (or list of labels if d1 is a list); should only have to be specified when using a function as d1 and can then specify as, e.g., [None,’YOUR LABEL’,None] if d1 is a list of three xs and the first and last are standard entries)

ylabel= (pre-defined labels) label for the second dimension (or list of labels if d2 is a list); should only have to be specified when using a function as d2 and can then specify as, e.g., [None,’YOUR LABEL’,None] if d1 is a list of three xs and the first and last are standard entries)

zlabel= (pre-defined labels) label for the third dimension (or list of labels if d3 is a list); should only have to be specified when using a function as d3 and can then specify as, e.g., [None,’YOUR LABEL’,None] if d1 is a list of three xs and the first and last are standard entries)

json_filename= (None) if set, save the data necessary for the figure in this filename (e.g., json_filename= ‘orbit_data/orbit.json’); this path is also used in the output HTML, so needs to be accessible

ro= (Object-wide default) physical scale for distances to use to convert (can be Quantity)

vo= (Object-wide default) physical scale for velocities to use to convert (can be Quantity)

use_physical= use to override Object-wide default for using a physical scale for output

mw_plane_bg= whether to add a milkyway plane when plotting x, y, z

OUTPUT:

IPython.display.HTML object with code to animate the orbit; can be directly shown in jupyter notebook or embedded in HTML pages; get a text version of the HTML using the _repr_html_() function

HISTORY:

2022-12-09 - Written - Henry Leung (UofT)