idstools.machinedescription¶
Module Contents¶
-
class idstools.machinedescription.MachineDescription(summary_yaml_file: str =
'')[source]¶ - md_summary_yaml¶
- check_if_exist(pulse: int, run: int)[source]¶
The function checks if a given pulse and run combination exists in a yaml dictionary.
-
get_children(pulse: int, run: int, dict_to_fill=
{})[source]¶ The function get_children recursively retrieves information about replaced pulses and runs from a dictionary and stores it in a new dictionary.
- Parameters:¶
- pulse: int¶
The “pulse” parameter is an integer that represents a pulse number.
- run: int¶
The run parameter in the get_children method represents the run number.
- dict_to_fill=
{}¶ The dict_to_fill parameter is a dictionary that is used to store the information about the children of a given pulse and run. It is initially an empty dictionary and is passed as an argument to the function to accumulate the information about the children.
- Returns:¶
a dictionary dict_to_fill that contains information about the children of a given pulse and run. The dictionary has keys “pulse”, “run”, “status”, and “reason_for_replacement”, and the corresponding values are lists that store the information for each child.
- get_family(pulse: int, run: int)[source]¶
The function “get_family” returns a dictionary containing the parents and children of a given pulse and run.
-
get_latest_ids_data(ids_name: str, backend=
'MDSPLUS', user='public', database='ITER_MD', version=3)[source]¶
- get_pandas_data_frame()[source]¶
The function get_pandas_data_frame converts a dictionary into a pandas DataFrame.
- Returns:¶
a pandas DataFrame object.
-
get_parents(pulse: int, run: int, dict_to_fill=
{})[source]¶ The get_parents function recursively retrieves the parent information for a given pulse and run, populating a dictionary with the parent pulse, parent run, status, and reason for replacement.
- Parameters:¶
- pulse: int¶
The pulse parameter is an integer that represents a pulse number.
- run: int¶
The run parameter is an integer that represents the run number.
- dict_to_fill=
{}¶ The dictToFill parameter is a dictionary that is used to store the information about the parents of a given pulse and run. It is initially an empty dictionary and is passed as an argument to the get_parents function. The function fills this dictionary with the parent information and returns it.
- Returns:¶
a dictionary dict_to_fill that contains information about the parents of a given pulse and run.
- get_reason_for_replacement(pulse: int, run: int)[source]¶
The function get_reason_for_replacement takes in two parameters, pulse and run, and returns the value of the key “reason_for_replacement” from the yaml object dictionary using the pulse and run as keys.
- get_replaced_by(pulse: int, run: int)[source]¶
The function get_replaced_by takes in two parameters, pulse and run, and returns the value of the key “replaced_by” from the yaml object dictionary using the pulse and run as keys.
- get_replaces(pulse: int, run: int)[source]¶
The function get_replaces takes in two parameters, pulse and run, and returns the value of the key “replaces” from the yaml object dictionary using the pulse and run as keys.
-
idstools.machinedescription.MD_IDSES =
"'tf,wall,pf_passive,pf_active,magnetics'"¶
- idstools.machinedescription.logger¶