daplis_rtp.gui.canvas.mzi module

Two pixels’ photon rate against time, on a shared pair of y-axes.

The two arms of a Mach-Zehnder interferometer land on two pixels, and what is being watched is how their counts move against each other. Both axes therefore always carry the same limits: two traces on independently scaled axes cross wherever they like and say nothing.

The trace is kept here as three arrays and redrawn whole. The old canvas instead added a fresh two-point line segment on every refresh, which meant an hour’s run ended as some thousands of Line2D objects that matplotlib walked on every draw - and meant there was no record of the trace to redraw, so a change of colour could only apply to the points that came after it.

class daplis_rtp.gui.canvas.mzi.MziCanvas(parent=None, width=7, height=4, dpi=100)[source]

Bases: BaseCanvas

Photon rate in two pixels against elapsed time.

draw_data(data)[source]

What this kind of plot draws. Overridden by every subclass.

twin = True
x_label = 'Time (s)'
y_label = 'Photon rate (Hz)'