The DREAM Python interface contains an elaborate set of classes for handling DREAM output data.
Kinetic quantities |
Description |
---|---|
Hot electron distribution function |
|
Runaway electron distribution function |
Fluid quantities |
Description |
---|---|
E_field |
Electric field |
j_hot |
Hot electron current density |
j_ohm |
Ohmic current density |
j_re |
Runaway electron current density |
j_tot |
Total current density |
Cold electron density |
|
Hot electron density |
|
Ion densities |
|
Runaway electron density |
|
Total electron density |
|
Poloidal flux |
|
Cold electron temperature |
|
Cold electron energy |
Scalar quantities |
Description |
---|---|
Total plasma current |
|
Tokamak wall current |
|
Poloidal flux at plasma edge |
|
Poloidal flux at tokamak wall |
|
Loop voltage at tokamak wall |
|
SPI shard positions |
|
SPI shard radii |
DREAM.DREAMOutput.
DREAMOutput
(filename=None, path='', lazy=True, loadsettings=True)¶Bases: object
__contains__
(item)¶Overriding the Python in
operator and allows to check for the
existence of properties of this object.
__getitem__
(index)¶Retrieves a parameter by name.
__init__
(filename=None, path='', lazy=True, loadsettings=True)¶Construct a new DREAMOutput
object. If filename
is given, the
object is read from the (HDF5) file with that name. If path
is also
given, this is used to locate the group in the file which contains the
output.
filename (str) – Name of file to load output from.
path (str) – Path to group in HDF5 file containing the output.
lazy (bool) – If True
, allows the file to be read lazily (on-demand) by return h5py DataSet objects instead of the actual data (wrapped in a DREAM.DataObject). This can greatly reduce load times, but may complicate typing slightly. Note also that the HDF5 file will be locked for as long as the Python interpreter is running.
loadsettings (bool) – If True
, load the settings stored in the output object.
close
()¶Close the associated HDF5 File object.
getFileSize
()¶Returns the size in bytes of the output file.
getFileSize_s
(includeBytes=False)¶Returns the size in bytes of the output file as a nicely formatted string.
load
(filename, path='', lazy=True, loadsettings=True)¶Loads DREAM output from the specified file. If ‘path’ is given, this indicates which group path in the file to load the output from.
filename (str) – Name of file to load output from.
path (str) – Path to subsect of HDF5 file containing DREAM output.
lazy (bool) – If True
, allows the file to be read lazily (on-demand) by return h5py DataSet objects instead of the actual data (wrapped in a DREAM.DataObject). This can greatly reduce load times, but may complicate typing slightly. Note also that the HDF5 file will be locked for as long as the Python interpreter is running.
loadsettings (bool) – If True
, load the settings stored in the output object.
time2index
(t)¶Converts the specified time to a time index.