Skip to content
Snippets Groups Projects
Commit 122edf1e authored by Jonah Kanner's avatar Jonah Kanner :nerd: Committed by GraceDB
Browse files

adding UTC time

parent 2ef52992
No related branches found
No related tags found
No related merge requests found
import logging
import os
from lal import gpstime
from django.views.generic.detail import DetailView
from django.views.generic import ListView
......@@ -138,6 +138,9 @@ class SupereventPublic(ListView):
for se in context['object_list']:
se.maplocal = "/apiweb/superevents/{0}/files/bayestar.png".format(se.superevent_id)
se.ifar_yrs = 1.0 / (se.far*3600*24*365.0)
se.t0_iso = gpstime.gps_to_utc(se.t_0).isoformat(' ').split('.')[0]
#-- Get list of voevents
voevents = se.voevent_set.all()
......
......@@ -56,22 +56,27 @@
{% 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">End Time GPS</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="5">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>
</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.superevent_id }}</a></td>
<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.t_0_date }}</td>
<td>
<a href={{ event.noticeurl }}>Notice</a><br/>
<a href={{ event.gcnurl }}>Circulars</a>
</td>
<td> <a href='{{ event.maplocal }}'> <img src='{{ event.maplocal }}' width='200px'/> </a> </td>
{% if not user_is_external %}
......@@ -81,8 +86,12 @@
</td>
{% endif %}
<td>{{ event.t_0 }} </td>
<td>{{ event.comments }} </td>
<td>{{ event.t_0 }} </td>
<td> 1 per {{ event.ifar_yrs|floatformat:2 }} years</td>
<td>{{ event.t0_iso }} UTC</td>
</tr>
{% endfor %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment