cherab.imas.ids.edge_profiles.load_edge_speciesΒΆ

cherab.imas.ids.edge_profiles.load_edge_species(ggd_struct: IDSStructure, grid_subset_index: int = 5) dict[str, dict[str, ndarray | None]]SourceΒΆ

Load edge plasma species and their profiles from a given GGD structure.

The profiles are taken from the arrays with the given grid and subset indices (e.g. ggd[i1].electrons, ggd[i1].ion[i2].states[i3]).

The returned dictionary has the following structure.

{
    'electron': {
        'density': array,
        'temperature': array,
        ...
    },
    'molecule': {
        molecule_id: {  # frozenset identifier
            'density': array,
            'temperature': array,
            ...
        },
        ...
    'molecular_bundle': {
        molecular_bundle_id: {  # frozenset identifier
            'density': array,
            'temperature': array,
            ...
        },
        ...
    'ion': {
        ion_id: {  # frozenset identifier
            'density': array,
            'temperature': array,
            ...
        },
        ...
    'ion_bundle': {
        ion_bundle_id: {  # frozenset identifier
            'density': array,
            'temperature': array,
            ...
        },
    },
}

where species are identified by frozensets with (key, value) pairs with the following keys.

Species Type

Identifier Keys

molecule

name, elements, z, electron_configuration, vibrational_level, vibrational_mode;

molecular_bundle

name, elements, z_min, z_max;

ion

name, element, z, electron_configuration;

ion_bundle

name, element, z_min, z_max.

Parameters:
ggd_struct: IDSStructureΒΆ

The ggd ids structure containing the profiles.

grid_subset_index: int = 5ΒΆ

Identifier index of the grid subset, by default 5 ("Cells").

Returns:

Dictionary with plasma profiles.

Return type:

dict[str, dict[str, ndarray | None]]

Raises:

RuntimeError – If unable to determine the species due to missing element information.