Data and image stream monitor
Real-time scrolling plot window: subscribes to data/image streams and scrolls them, with running mean and right-click configuration.
Overview
quatm/GUI/entries/live_plot.py provides data-stream/image-stream scrolling monitoring (ScrollPlot): inside the multi-subplot scrolling window ScrollWindow, each ScrollPlot subscribes to several channels of one data stream, maintains a ring buffer and scrolls scatter points and a moving-average curve; PlotDataEditor provides a data-source selection drop-down.
Components
| Component | Description |
|---|---|
ScrollWindow | Multi-subplot scrolling main window: restorePlots restores / addPlot appends subplots |
ScrollPlot | Scrolling subplot: ring buffer, scatter and moving average, context-menu operations |
PlotDataEditor | Data-source selection panel: drop-down candidates written back to properties/the parent plot |
Key methods (ScrollPlot)
| Method | Description |
|---|---|
feedData / setnewData | Pushes a new data block into the buffer / periodically pulls and refreshes |
updatePlot / clearPlot | Refreshes the curve / clears and rebuilds this plot |
running_mean | Efficiently computes the N-point moving average using cumulative sums and differences |
dataSelectDialog / subscribe_window / configureWindow | Select channels / change subscription / configure |
deletePlot / updateTitle | Removes this plot / synchronizes the title and data source |
Usage
from quatm.GUI.entries.live_plot import ScrollWindow
host = ScrollWindow(name="PMT scroll monitor", parent=parent, n_plots=2)
For a more complete description, see Live scrolling plot.