Sequence Editor
Experiment code editing and sequence simulation: syntax highlighting, parsing and output-channel timing visualisation.
Overview
quatm/GUI/editors/editor_sequencer.py provides the sequence editor (edit and simulate):
the CodeEditorParser composite window combines the CodeEditor code editor on the left with the
sequence visualisation on the right; after editing an experiment script you can simulate a run with one
click and the timing of the individual output channels is drawn as step plots.
Components
| Component | Description |
|---|---|
CodeEditor | Code editor: line numbers, Python highlighting, automatic indentation and completion |
PythonHighlighter / LineNumberArea | Syntax highlighting / line-number margin |
ExperimentParser | Parses an experiment: buildExperiment / simulateExperiment return the command stack |
ExperimentSequencer | Draws the sequence over time as a step plot for each output channel |
CodeEditorParser | Composite window: Save / Simulate / Clear toolbar + dock layout |
Usage
from quatm.GUI.editors.editor_sequencer import CodeEditorParser
win = CodeEditorParser(parent=parent, filename="experiments/my_experiment.py")
For a fuller description see Sequence editor.