daplis_rtp.gui.live_timestamps_tab module

This script generates the tab for online sensor population plotting.

The tab can be used to introduce changes to the setup while following the changes in real-time (depending on the actual data file size, the plotting can take minutes).

class daplis_rtp.gui.live_timestamps_tab.LiveTimestamps(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 widget with a grid of 4x64 of checkboxes with pixel numbers for masking single pixels is generated. A check box for switching between a linear and a logarithmic scale of the plot along with a check box for plotting vertical lines at positions 64, 128, and 192 are provided (the latter can be used for firmware version 2212s for setup alignment). A check box for data files collected with absolute timestamps is provided. Buttons ‘Refresh plot’ for refreshing the plot and ‘Start stream’ for plotting the last file found are created. Two spin boxes for the left and right limits for the x-axis, in pixels, are created.

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.

mask_pixels()[source]

Function for masking the chosen pixels.

presetmask_pixels()[source]

Called when the check box ‘Preset mask’ is checked.

Uses the masking data provided in the ‘params’ folder for masking of the warm/hot pixels. Uses the LinoSPAD2 daughterboard number to load appropriate data.

report_occupancy(occupancy, fw_ver, pix_add_fix)[source]

Hand one refresh’s slot occupancy to the status box.

The pixels of interest come either from the box’s own field or from the mask and the x-limits; they are pixel numbers as plotted, so they are mapped to TDCs with the same ‘pix_add_fix’ the rates were built with.

reset_pix_mask()[source]

Function for resetting the pixel masking by unchecking all pixel mask checkboxes.

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

Called when check box for plotting lines state changed.

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_mask_changed()[source]

Called whenever a box in the mask window is ticked.

Only refreshes the count beside the button; the mask array itself is rebuilt by ‘mask_pixels’ on the next refresh, so ticking a box never races the plotting.

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_updateLeftXLim()[source]

Called when the left x-limit spin box has changed.

Updates the left x-axis limit, keeping it below the right one.

slot_updateRightXLim()[source]

Called when the right x-limit spin box has changed.

Updates the right x-axis limit, keeping it above the left one.

update_time_stamp()[source]

Called during the cycle of real-time plotting.

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