daplis_rtp.gui.tabs package

The five tabs, in the order the window shows them.

class daplis_rtp.gui.tabs.LinoSPAD2Dual(parent=None)[source]

Bases: PlotTab

Photon rate across both sensor halves, from two boards at once.

bind_session()[source]

Register the controls this tab should remember.

build()[source]

Fill the shell. Every tab writes this and nothing else.

canvas_class

alias of DualSensorCanvas

combined_mask()[source]

Both boards’ masks laid end to end on the 0-511 axis.

hint_text = 'Both sensor halves end to end, from two boards writing in step. Board 2 is always address-corrected; Ctrl+click a pixel to mask it.'
mask_pixels()[source]
on_refresh_requested()[source]

Hook: what an explicit ‘look again’ re-arms.

on_stream_start()[source]

Hook: what this tab arms when a run starts.

on_stream_stop()[source]

Hook: what this tab stands down when a run ends.

plotted_data()[source]

The numbers behind the plot, for File -> Export.

Returns None when there is nothing to export, or a dict:

stem

A suggested file name, without an extension.

columns

Ordered {heading: 1-D array}; every column the same length.

notes

Lines describing where the numbers came from, written into the file as # comments so that a plot found on a disk six months later can still say what it was.

presetmask_pixels()[source]

Apply each board’s recorded warm-pixel mask, or lift them.

Each board uses the shared daughterboard and its own motherboard to look up its file. A board with no mask recorded is skipped silently; the warning comes only when neither has one, since one board masked and the other not is a perfectly ordinary state.

refresh()[source]

Read the newest file and redraw. Written by every tab.

report_occupancy(fw_ver, occupancy_1, occupancy_2)[source]

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

The pixels of interest are given on the 0-511 x-axis of this tab, so each board takes the part of them that falls on its own half and maps it to TDCs with the pix_add_fix its rates were built with - always off for board 1 and on for board 2.

reset_pix_mask()[source]
session_scope = 'full_sensor'
slot_mask_changed()[source]

Rebuild both masks, update the count, and redraw.

toggle_pixel_mask(pixel)[source]

Ctrl+click on the plot: mask this pixel, or unmask it.

The plot’s x-axis runs 0-511 across both halves, so which board the click landed on is the half it fell in.

watched_paths()[source]

The folders a running stream should watch. Tabs override.

class daplis_rtp.gui.tabs.LiveTimestamps(parent=None)[source]

Bases: PlotTab

Photon rate per pixel, for a single LinoSPAD2 board.

bind_session()[source]

Register the controls this tab should remember.

build()[source]

Fill the shell. Every tab writes this and nothing else.

canvas_class

alias of SensorCanvas

hint_text = 'Photon rate per pixel, from the newest file in the folder. Start the stream to follow it as files arrive; Ctrl+click a pixel to mask it.'
mask_pixels()[source]
on_refresh_requested()[source]

Hook: what an explicit ‘look again’ re-arms.

on_stream_start()[source]

Hook: what this tab arms when a run starts.

on_waiting_for_data()[source]

Hook: say, quietly, that the folder is still empty.

plotted_data()[source]

The numbers behind the plot, for File -> Export.

Returns None when there is nothing to export, or a dict:

stem

A suggested file name, without an extension.

columns

Ordered {heading: 1-D array}; every column the same length.

notes

Lines describing where the numbers came from, written into the file as # comments so that a plot found on a disk six months later can still say what it was.

presetmask_pixels()[source]

Apply the recorded warm-pixel mask, or lift it again.

The file is looked up from the daughterboard and motherboard chosen above; a combination that has no mask recorded says so and clears the tick rather than leaving it set over nothing.

refresh()[source]

Read the newest file and redraw. Written by every tab.

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]
session_scope = 'online_plot'
slot_mask_changed()[source]

Rebuild the mask, update the count, and redraw.

Redrawing here is what makes a tick visible at once: the rates are kept unmasked, so re-applying the mask to them is the whole of the work, and it costs one redraw rather than a re-read of the file.

toggle_pixel_mask(pixel)[source]

Ctrl+click on the plot: mask this pixel, or unmask it.

watched_paths()[source]

The folders a running stream should watch. Tabs override.

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

Bases: PlotTab

Two pixels’ photon rate against elapsed time.

bind_session()[source]

Register the controls this tab should remember.

build()[source]

Fill the shell. Every tab writes this and nothing else.

canvas_class

alias of MziCanvas

hint_text = 'Photon rate in two pixels against time — one point per data file. Start the stream and the trace grows as files arrive.'
on_stream_start()[source]

Hook: what this tab arms when a run starts.

on_waiting_for_data()[source]

Hook: say, quietly, that the folder is still empty.

plotted_data()[source]

The numbers behind the plot, for File -> Export.

Returns None when there is nothing to export, or a dict:

stem

A suggested file name, without an extension.

columns

Ordered {heading: 1-D array}; every column the same length.

notes

Lines describing where the numbers came from, written into the file as # comments so that a plot found on a disk six months later can still say what it was.

refresh()[source]

Read the newest file and redraw. Written by every tab.

resetPlot()[source]
session_scope = 'mzi'
watched_paths()[source]

The folders a running stream should watch. Tabs override.

class daplis_rtp.gui.tabs.SinglePixelHistogram(parent=None)[source]

Bases: PlotTab

Histogram of one pixel’s timestamps within the acquisition cycle.

bind_session()[source]

Register the controls this tab should remember.

build()[source]

Fill the shell. Every tab writes this and nothing else.

canvas_class

alias of HistogramCanvas

cycle_length_change()[source]
hint_text = "Arrival times of one pixel's photons within the acquisition cycle. A healthy pixel gives a flat top."
on_session_restored()[source]

Re-read the cycle length out of its restored field.

Silently, unlike ‘cycle_length_change’: this runs while the tab is still being built, and a warning box here would come up before the window it belongs to.

plotted_data()[source]

The numbers behind the plot, for File -> Export.

Returns None when there is nothing to export, or a dict:

stem

A suggested file name, without an extension.

columns

Ordered {heading: 1-D array}; every column the same length.

notes

Lines describing where the numbers came from, written into the file as # comments so that a plot found on a disk six months later can still say what it was.

refresh()[source]

Read the newest file and rebuild the histogram.

There is no stream on this tab: a histogram is something to look at, not something to watch move. The button reads the newest file every time it is pressed, so a run in progress is followed by pressing it again.

session_scope = 'single_pixel_histogram'
class daplis_rtp.gui.tabs.Synchronization(parent=None)[source]

Bases: TabShell

Tab for controlling two-board synchronized acquisition over TCP.

BOARD_INFO = {0: ('Board 0  (dev 0 / #33)', 5555), 1: ('Board 1  (dev 1 / #21)', 5556)}
HINT = "Both LinoSPAD_synchro.exe instances must be running and 'Listening' first. Use 25 MHz on the external clock. Each board saves to its own GUI's AutoSave path."
__init__(parent=None)[source]

Submodules