Experiment window

The per-experiment control window: dynamic parameter grid, submission/scanning and parameter persistence.

Overview

quatm/GUI/browser/experiment_window.py provides the experiment window (ExperimentWindow): each experiment script corresponds to a control window carried by an ExperimentSubWindow in the browser’s MDI area. It generates a parameter grid automatically from the parameter objects declared by the experiment, and is responsible for submitting to the queue/preparer, building scans and loading/saving JSON parameters.

Components

ComponentDescription
ExperimentSubWindowGraphical container: stores the window geometry and clamps the window inside the visible area
ExperimentWindowSingle-experiment control panel: parameter grid + submit/scan/save controls
SequenceEditorScan sequence dialog: sets start, stop and step count per dimension to generate an nD scan

Key methods (ExperimentWindow)

MethodDescription
submit_to_queueSubmits the current experiment to the experiment queue for execution (the unified entry point for all submission buttons)
submit_nextSubmits with the highest priority, ahead of all existing tasks
submit_to_prepperSubmits to the preparation station (PrepStation) for staging
setup_scanBuilds the scan sequence (parameter values and randomised run order) from the scan definition
setup_task_dictBuilds the task dictionary stored in the queue/preparation station
build_argument_dictCollects values from the parameter grid controls into a complete parameter dictionary
save_params / load_paramsSaves parameters to JSON (named by date/time, optionally backed up) and loads them back
adaptive_columnsRe-flows the parameter grid columns to the window width (roughly one extra column per 200 px)
edit_sequenceOpens the scan sequence editor and applies the new sequence

Usage

from quatm.GUI.browser.experiment_window import ExperimentWindow

# normally opened by Browser.open_experiment; may also be constructed directly
win = ExperimentWindow(filepath=..., props=props, parent=subwindow, browser=browser)

The parameter objects declared by the experiment script (such as NumberValue / BoolValue / StringCombo) automatically produce editing controls with a label, unit and range; parameter sets can be saved as json and loaded again later.