galpy.orbit.Orbit.animate3d

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

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

Parameters:
  • d1 (str) – First dimension to plot (‘x’, ‘y’, ‘R’, ‘vR’, ‘vT’, ‘z’, ‘vz’, …), can only be a single entry.

  • d2 (str) – Second dimension to plot. Same format as d1.

  • d3 (str) – Third dimension to plot. Same format as d1.

  • width (int, optional) – Width of output div in px, by default 800.

  • height (int, optional) – Height of output div in px, by default 600.

  • mw_plane_bg (bool, optional) – Whether to add a Milky Way plane when plotting x, y, z, by default False.

  • xlabel (str or list, optional) – Label for the first dimension; should only have to be specified when using a function as d1.

  • ylabel (str or list, optional) – Label for the second dimension; should only have to be specified when using a function as d2.

  • zlabel (str or list, optional) – Label for the third dimension; should only have to be specified when using a function as d3.

  • json_filename (str, optional) – 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, by default None.

  • ro (float or Quantity, optional) – Physical scale in kpc for distances to use to convert, Default is the object-wide default.

  • vo (float or Quantity, optional) – Physical scale for velocities in km/s to use to convert, by default None. Default is the object-wide default.

  • use_physical (bool, optional) – Use to override object-wide default for using a physical scale for output.

Returns:

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.

Return type:

IPython.display.HTML

Notes

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