dqa.tasks.data_structure.RearrangeDatasetByRowNames#

class dqa.tasks.data_structure.RearrangeDatasetByRowNames(regex: str | List[str], keep_old: bool = False, index_name: str | None = None, **kwargs)#

Parses the data row names using a regex that determines machine name, measurement index and coordinate along a new axis.

The regex parses the following relevant groups for the rearrangement: - Row: The new name of the data row. - Machine: The name of the machine the data row should belong to. - Measurement: An identifier for the measurement the data row should belong to. Later the result measurements are

sorted by this identifier.

  • Coordinate: If multiple input rows should be stacked to a higher dimensional array, this can be set. Before stacking, the arrays with the same name given as ‘Row’ are sorted by this identifier.

Parameters:
  • regex (str or list of strings) – The regular expression used to parse the input names. If multiple ones are given, then they are attempted iteratively until one of them succeeds. To succeed, the regex must match the entire row name.

  • keep_old (bool, default=False) – Indicates whether unmatched data rows should be kept. Otherwise they will be deleted.

  • index_name (str, default=None) – An index row that is not converted using the regexes but instead saved for each measurement the data is saved to.

Methods

finish()

Can perform actions that are required to clean up after the task has finished, e.g. close network connections etc.

get_key_as_int

get_key_as_str

in_out_default

input_output_dataset

input_output_machine

input_output_mode

input_output_name

log

modify_data_row

modify_dataset

modify_dataset_dict

modify_machine

modify_measurement

set_logging_level

transfer_metadata