Live data monitor
Real-time plotting of measurement data: data sources / multiple y axes, filtering/binning/fitting and export.
Overview
quatm/GUI/alignment/plotter.py provides the live data monitor (DataPlotterWidget): it plots the data acquired during a measurement. It supports switching the data source and provides an x-axis selector and several y-axis selectors; each y axis is processed through a configurable data chain (scale factor → filter → binning/fitting) before being drawn in the plot area, and the result can be exported to PDF.
Components
| Component | Description |
|---|---|
DataPlotterWidget | Main plot: data-source drop-down, x-axis selector, several y-axis selectors (right-click toggles the configuration panel) |
YAxisWidgetHelper | y-axis data chain: scale factor, filter, binning and fitting |
Key methods
| Method | Description |
|---|---|
setDataSource | Sets or changes the data source |
checkForNewData / updateDatasources | Checks for new data / new data sources and refreshes |
plotData | Adds a set of x/y data to the plot area as a new curve |
toggleConfig | Toggles display of the data-source and y-axis configuration panel |
exportpdf | Exports the current plot as an archival-quality PDF |
clear | Clears the data summary and all curves in the plot area |
Y-axis chain (YAxisWidgetHelper): updateYscale sets the scale factor; the context menu offers addBinning for binning and addFitting for fitting (e.g. Gaussian/linear), and reevaluateData re-runs the whole data chain after changes such as filters.
Usage
from quatm.GUI.alignment.plotter import DataPlotterWidget
plotter = DataPlotterWidget(
axis_name="myaxis",
prop_root="...",
datastream_names=[".../data"],
n_yaxis=1,
parent=parent,
)
plotter.toggleConfig() # expand the data-source / x, y axis selection config
For a more complete description, see Auxiliary plotting.