cherab.imas.ids.core_profiles.load_core_speciesΒΆ

cherab.imas.ids.core_profiles.load_core_species(profiles_struct: IDSStructure) dict[str, dict[str, ndarray | None]]SourceΒΆ

Load core plasma species and their profiles from a given profiles IDS structure.

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:
profiles_struct: IDSStructureΒΆ

The IDS structure containing the core profiles data.

Returns:

Dictionary with the species and their profiles.

Return type:

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

Raises:

RuntimeError – If unable to determine the species type or identifier.