daplis_rtp.gui.MZI_tab module

This script generates the tab for online photon count plotting.

Two pixels are chosen for which the photon count registered is plotted side by side. Can be used in the Mach-Zehnder interferometer setup to follow the changes of the photon counts in two pixels, or in other setups for checking the stability.

class daplis_rtp.gui.MZI_tab.MZI(parent=None)[source]

Bases: QWidget

__init__(parent=None)[source]

Creation of the tab.

The tab is generated with a ‘Browse’ button along with a line edit field for choosing/inserting the address of the data file to plot. Combo boxes for LinoSPAD2 daughterboard number and the firmware version are generated. A check box for applying and a button for undoing the mask are generated. A spin box for the number of timestamps per pixel/TDC per cycle is provided. A check box for switching between a linear and a logarithmic scale of the plot is also provided. Buttons ‘Refresh plot’ for refreshing the plot and ‘Start stream’ for plotting the last file found are created. Four fields are provided for the axis limits - lower and upper for x and for y - each accepting a float in plain or scientific notation, or nothing at all, in which case that edge autoscales.

apply_limits()[source]

Push the current limits onto the existing plot.

Applied directly rather than by replotting: the MZI trace is built up point by point across refreshes, so there is no single data set to redraw from.

change_path()[source]

Called when address is inserted to the line edit.

Sets the path variable to the address inserted.

get_dir()[source]

Called when the ‘browse’ button is pressed.

Sets the path variable to the address chosen.

resetPlot()[source]
resizeEvent(self, a0: QResizeEvent | None)[source]
slot_checkplotscale_2()[source]

Called when state of the check box for scale is changed.

Switches between logarithmic and linear scale of the plot.

slot_refresh()[source]

Called when the ‘Refresh button’ is pressed.

Refreshes the plot, either the current one or updates with the new data if new data were taken.

slot_startstream()[source]

Called when the ‘Start stream’ button is pressed.

Starts an infinite cycle of refreshing the plot when new files are found in the folder.

slot_stopstream()[source]
slot_updateLimits()[source]

Called when any of the four axis-limit fields is committed.

Re-reads all four and redraws, so a new limit takes effect without waiting for the next data file.

update_time_stamp()[source]

Called during the cycle of real-time plotting.

Load data from the last data file found in the directory provided.