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
plotlyto 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/") >>> fig = visualize(bolometers[0], num_rays=100, ray_from_channel=[0, 3])