-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_code.m
82 lines (56 loc) · 2.15 KB
/
main_code.m
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
%% This project was made for Quantum Electronics course at Syracuse University
% Author: O. Hakan Yaran
% yaranhakan@gmail.com
% 04/27/2023
% Reference paper to this project:
% "Photon statistics characterization of a single-photon source" R Alléaume
% Using picoseconds as the unit
clc
clear
% Variable declerations (Experimental)
% Default Trep_alignment = - 0.324465
Trep_alignment = - 0.324465;
% Photon emission time length of the SPE (Given)
Tp_length = 2e4;
% Td Synchronization
% Default Td_upper_lim = 8.62e4 (Experimental)
% Adjust these values to change Td
Td_upper_lim = 9.12e4;
Td_lower_lim = Td_upper_lim - Tp_length;
% Team data is from 4s to 6s (Given)
time_start = 4e12;
time_end = time_start + 1e12;
% Inject the default values for debugging purposes
% Enter '1' for debugging
debugging_mode = 0;
% Gating Feature Variable
% Gating ON: Td_filter_max = Tp_length
% Gating OFF: Td_filter_max = 100e3-Trep_alignment
Td_filter_max = 100e3-Trep_alignment;
% Td_filter_max = Tp_length;
%% Choose the time period of the team (4s-5s for our team)
%create_team_data(time_start, time_end)
%% Organize the command window
disp('=================================================================');
disp('Part I - Time 4-5s');
disp('=================================================================');
%% Synch and normalize the data and save it
% Task #1
% '1' to calculate the regression line, else to bypass
regression_disp = 0;
synch_data(Trep_alignment, time_start, time_end, Td_upper_lim, Td_lower_lim, regression_disp);
%% Graph the normalized data
normalized_graph(Trep_alignment, time_start, time_end, Tp_length);
%% Detector Statistics
% Task #2
detector_statistics()
%% Calculate occurances and probabilities
% Task #3 and Task #4
probability_hists(Trep_alignment, time_start, time_end, debugging_mode, Td_filter_max);
%% Display Deliverables
fprintf('Trep = %f ps\n', 100e3 + Trep_alignment);
fprintf('Tstart = %d ps ps\n', Td_lower_lim);
%% Reimplement the program for T = 5-6
% Task #5
% REMOVE THE COMMENT OPERATOR TO CALCULATE T = 5-6
% task5(Tp_length)