stoner_measurement.plugins.sequence.base.TopLevelSequence

class stoner_measurement.plugins.sequence.base.TopLevelSequence[source]

Bases: SequencePlugin

Concrete root container for the entire measurement sequence.

TopLevelSequence represents the invisible top-level node in the sequence tree. Its execute_sequence() implementation simply calls each sub-step callable in order, making it a transparent pass-through.

Unlike StateControlPlugin, this class is pure Python — it does not inherit from QObject and therefore has no Qt signals or event-loop dependencies.

The engine namespace is shared automatically because the SequenceEngine maintains a single flat dict for the duration of a run.

Variables:

name (str) – Always "Sequence".

Examples

>>> from qtpy.QtWidgets import QApplication
>>> _ = QApplication.instance() or QApplication([])
>>> from stoner_measurement.plugins.sequence import TopLevelSequence
>>> seq = TopLevelSequence()
>>> seq.plugin_type
'sequence'
>>> seq.name
'Sequence'
>>> called = []
>>> seq.execute_sequence([lambda: called.append("a"), lambda: called.append("b")])
>>> called
['a', 'b']
execute_sequence(sub_steps: list) → None[source]

Call each sub-step callable in order.

Parameters:

sub_steps (list) – Ordered list of zero-argument callables.

Examples

>>> from stoner_measurement.plugins.sequence import TopLevelSequence
>>> seq = TopLevelSequence()
>>> results = []
>>> seq.execute_sequence([lambda: results.append(1)])
>>> results
[1]
property name: str

Human-readable name for the root sequence container.

Returns:

Always "Sequence".

Return type:

(str)