-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlmtablepage.html
161 lines (125 loc) · 4.69 KB
/
lmtablepage.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="d3.v3.min.js"></script>
<title>Pixie-Net List Mode Table</title>
<style type="text/css">
body { background-color:#d0d0d0; font-family:sans-serif; }
h1 { margin:0; font-size:24px }
h2 { margin-top:15px; font-size:20px; font-weight:normal; border-bottom:1px solid #ff9040 }
p { font-size:14px }
li { font-size:14px }
a { color:#6060d0; text-decoration:none }
a:hover { text-decoration:underline }
.header { padding: 20px; text-align: center; background: #1e73be; color: white; }
.header h1 { font-size: 40px; }
/* Ensure proper sizing */
* { box-sizing: border-box; }
/* Column container */
.row { display: flex; flex-wrap: wrap; }
/* Sidebar/left column */
.side { height: 100%; width: 180px; position: fixed; background-color: white; padding: 20px; }
.side a { float: left; display: block; color: #002b80; text-align: left; padding: 10px 10px; text-decoration: none; }
.side a:hover { background-color: #ddd; color: #1e73be; }
/* bottom help section */
.fixed_bot { position: fixed; bottom: 0; left: 0; width: 180px; padding: 20px }
.fixed_bot p {font-size: 11px; }
.fixed_bot a {font-size: 12px; }
/* Main column */
.main { margin-left: 180px; padding: 20px; }
.w3-card-2{
background-color:white;
border-radius:3px;
padding: 10px;
margin-bottom: 20px;
box-shadow:0 4px 10px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)
}
.tooltip { position: relative; display: inline-block; border-bottom: 1px dotted black; }
.tooltip .tooltiptext {
visibility: hidden;
width: 250px;
background-color: #1e73be;
color: white;
text-align: left;
border-radius: 6px;
padding: 5px 5px;
position: absolute;
z-index: 1;
}
.tooltip:hover .tooltiptext { visibility: visible; width: 250px; top: 100%; left: 80%; margin-left: -60px; }
table { border-collapse: collapse; }
th { border-bottom: 2px solid #ddd; padding: 8px; font-weight: bold; font-size: 12px;}
td { padding: 8px; border-top: 1px solid #ddd; font-size: 12px; }
</style>
</head>
<body>
<div class="header">
<h1>Pixie-Net List Mode Table</h1>
</div>
<div class="row">
<div class="side">
<img src="xialogo.jpg" width="140" height=auto alt="XIA Logo">
<p> </p>
<a href="/index.html"> Home </a>
<a href="cgitraces.cgi"> Current ADC traces </a>
<a href="cgistats.cgi"> Current run statistics </a>
<a href="mcapage.html">Most recent <br> MCA spectra</a>
<a href="/webops/webopsindex.html"> Web interface </a>
<div class="fixed_bot">
<h2>Help</h2>
<i><p>This page displays the list mode data from run type 0x501 (LMdata.dat) as a table </p>
<p>Large files can take long to load! </p>
</i>
</div>
</div>
<div class="main">
<div class="w3-card-2">
<div class=box id="datatable">
</div>
</div>
</div>
</div>
<script>
var rows = []
var formatdate = d3.time.format("%b %d %Y");
d3.csv("LMdata.dat", function(error, csv) {
csv.forEach(function(row) {
// row.mu = parseFloat(row.mu).toFixed(1);
// row.sigma = parseFloat(row.sigma).toFixed(1);
// row.dt = formatdate(new Date(Date.parse(row.date)));
// var res = parseFloat(row.result);
// if (res < .5) {
// row.result = "loss";
// } else if (res > .5) {
// row.result = "win";
// } else {
// row.result = "draw";
// }
rows.push(row);
});
var table = d3.select("#datatable").append("table");
thead = table.append("thead");
tbody = table.append("tbody");
thead.append("th").text("Module");
thead.append("th").text("Run Type");
thead.append("th").text("Run Start (ticks)");
thead.append("th").text("Run Start (s)");
thead.append("th").text(" ");
thead.append("th").text(" ");
var tr = tbody.selectAll("tr")
.data(rows)
.enter().append("tr");
var td = tr.selectAll("td")
.data(function(d) { return [d.Module, d.RunType, d.Run_Start_ticks, d.Run_Start_sec, d.Unused1, d.Unused2]; })
.enter().append("td")
.text(function(d) { return d; });
var width = 80,
height = d3.select("table")[0][0].clientHeight,
mx = 10,
radius = 2;
});
</script>
</body>
</html>