-
Notifications
You must be signed in to change notification settings - Fork 2
/
plots.html
255 lines (249 loc) · 14.1 KB
/
plots.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
<!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>Plots | 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">
<!-- Styles-->
<link href="css/style_overview.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">
<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 active">
<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">
<!-- 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" aria-hidden="true"></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"> Plots</a> </ul>
</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">Parametric Plots</h1>
<p class="mb-4">The FRBSTATS platform enables astronomers and researchers to rapidly plot parameter distributions for a variety of visualizations, concerning FRB population studies and more. Select <b>two parameters</b> to map on an interactive scatter plot.</p>
<!-- Content Row -->
<div class="row">
<!-- Grow In -->
<div class="col-lg-6">
<div class="card position-relative" style="margin-bottom:10px;">
<div class="card-header py-3">
<h6 class="font-weight-bold text-primary">X-axis</h6> </div>
<div class="card-body">
<nav class="navbar navbar-expand navbar-light bg-light"> <a class="navbar-brand">Parameter</a>
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" id="navbarDropdown_x" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Select
</a>
<div class="dropdown-menu dropdown-menu-right animated--grow-in" aria-labelledby="navbarDropdown">
<button class="dropdown-item" id="ra" onclick="set_x(this.id, 'RA')">RA</button>
<button class="dropdown-item" id="dec" onclick="set_x(this.id, 'Dec.')">Dec.</button>
<div class="dropdown-divider"></div>
<button class="dropdown-item" id="long" onclick="set_x(this.id, 'Gal. Long.')">Gal. Long.</button>
<button class="dropdown-item" id="lat" onclick="set_x(this.id, 'Gal. Lat.')">Gal. Lat.</button>
<div class="dropdown-divider"></div>
<button class="dropdown-item" id="frequency" onclick="set_x(this.id, 'Frequency')">Frequency</button>
<button class="dropdown-item" id="dm" onclick="set_x(this.id, 'DM')">DM</button>
<button class="dropdown-item" id="flux" onclick="set_x(this.id, 'Flux Density')">Flux Density</button>
<button class="dropdown-item" id="width" onclick="set_x(this.id, 'Burst Width')">Burst Width</button>
<button class="dropdown-item" id="fluence" onclick="set_x(this.id, 'Fluence')">Fluence</button>
</div>
</li>
</ul>
</nav>
</div>
</div>
</div>
<!-- Fade In Utility -->
<div class="col-lg-6">
<div class="card position-relative">
<div class="card-header py-3">
<h6 class="font-weight-bold text-primary">Y-axis</h6> </div>
<div class="card-body">
<nav class="navbar navbar-expand navbar-light bg-light"> <a class="navbar-brand">Parameter</a>
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" id="navbarDropdown_y" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Select
</a>
<div class="dropdown-menu dropdown-menu-right animated--grow-in" aria-labelledby="navbarDropdown">
<button class="dropdown-item" id="ra" onclick="set_y(this.id, 'RA')">RA</button>
<button class="dropdown-item" id="dec" onclick="set_y(this.id, 'Dec.')">Dec.</button>
<div class="dropdown-divider"></div>
<button class="dropdown-item" id="long" onclick="set_y(this.id, 'Gal. Long.')">Gal. Long.</button>
<button class="dropdown-item" id="lat" onclick="set_y(this.id, 'Gal. Lat.')">Gal. Lat.</button>
<div class="dropdown-divider"></div>
<button class="dropdown-item" id="frequency" onclick="set_y(this.id, 'Frequency')">Frequency</button>
<button class="dropdown-item" id="dm" onclick="set_y(this.id, 'DM')">DM</button>
<button class="dropdown-item" id="flux" onclick="set_y(this.id, 'Flux Density')">Flux Density</button>
<button class="dropdown-item" id="width" onclick="set_y(this.id, 'Burst Width')">Burst Width</button>
<button class="dropdown-item" id="fluence" onclick="set_y(this.id, 'Fluence')">Fluence</button>
</div>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<br>
<center>
<a style="margin-top: -1%; width: 100%" class="d-none d-sm-inline-block btn btn-lg btn-primary shadow-sm" onclick="updateFig()"> <i class="far fa-chart-line fa-lg text-white-50" aria-hidden="true"></i> Plot Parameters</a>
</center>
<center id="errorWrapper" style="margin-top: 1%; font-size: 130%; color: orangered; visibility: visible;">
<a id="errorMsg"></a>
</center>
<div class="card shadow mb-4" id="results" style="margin-top: 3%; visibility: hidden">
<div class="card-header py-3">
<h6 style="font-size:19px" class="font-weight-bold text-primary">Results</h6> </div>
<div class="card-body">
<center>
<img class="img-fluid px-3 px-sm-4 mt-3 mb-4" src="figs/none_none.svg" name="fig">
</center>
<i class="fas fa-code fa-sm" aria-hidden="true" style="font-size: 110%; color:#4e73df; margin-left:12px;"></i>
<a id="sourceCode" target="_blank" href="https://github.com/HeRTA/FRBSTATS/blob/main/figs" style="font-size: 110%">View Source</a>
<a id="savePdf" style="margin-right: 4px; margin-left: 4px; font-size: 100%; float:right" href="figs/none_none.pdf" download="" class="d-none d-sm-inline-block btn btn-sm btn-danger shadow-sm"><i class="fas fa-file-pdf fa-sm text-white-50" aria-hidden="true"></i> Save as <b>PDF</b></a>
<a id="saveSvg" style="margin-left: 4px; font-size: 100%; float:right" href="figs/none_none.svg" download="" class="d-none d-sm-inline-block btn btn-sm btn-info shadow-sm"><i class="fas fa-download fa-sm text-white-50" aria-hidden="true"></i> Save as <b>SVG</b></a>
<a id="savePng" style="font-size: 100%; float:right" href="figs/none_none.png" download="" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-file-image fa-sm text-white-50" aria-hidden="true"></i> Save as <b>PNG</b></a>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<br>
<!-- 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>
<script type="text/javascript">
var x_axis = "none";
var y_axis = "none";
var shown_x = "none";
var shown_y = "none";
function set_x(selected_x, name_x) {
x_axis = selected_x;
shown_x = name_x;
document.getElementById("navbarDropdown_x").innerHTML = shown_x;
}
function set_y(selected_y, name_y) {
y_axis = selected_y;
shown_y = name_y;
document.getElementById("navbarDropdown_y").innerHTML = shown_y;
}
function updateFig() {
document.fig.src = "figs/none_none.svg";
if(x_axis == "none" && y_axis != "none") {
document.getElementById("results").style.marginTop = "-1%";
document.getElementById("results").style.visibility = "hidden";
document.getElementById("errorWrapper").style.visibility = "visible";
document.getElementById("errorMsg").innerHTML = "Please select a parameter for the <b>X-axis</b>.";
} else if(x_axis != "none" && y_axis == "none") {
document.getElementById("results").style.marginTop = "-1%";
document.getElementById("results").style.visibility = "hidden";
document.getElementById("errorWrapper").style.visibility = "visible";
document.getElementById("errorMsg").innerHTML = "Please select a parameter for the <b>Y-axis</b>.";
} else if(x_axis == "none" && y_axis == "none") {
document.getElementById("results").style.marginTop = "-1%";
document.getElementById("results").style.visibility = "hidden";
document.getElementById("errorWrapper").style.visibility = "visible";
document.getElementById("errorMsg").innerHTML = "Please select a parameter for both the <b>X</b> and the <b>Y-axis</b>.";
} else if(x_axis == y_axis) {
document.getElementById("results").style.marginTop = "-1%";
document.getElementById("results").style.visibility = "hidden";
document.getElementById("errorWrapper").style.visibility = "visible";
document.getElementById("errorMsg").innerHTML = "Please ensure the parameters you have selected for the <b>X</b> and the <b>Y-axis</b> differ.";
}/* else if((x_axis == "long" && y_axis != "lat") || (x_axis == "lat" && y_axis != "long") || (x_axis != "long" && y_axis == "lat") || (x_axis != "lat" && y_axis == "long")) {
document.getElementById("results").style.marginTop = "-1%";
document.getElementById("results").style.visibility = "hidden";
document.getElementById("errorWrapper").style.visibility = "visible";
document.getElementById("errorMsg").innerHTML = "Please ensure the parameters you have selected belong in the same category (i.e. <b>Gal. Long. ↔ Gal. Lat.</b>).";
}*/ else if((x_axis == "ra" && y_axis != "dec") || (x_axis == "dec" && y_axis != "ra") || (x_axis != "ra" && y_axis == "dec") || (x_axis != "dec" && y_axis == "ra")) {
document.getElementById("results").style.marginTop = "-1%";
document.getElementById("results").style.visibility = "hidden";
document.getElementById("errorWrapper").style.visibility = "visible";
document.getElementById("errorMsg").innerHTML = "Please ensure the parameters you have selected belong in the same category (i.e. <b>RA ↔ Dec.</b>).";
} else {
document.getElementById("errorWrapper").style.visibility = "hidden";
document.getElementById("sourceCode").href = "https://github.com/HeRTA/FRBSTATS/blob/main/figs/" + y_axis + "_" + x_axis + ".py";
document.getElementById("savePng").href = "figs/" + y_axis + "_" + x_axis + ".png";
document.getElementById("saveSvg").href = "figs/" + y_axis + "_" + x_axis + ".svg";
document.getElementById("savePdf").href = "figs/" + y_axis + "_" + x_axis + ".pdf";
document.fig.src = "figs/" + y_axis + "_" + x_axis + ".svg";
document.getElementById("results").style.visibility = "visible";
}
}
</script>
<!-- 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 all pages-->
<script src="js/style.min.js"></script>
</body>
</html>