DataParser#

class cherab.lhd.emc3.repository.parse.DataParser(directory_path: Path | str, grid_file: Path | str)Source#

Bases: object

EMC3-EIRENE raw data parser.

This class offers methods to read several raw data calculated by EMC3-EIRENE.

Parameters:
directory_pathstr | pathlib.Path

Path to the directory storing EMC3-calculated data.

grid_filestr | pathlib.Path

Path to the grid file.

Examples

>>> from cherab.lhd.emc3.repository.parse import DataParser
>>> parser = DataParser("path/to/the/data/directory", "path/to/the/grid/file.nc")
>>> parser.plasma_radiation()
array([0.000e+00, 0.000e+00, 0.000e+00, ..., 9.450e-33, 4.922e-33,
       2.659e-33])
>>>
>>> parser.density_ions()
{
    'H+': array([3.7917e+19, 3.5602e+19, 3.7012e+19, ..., 4.3626e+16, 1.5922e+16,
                 1.1246e+16]),
    'C1+': array([0.0000e+00, 0.0000e+00, 0.0000e+00, ..., 6.6688e+16, 6.2780e+16,
                  5.0213e+16]), ...
}

Methods

density_electron([filename])

Load electron density data which is same as H+ ones.

density_ions([filename])

Load ions density data.

density_neutrals()

Load neutral particles density data.

impurity_radiation([filename])

Load impurity radiation data.

plasma_radiation([filename])

Load plasma radiation data.

radiation()

Load total radiation data: plasma + impurity radiation.

temperature_electron_ion([filename])

Load electron and ion (H+) temperature.

temperature_neutrals()

Load neutral particles temperature data.