Code for the PulsarSurveyDB website.
This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Its distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See http://www.gnu.org/licenses/ for more license details.
Author: Rob Lyon
Contact: rob@scienceguyrob.com or robert.lyon@postgrad.manchester.ac.uk
Web: http://www.scienceguyrob.com
- Overview
Simple interactive webpage describing all pulsar surveys conducted since 1968. Uses a jQuery plugin to add table interactivity and nice popup dialogs.
- Adding entries
Adding entries to the table requirs three simple steps.
STEP 1. Adding a new entry to the table(s).
Here is a shortened version of the table.
Survey | Survey Year | Telescope | Centre Freq. (Mhz) | Bandwidth (Mhz) | Channel Width (Khz) | Channels | Sampling (μ sec) | Integration time (secs) | Beams | Pointings | Region | Region Sq. Deg. |
---|---|---|---|---|---|---|---|---|---|---|---|---|
1st Molonglo Survey [1] | 1968 | Molonglo | 408 | 4 | 2000 | 2 | 5000 | 15 | 1 | ? | |b| < 10°, |b| > 10° | 22980 |
It contains one row describing the table headers, and one entry describing the Molongo survey. The
first table data (<td></td>
) entry describes the survey name. Here we see that listed as the "1st
Molonglo Survey". Next to this, there is an anchor tag (<a></a>
), inside two brackets i.e. [<a></a>
].
This contains the reference to the survey, which opens a new popup with details of the references, e.g.
<td>1st Molonglo Survey [<a href="#" onclick="$('#cite_pop_1').popup('show');">1</a>]</td>
This indicates that when the user clicks on the reference next to the survey name, popup "cite_pop_1" will open. The third table data element, describes the instrument used for the survey, along with a small image of the instrument itself, e.g.
<td><span class="flagicon"><img alt="" src="images/Molonglo_32x32.png" width="22" height="15" class="thumbborder" /> </span>Molonglo</td>
To add a new entry, both of these must be updated accordingly. For example for a new imaginary survey "Rob 1", we would have to add a new entry as follows:
Survey | Survey Year | Telescope | Centre Freq. (Mhz) | Bandwidth (Mhz) | Channel Width (Khz) | Channels | Sampling (μ sec) | Integration time (secs) | Beams | Pointings | Region | Region Sq. Deg. |
---|---|---|---|---|---|---|---|---|---|---|---|---|
1st Molonglo Survey [1] | 1968 | Molonglo | 408 | 4 | 2000 | 2 | 5000 | 15 | 1 | ? | |b| < 10°, |b| > 10° | 22980 |
Rob 1 [2] | 2015 | Parkes | 1420 | 500 | 3000 | 96 | 64 | ? | ? | ? | ? | 22980 |
Here we see a new entry for the "Rob 1" survey, which is apparently being conducted at Parkes. Note that here,
<td>Rob 1 [<a href="#" onclick="$('#cite_pop_2').popup('show');">2</a>]</td>
"cite_pop_1" has become "cite_pop_2" - this must be incremented when adding a new survey, i.e. one popup per survey entry. Also note that the reference has increased - you have to manage the referencing carefully. What I mean is that if the survey Rob 1 was described by two papers, then we would have to do the following:
<td>Rob 1 [<a href="#" onclick="$('#cite_pop_2').popup('show');">2</a> , <a href="#" onclick="$('#cite_pop_3').popup('show');">3</a> ]</td>
So the number referencing is completely in your hands.
Similarly the image path has changed, from,
src="images/Molonglo_32x32.png" to src="images/Parkes_32x32.png"
There are a few images to choose from, select the most appropriate or add your own 32x32 pixel image.
IMAGES
Arecibo_128x128.png
Effelsberg_32x32.png
FAST_32x32.png
GBT_32x32.png
GMRT_32x32.png
Jodrell_32x32.png
Lofar_32x32.png
Molonglo_32x32.png
Parkes_32x32.png
SKA_32x32.png
Westerbork_32x32.png
STEP 2. Adding a new reference popup.
Each entry above has a link to a popup. A new popup has to created from each entry. All popups are
actual divs (<div></div>)
which describe the popup. These divs are invisible, until the user click
a reference that corresponds to them.
For instance, for the 1st Molonglo Survey, there is a link to the popup in an anchor element:
<a href="#" onclick="$('#cite_pop_1').popup('show');">1</a>
When this is clicked, the following div is displayed:
<div id="cite_pop_1" class="well"> <!-- Popups 1 -->
<h4>Citation</h4>
<pre class="prettyprint">
<code>@article{Large:1968:mi,
author = {{Large}, M.~I. and {Vaughan}, A.~E. and {Wielebinski}, R.},
title = {{Pulsar Search at the Molonglo Radio Observatory}},
journal = {Nature},
year = {1968},
volume = {220},
pages = {753-756},
doi = {10.1038/220753a0},
url = {http://dx.doi.org/10.1038/220753a0}
}</code>
</pre> <a target="_blank" href="http://dx.doi.org/10.1038/220753a0">
<button class="fade_close fadeandscale_open btn btn-default">Go to Cited Paper</button></a>
<button onclick="$('#cite_pop_1').popup('hide');" class="fade_close btn btn-default">Close</button>
</div>
This popup displays bibtex details for the references, and a button linking to the original paper.
To add a new popup describing the imaginary "Rob 1" survey, we simply do the following:
<div id="cite_pop_2" class="well"> <!-- Popups 2 -->
<h4>Citation</h4>
<pre class="prettyprint">
<code>@article{Rob:2015:survey,
author = {{Lyon}, R.~J.},
title = {{An Amazing New Survey}},
journal = {Some Journal},
year = {2015},
volume = {1},
pages = {1-5},
doi = {00.0000/00000000},
url = {http://dx.doi.org/00.0000/00000000}
}</code>
</pre> <a target="_blank" href="http://dx.doi.org/00.0000/00000000">
<button class="fade_close fadeandscale_open btn btn-default">Go to Cited Paper</button></a>
<button onclick="$('#cite_pop_2').popup('hide');" class="fade_close btn btn-default">Close</button>
</div>
Note the changes - "cite_pop_1" has become "cite_pop_2", the bibtex details have changed, and finally the link to the paper have altered so that,
<a target="_blank" href="http://dx.doi.org/10.1038/220753a0">
has become,
<a target="_blank" href="http://dx.doi.org/00.0000/00000000">
STEP 3. Initialising the popops.
The popups created above need to be initialised. This is done using java script. So for the 1st Molonglo survey, this is done simply via,
<script>
$(document).ready(function () {
$('#cite_pop_1').popup({
transition: 'all 0.3s',
scrolllock: true
});
});
</script>```
To intialise the popup for Rob 1, we simply add it here as follows:
Simple!
-
Citing this work
Please use the following citation if you make use of tool:
@article{Lyon:2016:jk, author = {{Lyon}, R.~J. and {Stappers}, B.~W. and {Cooper}, S. and {Brooke}, J.~M. and {Knowles}, J.~D.}, title = {{Fifty Years of Pulsar Candidate Selection: From simple filters to a new principled real-time classification approach}}, journal = {Accepted for publication in MNRAS}, year = {2016}, volume = {astro-ph.IM} url ={http://arxiv.org/abs/1603.05166} }
@misc{PulsarSurveyDB, author = {Lyon, R. J.}, title = {{Pulsar Survey DB}}, affiliation = {University of Manchester}, month = {June}, year = {2015}, howpublished = {World Wide Web Accessed (26/06/2015), \newline \url{https://github.com/scienceguyrob/PulsarSurveyDB}}, notes = {Accessed 26/06/2015} }
-
Acknowledgements
This work was supported by grant EP/I028099/1 for the University of Manchester Centre for Doctoral Training in Computer Science, from the UK Engineering and Physical Sciences Research Council (EPSRC).
This work used the Dynatable plugin (http://www.dynatable.com/) to create the interactive table, and the jQuery Popup Overlay plugin (http://dev.vast.com/jquery-popup-overlay/) to create reference popups. Thanks to both for their work!!