-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
274 lines (217 loc) · 8.13 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="An online SPAD simulation tool by Danial Chitnis">
<title>SPAD Simulation</title>
</head>
<body>
<div class="main-div">
<h1>SPAD Simulation</h1>
<style>
.main-div {
margin: auto;
width: 90%;
align-items: center;
justify-content: center;
text-align: center;
}
.grid-osc {
display: grid;
grid-gap: 0px;
background-color: #2196F3;
border: solid green 2px;
grid-template-columns: 2% auto min-content;
grid-template-rows: 2em auto 2em;
}
.grid-osc > div {
background-color: rgba(255, 255, 255, 0.8);
text-align: center;
padding: 0px 0;
font-size: 1em;
}
@media screen and (max-width: 800px) {
.main-div {
width: 95%;
}
.grid-osc {
grid-template-columns: 2% auto 2%;
grid-template-rows: 1em auto auto;
}
}
</style>
<!--osc-->
<div class=grid-osc>
<div></div>
<div style="text-align: left"><span><span></div>
<div></div>
<div></div>
<canvas id="display"></canvas>
<style>
#display {
height: 50vh;
width: 100%;
background-color: rgba(10,10,10);
}
</style>
<div class="controls">
<span></span>
<p></p>
<div class="play">
<button class="bt" id="bt-run">RUN</button>
<button class="bt" id="bt-single">SINGLE</button>
<style>
.controls {
grid-column-start: 3;
grid-column-end: 4;
}
.play {
display: flex;
margin-left: 1em;
margin-right: 1em;
align-items: flex-start;
}
.play > button {
margin-right: 5px;
margin-left: 5px;
margin-bottom: 0px;
color: darkslategrey;
}
@media screen and (max-width: 800px) {
.controls {
grid-column-start: 2;
grid-column-end: 3;
grid-row-start: 3;
grid-row-end: 4;
}
}
</style>
</div>
<p></p>
<div class="play">
<button class="bt" id="btViewJoin">Join</button>
<button class="bt" id="btViewSplit">Split</button>
</div>
<p></p>
<div class="play">
<button class="bt" id="btCH1">CH1</button>
<button class="bt" id="btCH2">CH2</button>
</div>
</div>
<div></div>
<div></div>
<div></div>
</div>
<p></p>
<p></p>
<p></p>
<div style="width: 100%">
<div id="slider_tr"></div>
<span class="range">Recovery time = <span id="displayTr"></span></span>
<div id="slider_phrate"></div>
<span class="range">Photon rate = <span id="displayPhrate"></span></span>
<div id="slider_vth"></div>
<span class="range">Threshold voltage = <span id="displayVth"></span></span>
</div>
</div>
</div>
<div class="text-div">
<style>
.text-div {
margin: auto;
width: 90%;
align-items: center;
}
</style>
<br>
<h2>Description of the simulation parameters</h2>
<p>Recovery Time = The time that it takes for the avalanche diode to recharge into its original state</p>
<p>Photon rate = The number of incident photons per unit time</p>
<p>Threshold voltage = The threshold voltage of the digital buffer connected to the avalanche diode's output</p>
<br>
<h2>Description of the controls</h2>
<p>Run = continuous run </p>
<p>Single = single step run</p>
<p>Join = join CH1 and CH2 traces</p>
<p>Split = split CH1 and CH2 traces</p>
<p>CH1 = Channel 1 connected to the output of avalanche diode showing an analog output</p>
<p>CH2 = Channel 2 connected to the output of the digital buffer showing an digital output</p>
</div>
<br>
<div class="credit-div">
<img src="SPAD_circuit.svg" style="height: 20em;">
</div>
<br>
<hr>
<div class="credit-div">
<style>
.credit-div {
margin: auto;
width: 90%;
text-align: center;
}
.credit-div > p > a, a:visited {
color: lightblue;
text-decoration: none;
}
.credit-div > p > a:hover {
text-decoration: underline;
}
</style>
<p>See the <a target="_blank" href="https://github.com/danchitnis/SPADsim">Github repository for the detail <img src="Github_logo.svg" style="height: 2em;"></a></p>
<p>Danial Chitnis 2020 copyright MIT license</p>
</div>
<style>
body {
background: rgba(10,10,10);
height: 100vh;
margin-left: auto;
margin-right: auto;
display: block;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: rgb(250,250,250);
width: 100%;
}
h1, h2 {
font-weight: 300;
}
.range {
color: white;
}
.display {
border: solid 2px pink;
background-color: blue;
}
.display > canvas {
max-width: 90%;
padding-top: 20px;
padding-bottom: 20px;
border: solid 2px red;
background: #2b2b2b;
}
.bt {
background-color: transparent;
border: 2px solid rgb(76, 111, 175);
color: white;
padding: 1em 1.5em;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 1.2em;
border-radius: 30px;
cursor: pointer;
transition-duration: 0.05s;
box-shadow: 0px 0px 0px grey;
}
.bt:hover {
box-shadow: 0px 0px 2px;
}
.bt:active {
box-shadow: inset 0px 0px 10px 2px;
}
</style>
<link rel="stylesheet" href="./dist/slider.css" type="text/css">
<script src="./dist/bundle.js"></script>
</body>
</html>