Commit c421cca3 authored by Jonah Kanner's avatar Jonah Kanner 🤓 Committed by GraceDB

Tweaks to public view

parent 122edf1e
......@@ -139,8 +139,13 @@ class SupereventPublic(ListView):
se.maplocal = "/apiweb/superevents/{0}/files/bayestar.png".format(se.superevent_id)
#-- GCN links
se.noticeurl = "https://gcn.gsfc.nasa.gov/notices_l/{0}.lvc".format(se.default_superevent_id)
se.gcnurl = "https://gcn.gsfc.nasa.gov/other/GW{0}.gcn3".format(se.default_superevent_id[1:])
se.ifar_yrs = 1.0 / (se.far*3600*24*365.0)
se.t0_iso = gpstime.gps_to_utc(se.t_0).isoformat(' ').split('.')[0]
se.t0_utc = se.t0_iso.split()[1]
#-- Get list of voevents
voevents = se.voevent_set.all()
......
......@@ -2,8 +2,10 @@
{% load sanitize_html %}
{% load logtags %}
{% block heading %}{% endblock %}
{% block bodyattrs %}class="tundra eventDetail"{% endblock %}
{% block jscript %}
{% load static %}
......@@ -15,6 +17,8 @@
<!-- Styles for dgrid -->
<!-- <link rel="stylesheet" href="{% static "dgrid/css/dgrid.css" %}" /> -->
<!-- Styles for the editor components -->
<!--
<link rel="stylesheet" href="{% static "dojox/editor/plugins/resources/css/PageBreak.css" %}" />
<link rel="stylesheet" href="{% static "dojox/editor/plugins/resources/css/ShowBlockNodes.css" %}" />
<link rel="stylesheet" href="{% static "dojox/editor/plugins/resources/css/Preview.css" %}" />
......@@ -26,11 +30,11 @@
<link rel="stylesheet" href="{% static "dojox/editor/plugins/resources/css/CollapsibleToolbar.css" %}" />
<link rel="stylesheet" href="{% static "dojox/editor/plugins/resources/css/Blockquote.css" %}" />
<link rel="stylesheet" href="{% static "dojox/editor/plugins/resources/css/Smiley.css" %}" />
<!-- Styles for the lightboxes. -->
<link rel="stylesheet" href="{% static "dojox/image/resources/LightboxNano.css" %}" />
<!-- Local style declarations -->
<link rel="stylesheet" href="{% static "dijit/themes/tundra/tundra.css" %}" />
<link rel="stylesheet" href="{% static "dijit/themes/tundra/tundra.css" %}" />
-->
<!-- the main JavaScript block is pulled in with an include -->
......@@ -38,7 +42,7 @@
{% endblock %}
{% block content %}
<h1>LIGO/Virgo Public Alerts</h1>
<h1>LIGO/Virgo Public Alerts</h1>
<h3>O3 detection candidates: {{ candidates }}</h3>
<br/><br/>
......@@ -49,28 +53,34 @@
<thead><tr>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="persist">Event ID</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="1">Possible Source (Probability)</th>
<th scope="col" data-tablesaw-col data-tablesaw-priority="2">Date</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="2">UTC</th>
<th scope="col" data-tablesaw-col data-tablesaw-priority="3">GCN</th>
<th scope="col" data-tablesaw-col data-tablesaw-priority="4">Location</th>
<th scope="col" data-tablesaw-col data-tablesaw-priority="6">Location</th>
{% if not user_is_external %}
<th scope="col" data-tablesaw-col data-tablesaw-priority="5">&Omega; Scan</th>
{% endif %}
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="5">Comments</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="6">Comments</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="6">GPS</th>
<th scope="col" data-tablesaw-col data-tablesaw-priority="6">False Alarm Rate (per year)</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="6">UTC Time</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="0">GPS</th>
<th scope="col" data-tablesaw-col data-tablesaw-priority="0">False Alarm Rate (per year)</th>
<!-- <th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="0">UTC Time</th> -->
</tr>
</thead><tbody>
{% for event in object_list %}
<tr {% if event.retract %}style='background-color:#EDD' {% endif %} >
<td><a href=/superevents/{{ event.superevent_id }}>{{ event.default_superevent_id }}</a></td>
<td style='min-width:120px'>{{ event.sourcetypes }} </td>
<td style='min-width:120px'>{{ event.t_0_date }}</td>
<td style='min-width:120px;'>{{ event.sourcetypes }} </td>
<td style='min-width:120px'>
<span style='font-size:0px;'>{{ event.t0_iso }}</span>{{ event.t_0_date }}<br/>
{{ event.t0_utc }} UTC
</td>
<td>
<a href={{ event.noticeurl }}>Notice</a><br/>
......@@ -89,9 +99,9 @@
<td>{{ event.comments }} </td>
<td>{{ event.t_0 }} </td>
<td>{{ event.t_0|floatformat:2 }} </td>
<td> 1 per {{ event.ifar_yrs|floatformat:2 }} years</td>
<td>{{ event.t0_iso }} UTC</td>
<!-- <td>{{ event.t0_iso }} UTC</td> -->
</tr>
{% endfor %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment