Loop Manager

Conditional loop executor: automatically repeat/jump/terminate a group of tasks based on measurement results.

Overview

quatm/GUI/looper/ provides the loop manager (Looper): task entries are organised as “loop groups (tabs)”, the entries of a group are executed in order, and the jumps or termination are decided from measurement results. LoopManager runs the loop in a background thread; the loop definition is persisted in loopfile.json and shared with the web remote-control platform.

Core logic

LoopManager.run_loop(): start from the first group, loop indefinitely until terminate
  └─→ execute the entries of the group in order
       ├─ Task: submit to the experiment queue, advance once complete (maximum count configurable)
       └─ Conditional: read data-stream fields and compare → jump if satisfied / else branch otherwise

Components

ComponentDescription
LoopGroupLoop group (one tab)
TaskItem / ListItemTask entry / task-list entry
ConditionalItem etc.Condition entries such as data conditions, arrival index and time
BaustellePanel for adding/removing/editing the entries of a group
DataManagerSubscribes to data streams and accumulates the latest measurement values
LoopManagerLoop executor (run_loop() / terminate(), background thread)

Usage

from quatm.GUI.looper import Looper

looper = Looper(parent=browser)   # looper tab of the dock at the top of the browser

For a fuller description see Looper.