-
Notifications
You must be signed in to change notification settings - Fork 2
/
catalogue.php
342 lines (278 loc) · 21.4 KB
/
catalogue.php
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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Catalogue | FRBSTATS</title>
<link rel="shortcut icon" href="favicon.ico" />
<!-- Fonts -->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<script src="script.js"></script>
<link
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">
<!-- Custom styles -->
<link href="css/style.min.css" rel="stylesheet">
<!-- Custom styles for page -->
<link href="vendor/datatables/datatables.bootstrap4.min.css" rel="stylesheet">
</head>
<body id="page-top">
<!-- Page Wrapper -->
<div id="wrapper">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href=".">
<div class="sidebar-brand-icon rotate-n-0">
<i class="fas fa-database"></i>
</div>
<div style="font-size: 18px;" class="sidebar-brand-text mx-2">FRBSTATS</div>
</a>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<!-- Nav Item -->
<li class="nav-item">
<a class="nav-link" href=".">
<i style="font-size:15px" class="fas fa-fw fa-info-circle"></i>
<span style="font-size:15px">Overview</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider">
<!-- Nav Item -->
<li class="nav-item active">
<a class="nav-link" href="catalogue">
<i style="font-size:15px" class="fas fa-fw fa-clipboard-list"></i>
<span style="font-size:15px">Catalogue</span></a>
</li>
<!-- Nav Item -->
<li class="nav-item">
<a class="nav-link" href="repeaters">
<i style="font-size:15px" class="fas fa-fw fa-sync-alt"></i>
<span style="font-size:15px">Repeaters</span></a>
</li>
<!-- Nav Item -->
<li class="nav-item">
<a class="nav-link" href="plots">
<i style="font-size:15px" class="fas fa-fw fa-chart-line"></i>
<span style="font-size:15px">Plots</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<!-- Nav Item -->
<li class="nav-item">
<a class="nav-link" href="api">
<i style="font-size:15px" class="fas fa-fw fa-cog"></i>
<span style="font-size:15px">API</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider d-none d-md-block">
<!-- Sidebar Toggler (Sidebar) -->
<div class="text-center d-none d-md-inline">
<button class="rounded-circle border-0" id="sidebarToggle"></button>
</div>
</ul>
<!-- End of Sidebar -->
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column" onclick='$("tr:even").css("background-color", "#F2F2F2");$("tr:odd").css("background-color", "#FFFFFF");$("tr:eq(0)").css("background-color", "#ECF3FA");'>
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>
<!-- Topbar Navbar -->
<ul class="navbar-nav">
<a style="font-size:28px;color:#4e73df">FRBSTATS:</a>
<a style="font-size:28px;color:#5a5c69;white-space: pre"> Catalogue</a>
</ul>
</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">About</h1>
<p class="mb-4">This catalogue contains Fast Radio Burst (FRB) events published up to date. Event data have been obtained from the <a target="_blank" href="https://www.wis-tns.org">Transient Name Server (TNS)</a>, <a target="_blank"
href="https://www.frbcat.org">FRBCAT</a> (<a target="_blank" href="https://ui.adsabs.harvard.edu/abs/2016PASA...33...45P">Petroff et al., 2016</a>), the <a target="_blank"
href="https://www.chime-frb.ca/catalog">CHIME/FRB Catalogue</a> (<a target="_blank" href="https://arxiv.org/abs/2106.04352">CHIME/FRB Collaboration et al., 2021</a>), and the cited publications (see <b><i>Reference</i></b> column).</p>
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<abbr style="font-size:22px" class="m-0 font-weight-bold text-primary">FRB Catalogue</abbr>
<div class="d-sm-inline-flex align-items-center justify-content-between mb-4">
<a href="catalogue.csv" download class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i
class="fas fa-file-csv text-white-50"></i> Export as <b>CSV</b></a>
<a href="catalogue.json" download class="d-none d-sm-inline-block btn btn-sm btn-info shadow-sm"><i
class="fas fa-brackets-curly text-white-50"></i> Export as <b>JSON</b></a>
<a target="_blank" href="https://docs.google.com/spreadsheets/d/1W27KNa6yJzYA_b8HLSz4hxtWEZQtxUhGTXfQjlXgpzY/edit?usp=sharing" class="d-none d-sm-inline-block btn btn-sm btn-success shadow-sm"><i
class="fas fa-file-excel text-white-50"></i> View <b>Spreadsheet</b></a>
</div>
</div>
</div>
<div class="card-body">
<div>
Toggle columns:
<a style="font-weight: bold" id="frb" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="0">FRB</a> -
<a style="font-weight: normal" id="utc" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="1">UTC</a> -
<a style="font-weight: normal" id="mjd" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="2">MJD</a> -
<a style="font-weight: bold" id="telescope" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="3">Telescope</a> -
<a style="font-weight: bold" id="ra" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="4">RA</a> -
<a style="font-weight: normal" id="ra_error" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="5">RA Error</a> -
<a style="font-weight: bold" id="dec" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="6">Dec.</a> -
<a style="font-weight: normal" id="dec_error" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="7">Dec. Error</a> -
<a style="font-weight: normal" id="l" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="8">Gal. Long.</a> -
<a style="font-weight: normal" id="b" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="9">Gal. Lat.</a> -
<a style="font-weight: normal" id="frequency" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="10">Center Frequency</a> -
<a style="font-weight: bold" id="dm" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="11">DM</a> -
<a style="font-weight: normal" id="dm_error" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="12">DM Error</a> -
<a style="font-weight: normal" id="redshift" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="13">Redshift (Inferred)</a> -
<a style="font-weight: normal" id="redshift_measured" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="14">Host Redshift</a> -
<a style="font-weight: bold" id="flux" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="15">Peak Flux Density</a> -
<a style="font-weight: normal" id="width" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="16">Burst Width (FWHM)</a> -
<a style="font-weight: normal" id="fluence" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="17">Fluence</a> -
<a style="font-weight: normal" id="snr" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="18">S:N</a> -
<a style="font-weight: bold" id="verified" onclick="if (document.getElementById(this.id).style.fontWeight == 'normal' || document.getElementById(this.id).style.fontWeight == '') {document.getElementById(this.id).style.fontWeight = 'bold'}else {document.getElementById(this.id).style.fontWeight = 'normal';}" class="toggle-vis" data-column="19">Reference</a>
</div>
<div style="height:10px;"></div>
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>FRB</th>
<th>UTC</th>
<th>MJD</th>
<th>Telescope</th>
<th>RA (<i>α</i>)</th>
<th>RA Error (′)</th>
<th>Dec. (<i>δ</i>)</th>
<th>Dec. Error (′)</th>
<th>Gal. Long. (<i>l</i>)</th>
<th>Gal. Lat. (<i>b</i>)</th>
<th>Frequency (MHz)</th>
<th>DM (pc cm⁻³)</th>
<th>DM Error (pc cm⁻³)</th>
<th>Redshift (Inferred)</th>
<th>Host Redshift</th>
<th>Flux (Jy)</th>
<th>Width (ms)</th>
<th>Fluence (Jy ms)</th>
<th>S:N</th>
<th>Reference</th>
</tr>
</thead>
<tbody>
<?php
require "vendor/autoload.php";
$client = new MongoDB\Client(
'mongodb://localhost:27017'
);
$db = $client->frbstats;
$collection = $db->catalogue;
$cursor = $collection->find();
$itr = new IteratorIterator($cursor);
$itr -> rewind();
while ($cursor = $itr->current()){
//echo ;
echo "<tr>";
echo "<td>".$cursor['frb']."</td>";
echo "<td>".$cursor['utc']."</td>";
echo "<td>".$cursor['mjd']."</td>";
echo "<td>".$cursor['telescope']."</td>";
echo "<td>".$cursor['ra']."</td>";
echo "<td>".$cursor['ra_error']."</td>";
echo "<td>".$cursor['dec']."</td>";
echo "<td>".$cursor['dec_error']."</td>";
echo "<td>".$cursor['l']."</td>";
echo "<td>".$cursor['b']."</td>";
echo "<td>".$cursor['frequency']."</td>";
echo "<td>".$cursor['dm']."</td>";
echo "<td>".$cursor['dm_error']."</td>";
echo "<td>".$cursor['redshift']."</td>";
echo "<td>".$cursor['redshift_measured']."</td>";
echo "<td>".$cursor['flux']."</td>";
echo "<td>".$cursor['width']."</td>";
echo "<td>".$cursor['fluence']."</td>";
echo "<td>".$cursor['snr']."</td>";
echo "<td style='vertical-align: middle;padding-top: 0px;padding-bottom: 0px'><center><a href='".$cursor['ref']."' target='_blank' title='Verified' class='btn btn-secondary btn-circle btn-sm'><i class='fas fa-scroll'></i></a></center></td>";
echo "</tr>";
$itr->next();
}
?>
<!-- End Generation of table -->
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
<!-- Footer -->
<footer class="sticky-footer bg-white">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>© HeRTA 2021</span>
</div>
</div>
</footer>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for pages-->
<script src="js/style.min.js"></script>
<!-- Page level plugins -->
<script src="vendor/datatables/jquery.datatables.min.js"></script>
<script src="vendor/datatables/datatables.bootstrap4.min.js"></script>
<!-- Page level custom scripts -->
<script src="js/demo/datatables-demo.js"></script>
<!-- Custom scripts for column toggle-->
<script type="text/javascript" class="init">
$('#dataTable').dataTable( {
"columnDefs": [
{
// Hide columns
"visible": false, "targets": [1,2,5,7,8,9,10,12,13,14,16,17,18]
}
]
} );
$(document).ready(function() {
var table = $('#dataTable').DataTable();
$('a.toggle-vis').on( 'click', function (e) {
e.preventDefault();
// Get the column API object
var column = table.column( $(this).attr('data-column') );
// Toggle the visibility
column.visible( ! column.visible() );
} );
} );
</script>
<script>
$(document).ready(function() {
colorize();
});
function colorize() {
$("tr:even").css("background-color", "#F2F2F2");
$("tr:odd").css("background-color", "#FFFFFF");
$("tr:eq(0)").css("background-color", "#ECF3FA");
//window.setInterval(colorize, 500);
}
</script>
</body>
</html>