IMAS#

The cherab-iter can easily take account for some IMAS ids. If you would like to know what kinds of ids is set up in IMAS, See the IMAS documentation.

Note

The access to the above documentation is avilable for only user having ITER account.

Import IDS#

The cherab.imas sub-package has several (____)IDS objects to import ids attributes. All you need to do at first is to import IDS information from IMAS like this:

from cherab.imas import CoreSourceIDS
core_profile = CoreProfilesIDS(12400, 1, user="public", database="iter")

When you extract IDS information, you need to input some arguments:

  • shot number

  • run number

  • user name - on ITER HPC, “public” means public imas storage.

  • database - mainly specific machine name

Extract data from IDS#

Here is an example to extract the edge_source energy data.

from matplotlib import pyplot as plt
from cherab.imas import CoreSourcesIDS, EquilibriumIDS

# Loading Equilibrium IDS data
equilibrium_ids = EquilibriumIDS(shot=134000, run=7, user="public", database="iter")

# Extracting EFIT object using time method
imas_equilibrium = equilibrium_ids.time(-1) # time parameter: -1 means choosing the first time slice

# Loading Core Sources IDS
core_sources = CoreSourcesIDS(shot=134000, run=7, user="public", database="iter")

# extracting 1D energy profile
energy = core_sources.energy(equilibrium=imas_equilibrium).profile_1d

plt.plot(energy)
../_images/Energy.png