-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1_TT_Fluorescence and Antibunching.py
46 lines (38 loc) · 1.24 KB
/
1_TT_Fluorescence and Antibunching.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 24 13:47:26 2020
@author: liu
"""
from time import sleep
import plot_TT
from TimeTagger import createTimeTagger, freeAllTimeTagger, Histogram, Correlation
# create a Time Tagger instance
tagger = createTimeTagger()
tagger.reset()
# measure time-resolved fluorescence
click_ch = 1 # photon count at 1st channel
start_ch = 2 # laser pulse at 2nd channel
binwidth = 1000 # 1 ns
bins = 1000
hist = Histogram(tagger, click_ch, start_ch, binwidth, bins)
print("\nHistogram measurement is running.")
# measure photon antibunching
corr_ch1 = 3 # first photon channel for antubunching measurements
corr_ch2 = 4 # second photon channel for antibunching measurements
bwcorr = 1000 # 1 ns
nbins = 1000
corr = Correlation(tagger, corr_ch1, corr_ch2, bwcorr, nbins)
print("\nCorrelation measurement is running.")
# collect data for 10 seconds and plot
sleep(10)
# start-stop histogram -> TRFL data
xhist = hist.getIndex()
yhist = hist.getData()
plot_TT.ScatterPlot(xhist, yhist)
plot_TT.ScatterLogPlot(xhist, yhist)
# normalized correlation -> Photon Antibunching
xcorr = corr.getIndex()
ycorr = corr.getDataNormalized()
plot_TT.LinePlot(xcorr, ycorr)
# terminate the open connection to the Time Tagger
freeAllTimeTagger()