daplis_rtp.gui.tabs.online_plot module

Online plot: sensor population of one board, refreshed as files land.

The tab the application is mostly used through. A folder is chosen, the stream is started, and the plot follows the newest file in it - which is how the setup is aligned, since a change to the optics shows up on the plot within a file or two.

class daplis_rtp.gui.tabs.online_plot.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.