Skip to content
Snippets Groups Projects
Commit bc58c4ff authored by Alexander Pace's avatar Alexander Pace
Browse files

Add support for Swift GRB FAR

In support of: https://git.ligo.org/lscsoft/gracedb/merge_requests/32

Ingests a 'FAR' field in Hz and adds it to the event data model. If
the field is present, then show it in the GRB event table on the
detail page.
parent 25fdb7bb
No related branches found
No related tags found
1 merge request!37Enable "FAR" value for GRB uploads.
Pipeline #101859 passed
...@@ -646,5 +646,12 @@ def populateGrbEventFromVOEventFile(filename, event): ...@@ -646,5 +646,12 @@ def populateGrbEventFromVOEventFile(filename, event):
break break
event.trigger_id = trigger_id event.trigger_id = trigger_id
# Check for the existance of FAR in the VOEvent_params. if it exists,
# Then add it to the event. This change was made on 2/7/2020 in support
# of SWIFT event uploads. Note: FAR is in Hz.
if ('FAR' in VOEvent_params):
event.far = float(VOEvent_params.get('FAR').get('value'))
# Save event # Save event
event.save() event.save()
...@@ -74,6 +74,9 @@ ...@@ -74,6 +74,9 @@
{% if object.trigger_duration %} {% if object.trigger_duration %}
<tr><th>Trigger duration</th><td colspan="2">{{object.trigger_duration}}</td></tr> <tr><th>Trigger duration</th><td colspan="2">{{object.trigger_duration}}</td></tr>
{% endif %} {% endif %}
{% if object.far %}
<tr><th>FAR (Hz)</th><td colspan="2">{{object.far}}</td></tr>
{% endif %}
{% if object.t90 %} {% if object.t90 %}
<tr><th>T90</th><td colspan="2">{{object.t90}}</td></tr> <tr><th>T90</th><td colspan="2">{{object.t90}}</td></tr>
{% endif %} {% endif %}
......
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