Commit 05e210f8 authored by Jonah Kanner's avatar Jonah Kanner 🤓 Committed by GraceDB

added pe column

parent bda07cf9
......@@ -207,6 +207,7 @@ class SupereventPublic2(ListView):
gcnurl_template = 'https://gcn.gsfc.nasa.gov/other/GW{sd_id}.gcn3'
skymap_filename = 'bayestar.png'
def get_queryset(self, **kwargs):
# -- Query only for public events
# Comment from Tanner: Use the category directly from the superevent
......@@ -273,6 +274,14 @@ class SupereventPublic2(ListView):
'comment', flat=True)))
if se.retract: se.comments += " ** RETRACTED ** "
# -- Get list of PE results
pe_results = get_objects_for_user(self.request.user,
self.log_view_permission,
klass=se.log_set.filter(tags__name='pe_result'))
# Compile comments from these logs
se.pe = ' ** '.join(list(pe_results.values_list(
'comment', flat=True)))
# -- Read out probabilities
pastro_values = [ ("BNS",voe.prob_bns), ("NSBH",voe.prob_nsbh),
("BBH", voe.prob_bbh), ("Terrestrial", voe.prob_terrestrial),
......
......@@ -31,7 +31,6 @@
<br/><br/>
<table class="tablesaw" data-tablesaw-sortable data-tablesaw-sortable-switch data-tablesaw-mode="columntoggle">
<thead><tr>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="persist">Event ID</th>
......@@ -44,11 +43,16 @@
<th scope="col" data-tablesaw-col data-tablesaw-priority="5">&Omega; Scan</th>
{% endif %}
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="6">Comments</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="4">Comments</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> -->
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="0">False Alarm Rate (per year)</th>
<th scope="col" data-tablesaw-col data-tablesaw-priority="0">VOEvent</th>
{% if not user_is_external %}
<th scope="col" data-tablesaw-col data-tablesaw-priority="0">PE</th>
{% endif %}
</tr>
</thead>
<tbody>
......@@ -80,12 +84,12 @@
</td>
{% endif %}
<td>{{ event.comments }} </td>
<td>{{ event.comments |safe}} </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> <a href='/api/superevents/{{ event.default_superevent_id }}/voevents/'>VOEvent</a></td>
{% if not user_is_external %} <td> {{ event.pe |safe}}</td> {% endif %}
</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