This page was generated from docs/notebooks/observer/bolometer.ipynb.
Download notebook.

Bolometer

Here we demonstrate how to load bolometer observers from a bolometer IDS, and visualize them to check what they look like. The dataset used in this example is a mock bolometer dataset, which consists of different types of bolometer cameras.

[1]:
from plotly import io

from cherab.imas.datasets import bolometer_moc
from cherab.imas.observer.bolometer import load_bolometers, visualize

io.renderers.default = "notebook"
13:46:30 CRITICAL Could not import 'imas_core': No module named 'imas_core'. Some functionality is not available. @imas_interface.py:34

Load bolometer dataset

The list of instances BolometerCamera are loaded from the "bolometer" IDS.

[2]:
path = bolometer_moc()
bolometers = load_bolometers(path, "r")
13:46:31 INFO     Parsing data dictionary version 4.1.1 @dd_zip.py:89
/home/runner/work/imas/imas/src/cherab/imas/observer/bolometer.py:128: RuntimeWarning: The 'get_slice' method is not implemented for the URI '/home/runner/.cache/cherab/imas/bolometer_moc.nc'. Falling back to 'get' method to retrieve the entire IDS.
  ids = get_ids_time_slice(entry, "bolometer")
[3]:
for bolo in bolometers:
    print(f"Bolometer: {bolo.name}")
Bolometer: Pinhole Camera
Bolometer: Collimator Camera
Bolometer: Collimator Camera (w/ subcollimator)

Visualize bolometer observers

Pinhole camera

[4]:
fig = visualize(
    bolometers[0],
    num_rays=100,
    ray_terminate_distance=2.0e-2,
    show=False,
)
fig.update_layout(template="plotly_dark")

Collimator cameras

[5]:
fig = visualize(
    bolometers[1],
    num_rays=100,
    ray_from_channel=[0, 3],
    ray_terminate_distance=2.0e-2,
    show=False,
)
fig.update_layout(template="plotly_dark")
[6]:
fig = visualize(
    bolometers[2],
    num_rays=200,
    ray_from_channel=[0, 3],
    ray_terminate_distance=2.0e-2,
    show=False,
)
fig.update_layout(template="plotly_dark")