Note
Click here to download the full example code
Plot 2D image of radiation#
Note
The database is stored in /home/ITER/bonnix/public/imasdb/iter/3/0/ids_1220520001.* It will be moved to public database in the near future. (Oct. 1st 2019).
import matplotlib.pyplot as plt
from cherab.imas import RadiationIDS
from cherab.core.math import sample2d
# configuration
shot = 122052
run = 1
user = "public"
machine = "iter"
time = 0
indxprocess = 0
indxelement = 0
ion_or_neutral = "ion"
rn = 200
zn = 400
print("loading radiation IDS")
radiation_ids = RadiationIDS(shot, run, user, machine)
species = radiation_ids.species(time, indxprocess)
# print(species)
# get geometry range of poloidal cross-section
r_range, z_range = radiation_ids.get_geometry_range(time)
rmin, rmax = r_range
zmin, zmax = z_range
# get emission profile
radiation = radiation_ids.emission(time, indxprocess, indxelement, ion_or_neutral)
# make 2D data
r, z, PowerDens = sample2d(radiation, (rmin, rmax, rn), (zmin, zmax, zn))
# plot radiation profile
plt.pcolormesh(r, z, PowerDens.T)
plt.axis("equal")
plt.show()
Total running time of the script: ( 0 minutes 0.000 seconds)