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 therepetitionsofCPhaseDiagone should have the sequence level option named asCPhaseDiag_repetitions.The convenience prefix
GLOBALcan 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 overGLOBALoptions 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_repetitionsorRECURSIVE_GLOBAL_repetitions. OmittingRECURSIVEsets the option only on the top level sequence. TheRECURSIVEprefix 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:
node (Experiment | ExperimentTracker | _Sequence) – The experiment instance or an experiment tracker or a subsequence.
- Raises:
ValueError – if both
GLOBALand node name prefix name are specified; e.gGLOBAL_CPhaseDiag_repetitions- Return type:
None