cherab.imas.observer.bolometer.visualizeยถ

cherab.imas.observer.bolometer.visualize(camera: BolometerCamera, fig=None, num_rays: int | None = None, ray_from_channel: int | list[int] | None = None, ray_terminate_distance: float = 0.05, aspect: 'data' | 'auto' = 'data', show: bool = True)Sourceยถ

Visualize a bolometer camera geometry in 3D using Plotly.

Note

This function requires plotly to be installed.

Parameters:
camera: BolometerCameraยถ

The BolometerCamera object to visualize.

fig : plotly.graph_objects.Figure | Noneยถ

An existing Plotly figure to add the camera visualization to, by default None.

num_rays: int | None = Noneยถ

Number of rays to trace for visualizing the field of view, by default None.

ray_from_channel: int | list[int] | None = Noneยถ

Channel index or list of channel indices from which to trace rays, by default None.

ray_terminate_distance: float = 0.05ยถ

Distance at which rays are terminated, by default 5.0e-2.

aspect: 'data' | 'auto' = 'data'ยถ

Aspect ratio of the plot, by default โ€œdataโ€.

show: bool = Trueยถ

Whether to display the plot, by default True.

Returns:

plotly.graph_objects.Figure โ€“ The Plotly figure object.

Raises:
  • ImportError โ€“ If Plotly is not installed.

  • TypeError โ€“ If the provided fig is not a Plotly Figure instance.

Examples

>>> bolometers = load_bolometers("imas:hdf5?path=path/to/db/", "r")
>>> fig = visualize(bolometers[0], num_rays=100, ray_from_channel=[0, 3])