Experiment Run Manager
The core experiment execution engine: takes tasks from the queue and schedules them by measurement/sequence/run level.
Overview
quatm/GUI/experiment/experiment_manager.py provides the experiment run manager
(ExperimentManager): the engine that takes tasks out of the experiment queue and executes them. The
queue polling runs in a worker thread, and tasks are scheduled in the hierarchy measurement
(measurement) → repetition (repetition) → sequence/scan (sequence) → single run (run).
Key methods
| Method | Description |
|---|---|
queue_fn | Continuously polls the task dictionary: picks tasks by priority, task number and reservation time |
run | Task-run wrapper: guarantees teardown however the task ends |
pause | Pauses / resumes the current experiment |
terminate_experiment | Graceful termination: lets the current run finish naturally before stopping |
start_measurement / start_sequence / end_sequence / end_measurement | Hooks for the individual experiment stages |
set_dict | Writes a single parameter to an attribute of the experiment object |
set_run_nr / set_rep_nr | Synchronises the run / repetition number |
start_queue / shutdown | Starts / stops the resident queue worker |
Usage
from quatm.GUI.experiment.experiment_manager import ExperimentManager
manager = ExperimentManager(browser) # browser supplies the queue and the interface
manager.start_queue()
For a fuller description see Experiment manager.