Scroll window
A multi-channel real-time scrolling data viewer window: subplot buffers, data-stream subscription and dynamic refreshing.
Overview
quatm/GUI/entries/scrollwindow.py provides the scroll window (ScrollWindow): a BMainWindow
subclass that acts as a multi-channel real-time scrolling data viewer main window. It lays out
ScrollPlot subplots in the requested number (two per row), distributes data blocks to the
corresponding subplots and refreshes them uniformly; PlotDataEditor provides the data/image stream
selection drop-down.
Components
| Component | Description |
|---|---|
ScrollWindow | Main window: creates subplots by count, distributes data and refreshes |
ScrollPlot | Scrolling subplot: subscribes to a data stream, ring buffer + periodic refresh |
PlotDataEditor | Data-source selection panel: drop-down candidates written back to the property ydata |
Key methods
| Method | Description |
|---|---|
initPlots | Creates the scrolling subplots by count and places them in the layout (two per row) |
feedData | Feeds a new data block into the buffer data array |
updatePlot | Batch-refreshes the filled interval of the buffer into the curves of each subplot |
setnewData (ScrollPlot) | Timer-driven data pull and curve refresh |
dataSelectDialog (ScrollPlot) | Opens a dialog to select the data channels to plot |
subscribe_window (ScrollPlot) | Opens the subscription editor to change the data stream |
configureWindow (ScrollPlot) | Pauses refreshing and edits this plot’s configuration inline |
Usage
from quatm.GUI.entries.scrollwindow import ScrollWindow
win = ScrollWindow(name="PMT scroll monitor", parent=parent, n_plots=2)
Data-stream subscription, data-channel selection and display configuration are performed on each subplot through its context menu; the window can also be started as a standalone process.