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
| Component | Description |
|---|---|
ExperimentSubWindow | Graphical container: stores the window geometry and clamps the window inside the visible area |
ExperimentWindow | Single-experiment control panel: parameter grid + submit/scan/save controls |
SequenceEditor | Scan sequence dialog: sets start, stop and step count per dimension to generate an nD scan |
Key methods (ExperimentWindow)
| Method | Description |
|---|---|
submit_to_queue | Submits the current experiment to the experiment queue for execution (the unified entry point for all submission buttons) |
submit_next | Submits with the highest priority, ahead of all existing tasks |
submit_to_prepper | Submits to the preparation station (PrepStation) for staging |
setup_scan | Builds the scan sequence (parameter values and randomised run order) from the scan definition |
setup_task_dict | Builds the task dictionary stored in the queue/preparation station |
build_argument_dict | Collects values from the parameter grid controls into a complete parameter dictionary |
save_params / load_params | Saves parameters to JSON (named by date/time, optionally backed up) and loads them back |
adaptive_columns | Re-flows the parameter grid columns to the window width (roughly one extra column per 200 px) |
edit_sequence | Opens 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.