-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask5.m
65 lines (41 loc) · 1.85 KB
/
task5.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
function task5(Tp_length)
%% Reimplement for time 5-6s
% Using picoseconds as the unit
% Variable declerations (Experimental)
% Default Trep_alignment2 = - 0.32476
Trep_alignment2 = - 0.32476;
% Default Td_upper_lim2 = 4.25e4 (Experimental)
% Adjust these values to change Td
Td_upper_lim2 = 4.75e4;
Td_lower_lim2 = Td_upper_lim2 - Tp_length;
% Team data is from 4s to 6s (Given)
time_start2 = 5e12;
time_end2 = time_start2 + 1e12;
% Inject the default values for debugging purposes
% Enter '1' for debugging, else for bypassing
debugging_mode = 0;
% Td filter variable. Default: Td_max = Tp_length
Td_filter_max = 100e3-Trep_alignment2;
%% Organize the command window
disp('=================================================================');
disp('Part II - Time 5-6s');
disp('=================================================================');
%% Enter the time period
create_team_data(time_start2, time_end2)
%% 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_alignment2, time_start2, time_end2, Td_upper_lim2, Td_lower_lim2, regression_disp);
%% Graph the normalized data
normalized_graph(Trep_alignment2, time_start2, time_end2, Tp_length);
%% Detector Statistics
% Task #2
detector_statistics()
%% Calculate occurances and probabilities
% Task #3 and Task #4
probability_hists(Trep_alignment2, time_start2, time_end2, debugging_mode, Td_filter_max);
%% Display Deliverables
fprintf('Trep = %f ps\n', 100e3 + Trep_alignment2);
fprintf('Tstart = %d ps ps\n', Td_lower_lim2);
end