exa.core.sequence.util.update_options

Contents

exa.core.sequence.util.update_options#

update_options(node, options)#

Updates the options of an experiment or a sequence from the sequence-level options.

The relevant sequence level options are chosen and their values applied to the node’s options. For the usage of this function, the sequence options should be named f"{experiment_class_name}_{experiment_option_name}". For example, to set the repetitions of CPhaseDiag one should have the sequence level option named as CPhaseDiag_repetitions.

The convenience prefix GLOBAL can be used in place of an experiment class name to set the option for any Experiment or ExperimentTracker regardless or class name. In case node is a Sequence the option is set for all contained experiments. Class name options take precedence over GLOBAL options if both are specified for the same option.

Options can also be preceded with RECURSIVE, which will cause the option to be recursively applied also to all subsequences in case node is a Sequence. For example, RECURSIVE_CPhaseDiag_repetitions or RECURSIVE_GLOBAL_repetitions. Omitting RECURSIVE sets the option only on the top level sequence. The RECURSIVE prefix has no effect on Experiment or ExperimentTracker node objects. Non-recursive options take precedence over recursive ones if both are specified for the same option. The order of prefixes has no effect on execution.

Parameters:
Raises:

ValueError – if both GLOBAL and node name prefix name are specified; e.g GLOBAL_CPhaseDiag_repetitions

Return type:

None