Experiment browser

The Quatm main window: experiment browsing, queue management and a multi-window MDI workspace.

Overview

quatm/GUI/browser/main_window.py provides the experiment browser (Browser): Quatm’s main application window, built on QMainWindow + QMdiArea as a multiple-document interface. The file selector on the left browses experiment scripts, the experiment queue, preparation station and looper are docked at the top, and each experiment occupies its own sub-window in the central MDI area.

Layout

┌───────────────┬───────────────────────────────┐
│ FileSelector  │   QMdiArea (subwindow area)   │
│ (file tree)   │   ┌─────────────────────┐     │
│               │   │ ExperimentWindow    │     │
├───────────────┤   └─────────────────────┘     │
│ Queue / Prep  │                               │
│ / Looper dock │                               │
└───────────────┴───────────────────────────────┘

Core components

ComponentModuleDescription
FileSelectorbrowser/file_selector.pyExperiment directory tree; double-clicking opens the experiment or simulation window
ExperimentWindowbrowser/experiment_window.pyControl panel for a single experiment inside the central MDI area
ExperimentQueueexperiment/experiment_queue.pyTabular task queue
ExperimentManagerexperiment/experiment_manager.pyTakes tasks from the queue and executes them
PrepStationexperiment/prepstation.pyStaging and editing of tasks before they are sent to the queue
Looperlooper/ui.pyConditionally repeats a group of tasks based on measurement results

Details of each component are given on the corresponding page in this section.

Lifecycle

  • init_ui / create_dock_widgets: adapts the default geometry to the screen and creates the MDI canvas together with the two dock areas (the file selector on the left; the queue, preparation station and looper at the top).
  • open_experiment: opens an experiment window; if it is already open, restores it from minimised state and raises it.
  • closeEvent: first saves the main-window geometry and the state of all experiment sub-windows, then stops the queue/looper worker threads, and finally hands over to the base class to complete the close.
  • moveEvent / resizeEvent: debounced geometry saving, so that the window position and size are restored on the next start.

Usage

from quatm.GUI.browser.main_window import Browser

browser = Browser()
browser.show()

The experiment browser is the interface through which every experiment other than the helpers is run; it is normally started as the main process by the process manager.