Skip to content

Commit de28857

Browse files
Update Demo_HistogramRefresh.py
1 parent e65e43e commit de28857

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

demos/Demo_HistogramRefresh.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,32 @@
66
from threading import Timer
77
import time
88

9+
# Live-refresh histogram from photon arrival times
10+
# ================================================
11+
# This demo demonstrates how a histogram measurement can be acquired and
12+
# refreshed during acquisition from photon events recorded with a PicoQuant time
13+
# tagging device.
14+
#
15+
# The script initializes the device, loads an ini configuration file, and
16+
# configures a histogram measurement with a selected reference channel, bin
17+
# width, and number of bins. Photon arrival times are accumulated relative to the
18+
# reference channel and displayed as time-resolved histograms for the sync input
19+
# and all enabled detector channels.
20+
#
21+
# Setup:
22+
# The device configuration is loaded from an ini file. The histogram parameters
23+
# define the reference channel, the temporal resolution of the histogram bins,
24+
# and the total histogram range.
25+
#
26+
# During acquisition, the script repeatedly reads the current histogram data and
27+
# plots the result on a logarithmic count scale. After each refresh, the
28+
# accumulated measurement data are cleared so that the plot shows only the newly
29+
# acquired data for the latest update interval.
30+
#
31+
# This is useful for monitoring photon arrival-time distributions in real time,
32+
# checking timing alignment between channels, optimizing measurement settings,
33+
# and observing changes in the signal during an ongoing experiment.
34+
935
if(__name__ == "__main__"):
1036

1137
sn = snAPI()

0 commit comments

Comments
 (0)