π Get StartedΒΆ
This page gives a quick overview of how to get started with cherab-imas, including installation instructions and a simple example script.
InstallationΒΆ
cherab-imas can be installed by many package managers.
Explore the various methods below to install cherab-imas using your preferred package manager.
pip install cherab-imas
conda install -c conda-forge cherab-imas
uv add cherab-imas
pixi add cherab-imas
Writing your first scriptΒΆ
Here is a simple example of how to use cherab-imas to create a plasma object from an IMAS database.
from raysect.optical import World
from cherab.imas.plasma import load_plasma
# Create a world
world = World()
# Load plasma from IMAS database
# You can put same parameters defined in `imas.DBEntry`
plasma = load_plasma(
"imas:hdf5?path=testdb", # IMAS URI
"r", # read mode
time=0.0,
parent=world,
)
This script creates a World object and loads a plasma from an IMAS database located at testdb. The plasma is created close to time 0.0 and is added to the world as its parent.
You can find more examples and detailed documentation in the Examples and API Reference sections.
CitationsΒΆ
If you use cherab-imas in your research, please cite the doi:10.5281/zenodo.1206142.