-
Notifications
You must be signed in to change notification settings - Fork 2
/
template.mst
295 lines (282 loc) · 9.42 KB
/
template.mst
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<!DOCTYPE html>
<html>
<head>
<title>Bell Inequality Experiment</title>
<meta charset="UTF-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.8.0/vis.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.8.0/vis.min.css" rel="stylesheet" type="text/css">
<style type="text/css">
table {
border-collapse: collapse;
}
table td, table th {
border: 1px solid black;
padding: 5px;
}
#e-value-graphs > div {
display: inline-block;
width: 400px;
height: 400px;
background-color: #eee;
border: 1px solid black;
}
</style>
</head>
<body>
<h1>Coincidents</h1>
<p>
Main result, the probability of conincidence in relation to the relative
angle of the detectors.
</p>
<div id="graph-coincidents" style="width: 100%; height: 500px"></div>
<h1>Maximum S values</h1>
<p>
Main result, the maximum possible S value for a selected angle as (a).
The bell theorem states that it's impossible for any HVT to exceed a
maximum S value of 2 for any selected 4 angles.
A perfect max S value is 2√2 = 2.83.
</p>
<div id="graph-s-max" style="width: 100%; height: 400px"></div>
<table id="table-s-max">
<thead>
<tr>
<th>Theory</th>
<th>S Max</th>
<th>Accuracy</th>
<th>a</th>
<th>b</th>
<th>a'</th>
<th>b'</th>
</tr>
</thead>
<tbody>
<tr></tr>
</tbody>
</table>
<h1>E Values</h1>
<p>
The raw angle correlation the max S is calculated from by choosing
a rectangle on this surface.
The shape of this surface can reveil many intresting aspects of the HVT
and be used to compare them.
</p>
<div id="e-value-graphs"></div>
<h1>Angle incident probability per detector relationship</h1>
<p>
Hygiene factor for the EPR. There should normally not be a correlation
between the angle of measurement and probability of incident per detector
as this would be inconsistent with the QM Prediction and violate reality.
</p>
<div id="graph-incidents" style="width: 100%; height: 300px"></div>
<h1>Angle A-B detector bias</h1>
<p>
Hygiene factor for the EPR. There should normally not be any significant
bias between the A or B detector for any angle of measurement
as this would be inconsistent with the QM Prediction and violate reality.
</p>
<div id="graph-bias" style="width: 100%; height: 200px"></div>
<h1>Total samples</h1>
<p>
Total samples/data points for each respective angle. Displays differences
in resolution between angles. There is one respective resolution for
incidents and one for coincidents.
</p>
<div id="graph-total" style="width: 100%; height: 200px"></div>
<div id="result-data" style="display: none;">{{ results }}</div>
<script>
$(function() {
var N_SIML = {{ N_SIML }};
var N_ARES = {{ N_ARES }};
var N_SMAX_AR = {{ N_SMAX_AR }};
var results = JSON.parse($("#result-data").text());
var itod = function(i_angle, ang_res) {
return (((Math.PI / 2) / ang_res) / 2) * (i_angle * 2 + 1) * 180 / Math.PI;
};
// Draw coincidents graph.
$.plot($("#graph-coincidents"), (function() {
var gdata = [];
for (var group_name in results) {
var hvt_res = results[group_name].result;
var data = [];
var dobj = {
label: group_name,
data: data
};
gdata.push(dobj);
for (var i_angle = 0; i_angle < N_ARES; i_angle++) {
var x = itod(i_angle, N_ARES);
var y = hvt_res[i_angle].coincidents / hvt_res[i_angle].total_ci;
data.push([x, y]);
}
}
return gdata;
})(), {
xaxis: { min: 0, max: 90 },
yaxis: { min: 0, max: 0.6 }
});
// Draw S max graph.
$.plot($("#graph-s-max"), (function() {
var gdata = [];
for (var group_name in results) {
if (group_name == "QM Prediction") {
continue;
}
var s_data = results[group_name].s_data;
var data = [];
var dobj = {
label: group_name,
data: data
};
gdata.push(dobj);
var s_angles = null;
var s_max = Number.NEGATIVE_INFINITY;
for (var i_angle = 0; i_angle < N_SMAX_AR; i_angle++) {
var x = itod(i_angle, N_SMAX_AR);
var y = s_data[i_angle].s_max;
if (y > s_max) {
s_max = y;
s_angles = s_data[i_angle].s_angles;
}
data.push([x, y]);
}
var diff = s_max / (2 * Math.SQRT2);
var stdev2 = 0.9545;
var diff1 = (diff > 1)? 1 / diff: diff;
var is_ok = diff1 > stdev2;
$("#table-s-max tbody").append(
$("<tr>").append(
$("<td>").text(group_name)
).append(
$("<td>").text(s_max)
).append(
$("<td>").text((Math.round(diff * 10000) / 100) + " %")
.css("color", is_ok? "green": "red")
).append(
$("<td>").text(Math.round(itod(s_angles[0], N_SMAX_AR)))
).append(
$("<td>").text(Math.round(itod(s_angles[1], N_SMAX_AR)))
).append(
$("<td>").text(Math.round(itod(s_angles[2], N_SMAX_AR)))
).append(
$("<td>").text(Math.round(itod(s_angles[3], N_SMAX_AR)))
)
);
}
return gdata;
})(), {
xaxis: { min: 0, max: 90 },
yaxis: { min: 1, max: 3 }
});
// Draw E value graph.
(function() {
var egraphs = [];
window.egraphs = egraphs;
for (var group_name in results) {
if (group_name == "QM Prediction") {
continue;
}
var e_data = results[group_name].e_data;
var gdata = new vis.DataSet();
for (var a1_i = 0; a1_i < N_SMAX_AR; a1_i++)
for (var a2_i = 0; a2_i < N_SMAX_AR; a2_i++) {
var x = itod(a1_i, N_SMAX_AR);
var y = itod(a2_i, N_SMAX_AR);
var e_i = (a1_i > a2_i? a2_i: a1_i) * N_SMAX_AR + (a1_i > a2_i? a1_i: a2_i);
var z = e_data[e_i].value;
gdata.add({
x: x,
y: y,
z: z
});
}
var container = $("<div>");
$("#e-value-graphs").append(container);
var graph3d = new vis.Graph3d(container.get(0), gdata, {
width: "400px",
height: "400px",
style: "surface",
showPerspective: true,
showGrid: true,
showShadow: false,
keepAspectRatio: true,
verticalRatio: 0.5,
xLabel: "α",
yLabel: "β",
zLabel: "E"
});
egraphs.push(graph3d);
}
})();
// Draw incidents graph.
$.plot($("#graph-incidents"), (function() {
var gdata = [];
for (var group_name in results) {
var hvt_res = results[group_name].result;
var data = [];
var dobj = {
label: group_name,
data: data
};
gdata.push(dobj);
for (var i_angle = 0; i_angle < N_ARES; i_angle++) {
var x = itod(i_angle, N_ARES);
var y = hvt_res[i_angle].incidents / hvt_res[i_angle].total_i;
data.push([x, y]);
}
}
return gdata;
})(), {
xaxis: { min: 0, max: 90 },
yaxis: { min: 0.45, max: 0.55 }
});
// Draw bias graph.
$.plot($("#graph-bias"), (function() {
var gdata = [];
for (var group_name in results) {
var hvt_res = results[group_name].result;
var data = [];
var dobj = {
label: group_name,
data: data
};
gdata.push(dobj);
for (var i_angle = 0; i_angle < N_ARES; i_angle++) {
var x = itod(i_angle, N_ARES);
var y = hvt_res[i_angle].bias / hvt_res[i_angle].incidents;
data.push([x, y]);
}
}
return gdata;
})(), {
xaxis: { min: 0, max: 90 },
yaxis: { min: -0.05, max: 0.05 }
});
// Draw total samples.
$.plot($("#graph-total"), (function() {
var gdata = [];
[0, 1].forEach(function(i) {
for (var group_name in results) {
var hvt_res = results[group_name].result;
var data = [];
var dobj = {
label: group_name + (i == 0? ", Total iM": ", Total ciM"),
data: data
};
gdata.push(dobj);
for (var i_angle = 0; i_angle < N_ARES; i_angle++) {
var x = itod(i_angle, N_ARES);
var y = (i == 0? hvt_res[i_angle].total_i: hvt_res[i_angle].total_ci);
data.push([x, y]);
}
}
});
return gdata;
})(), {
xaxis: { min: 0, max: 90 }
});
});
</script>
</body>
</html>