yt.visualization.volume_rendering.interactive_vr_helpers module

Helper routines for Interactive Data Visualization

yt.visualization.volume_rendering.interactive_vr_helpers.interactive_render(data_source, field=None, window_size=None, cam_position=None, cam_focus=None)

High level wrapper for Interactive Data Visualization

Parameters:
  • data_source (yt.data_objects.data_containers.AMR3DData,) – yt.data_objects.static_output.Dataset This is the source to be rendered, which can be any arbitrary yt 3D object
  • field (string, tuple, optional) – The field to be rendered. If unspecified, this will use the default_field for your dataset’s frontend–usually (‘gas’, ‘density’).
  • window_size (2 element tuple of ints) – The width and the height of the Interactive Data Visualization window. For performance reasons it is recommended to use values that are natural powers of 2.
  • cam_position (3 element YTArray, optional) – The camera position in physical coordinates. If unspecified, data_source’s domain right edge will be used.
  • cam_focus (3 element YTArray, optional) – The focus defines the point the camera is pointed at. If unspecified, data_source’s domain center will be used.

Examples

>>> import yt
>>> ds = yt.load("Enzo_64/DD0046/DD0046")
>>> yt.interactive_render(ds)