daplis_rtp.gui.plot_figure_MZI module
Module for plotting photon count from two chosen pixel in real time.
Unpacks the binary data, finds the two pixels requested and plots the number of photons registered by the two pixels. x-axis limits are given by the slider, upper y-axis limit is set as maximum of the two counts plus 10 percent.
- class daplis_rtp.gui.plot_figure_MZI.PltCanvas_MZI(parent=None, width=7, height=4, dpi=100)[source]
Bases:
QWidget- __init__(parent=None, width=7, height=4, dpi=100)[source]
Creation of the figure widget.
The widget is created with the bar with options.
- Parameters:
width (int, optional) – Figure widget width, by default 7.
height (int, optional) – Figure widget height, by default 4.
dpi (int, optional) – Figure widget dpi, by default 100.
- setPlotData_MZI(xdataplot, yplotdata1, yplotdata2, xLim, yLim, fontsize: int = 16)[source]
Plot data.
Plot the provided data, applying whichever axis limits were given explicitly and autoscaling the rest.
- Parameters:
xdataplot (array) – Data for the x-axis: elapsed time in seconds.
yplotdata1 (array-like) – Data for the left y-axis: photon rate in the first pixel.
yplotdata2 (array-like) – Data for the right y-axis: photon rate in the second pixel.
xLim (tuple of (float or None, float or None)) – Lower and upper limits for the x-axis. ‘None’ for either edge leaves that edge autoscaled; the upper edge then sits two seconds past the newest point, as it did when only the lower edge was adjustable.
yLim (tuple of (float or None, float or None)) – Lower and upper limits for the y-axis, ‘None’ for autoscale. Both y-axes always share the same limits so the two traces can be compared directly.
fontsize (int, optional) – Font size for the axes, by default 16.