idstools.domain.kineticprofiles

Module Contents

class idstools.domain.kineticprofiles.KineticProfilesCompute[source]
IMPURITY_LIMIT = '0.001'
a = 'None'
available_ids = 'None'
common_time_array = 'None'
common_time_length = 'None'
connection = 'None'
core_profiles = 'None'
edge_profiles = 'None'
edge_required = 'None'
electron_density = 'None'
electron_temperature = 'None'
equilibrium = 'None'
erho = 'None'
gset = 'None'
initialised = 'None'
ion_density = 'None'
ion_temperature = 'None'
ion_vphi = 'None'
ion_vpol = 'None'
is_composition_available = 'True'
is_core_profiles_present = 'True'
is_edge_profiles_present = 'False'
is_equilibrium_present = 'False'
max_vphi = 'None'
max_vpol = 'None'
min_vphi = 'None'
min_vpol = 'None'
mrho = 'None'
n = 'None'
nrho = 'None'
nspec_over_ne = 'None'
nspecies_core = 'None'
nspecies_edge = 'None'
profiles = 'None'
r_out_graph = 'False'
rho_tor_norm = 'None'
species = 'None'
species_map = 'None'
ti_e_flag = 'None'
ti_flag = 'None'
time_array_core_profiles = 'None'
time_array_edge_profiles = 'None'
time_array_equilibrium = 'None'
time_array_length_core_profiles = 'None'
time_index_core_profiles = 'None'
time_index_edge_profiles = 'None'
time_index_equilibrium = 'None'
time_value_core_profiles = 'None'
time_value_edge_profiles = 'None'
time_value_equilibrium = 'None'
volume = 'None'
vphi_e_flag = 'None'
vphi_flag = 'None'
vpol_e_flag = 'None'
vpol_flag = 'None'
waveform = 'None'
xbeg = 'None'
xend = 'None'
z = 'None'
zeff = 'None'
analyze(connection, time_value, edge_required, dd_update=False)[source]
check_idsses(dd_update=False)[source]

The function check_idsses checks for the presence of core profiles, edge profiles, and equilibrium data and logs appropriate messages based on the presence of the data.

Returns:

The function check_idsses is returning a boolean value. It returns True if either is_core_profiles_present or is_edge_profiles_present is True, indicating that data is present to plot. If both is_core_profiles_present and is_edge_profiles_present are False, it logs a critical message and returns None.

create_wave_form(ndim)[source]

The function create_wave_form returns a dictionary with three keys, each containing a list of zeros with a length specified by the ndim parameter.

Parameters:
ndim

The ndim parameter in the create_wave_form function represents the number of dimensions for which you want to create the wave form. This parameter is used to determine the length of the lists in the dictionary that is returned by the function.

Returns:

“central”, “edge”, and “rho95”, each containing a list of zeros with a length specified by the input parameter ndim.

Return type:

A dictionary is being returned with three keys

fill_idses(time_slice)[source]

This function fills in various profiles and data for a given time slice in a plasma physics simulation.

Parameters:
time_slice

The fill_idses method you provided seems to be handling the filling of various profiles and data based on a given time slice. The time_slice parameter is used to specify a part``icular time at which the data should be retrieved and processed.

get_ids(ids_name='', dd_update=False)[source]

This function retrieves a specific IDS object based on the provided name and checks if it is present in the data-entry.

Parameters:
ids_name=''

The ids_name parameter is used to specify the name of the IDS (Intelligent Data Structure) that you want to retrieve. It is a string parameter that should correspond to the specific IDS structure you are interested in accessing.

Returns:

The function get_ids returns a tuple containing two values - ids_object and ids_present.

get_ion_density()[source]

This function retrieves ion density data from core and edge profiles, handling different cases and logging warnings for any issues encountered.

Returns:

The get_ion_density method returns a dictionary ion_density containing ion density values for each species at different radial positions.

get_ion_temperature()[source]

This function retrieves ion temperatures from core and edge profiles and returns them in a list.

Returns:

The function get_ion_temperature returns a list of ion temperatures. The list is populated based on certain conditions and calculations involving the input parameters and attributes of the object.

get_min_max_velocity_profiles()[source]

This function calculates the minimum and maximum velocity profiles for different species in a plasma system.

Returns:

The get_min_max_velocity_profiles method returns a dictionary containing the maximum and minimum velocity profiles for vphi and vpol. The keys in the dictionary are “max_vphi”, “min_vphi”, “max_vpol”, and “min_vpol”, each corresponding to the maximum and minimum values for the vphi and vpol profiles, respectively.

get_n_spec_nver_ne()[source]

This function calculates and displays plasma composition with species concentrations based on core profiles and mapping to edge species.

Returns:

The function get_n_spec_nver_ne returns the list nspec_over_ne, which contains the calculated values for the ratio of species density to electron density for each species in the core profiles. If the conditions specified in the function are not met, the function returns a list of zeros with the same length as the number of species in the core profiles.

get_profiles()[source]

The function get_profiles retrieves and organizes various plasma profiles and species densities based on certain criteria.

Returns:

The function get_profiles returns a dictionary profiles containing various profiles related to core and edge plasma parameters. The dictionary includes keys such as “rhonorm”, “te”, “ti”, “ne”, “zeff” for core profiles, and “rhonorm_e”, “te_e”, “ti_e”, “ne_e”, “zeff_e” for edge profiles.

get_rho_or_r_outboard_profile()[source]

This function retrieves the rho_tor_norm profile for the outboard region based on core and edge profiles data.

Returns:

The function get_rho_or_r_outboard_profile returns a dictionary with keys “xbeg”, “xend”, and “rho_tor_norm”. The values associated with these keys are the variables xbeg, xend, and rho_tor_norm respectively.

get_rho_tor_norm()[source]

This function calculates and returns the values of nrho, mrho, and erho based on certain conditions and data availability.

Returns:

nrho, mrho, and erho.

Return type:

The function get_rho_tor_norm returns three values

get_species()[source]

The function get_species determines the number of species present in core and edge profiles data, handling exceptions and logging warnings if necessary.

Returns:

The get_species method returns a tuple containing the number of species in the core profiles (nspecies_core) and the number of species in the edge profiles (nspecies_edge).

get_species_a_number()[source]

This function retrieves the ‘a’ attribute values for different species from core or edge profiles data and handles exceptions accordingly.

Returns:

The function get_species_a_number returns a list a containing integer values extracted from the attribute a of different elements in the core or edge profiles based on certain conditions. The values are read from either core_profiles or edge_profiles

get_species_atoms_n()[source]

This function retrieves the number of atoms for each species from core or edge profiles, with a fallback value of 1 if the data cannot be read.

Returns:

The get_species_atoms_n method returns a list n containing the number of atoms for each species in the core or edge profiles. The method first initializes the list with 1 for each species, then attempts to read the number of atoms for each species from the core or edge profiles data.

get_species_list()[source]

This function retrieves a list of species based on certain conditions and data sources.

Returns:

A list of species based on the conditions specified in the code snippet. If the number of core species is greater than 0, the function will return a list of species either from the Mendeleiev table or from core profiles or edge profiles based on certain conditions. If the number of core species is not greater than 0, the function will return None.

get_species_map()[source]

The function get_species_map creates a mapping of species between core and edge profiles based on certain conditions.

Returns:

The species_map is being returned.

get_species_z_number()[source]

This function retrieves the Z number (atomic number) for each species in the core or edge profiles data.

Returns:

The get_species_z_number method returns a list z containing the atomic numbers of different species. The method first initializes the list z with zeros, then based on the availability of core profiles or edge profiles, it reads the atomic numbers of species from the corresponding profiles and populates the z list.

get_v_phi_profile()[source]

This function retrieves toroidal velocity profiles for ions from core and edge plasma profiles.

Returns:

1. “vphi_flag”: Indicates the status of the toroidal velocity for the core profiles. It can have values 0, 1, or 2. 2. “vphi_e_flag”: Indicates the status of the toroidal velocity for the edge profiles. It can have values 0, 1

Return type:

The function get_v_phi_profile returns a dictionary with three keys

get_volume_profile()[source]

The function get_volume_profile retrieves volume data from core and edge profiles, handling different scenarios based on the availability of data.

Returns:

The get_volume_profile method returns a list volume containing volume values for the core and edge profiles. The volume values are obtained from different sources based on the conditions and availability of data. The method populates the volume list with volume values for the core profiles, edge profiles, or equilibrium data, depending on the conditions and data availability.

get_vpol_profile()[source]

The get_vpol_profile function retrieves poloidal velocity profiles for ions from core and edge plasma profiles.

Returns:

1. “vpol_flag”: an integer indicating the status of the poloidal velocity calculation for the ions in the core and edge profiles. 2. “vpol_e_flag”: an integer indicating the status of the poloidal velocity calculation for the edge profiles. 3. “ion_vpol”: a dictionary containing the calculated pol

Return type:

The get_vpol_profile method returns a dictionary with three keys

get_waveform()[source]

The function get_waveform retrieves various plasma waveforms from a data source and organizes them into a dictionary structure.

Returns:

The function get_waveform returns a dictionary containing various waveforms related to plasma parameters such as electron temperature, ion temperature, electron density, impurity density, impurity velocity components (poloidal and toroidal), and effective charge. The dictionary also includes information about the time array and the total ion density.

get_zeff_profile()[source]

The function get_zeff_profile retrieves Zeff profiles from core and edge plasma profiles, handling potential data mismatches.

Returns:

The function get_zeff_profile returns a list zeff containing Z-effective values for both core and edge profiles. The list is constructed by first initializing it with zeros, then populating it with Z-effective values from core and edge profiles if they are present. The Z-effective values are read from the respective profile objects and stored in the zeff list based on the indices

getgset()[source]

This function retrieves the outer midplane array index for edge profiles, with some additional checks and warnings.

Returns:

The function getgset is returning the variable gset.

getne_profile()[source]

This function retrieves electron density profiles from core and edge plasma profiles data.

Returns:

The function getne_profile returns a list of electron density values. The electron density values are collected from different sources based on the conditions specified in the function. The returned list contains electron density values for both core and edge profiles, with NaN values filled in case of missing data.

gette_profile()[source]

This function retrieves electron temperature profiles from core and edge plasma profiles, converting the values to Kelvin.

Returns:

The function gette_profile returns a list electron_temperature containing electron temperatures. The electron temperatures are extracted from core and edge profiles data, converted to keV, and stored in the list based on the specified conditions. The list is then returned as the output of the function.

getti_flag()[source]

The function getti_flag checks and sets flags based on the availability and consistency of temperature data in core and edge profiles.

Returns:

The getti_flag method returns the values of ti_flag and ti_e_flag after performing certain checks and operations within the method.

idstools.domain.kineticprofiles.logger