There will be maintenance performed on git.ligo.org, chat.ligo.org, containers.lig.org, and docs.ligo.org starting at 9am PDT on Tuesday 18th August 2020. There will be an extremely small period of downtime at the start of the maintenance window as various services are restarted. Please address any comments, questions, or concerns to computing-help@igwn.org.

Commit fa526168 authored by Brandon Piotrzkowski's avatar Brandon Piotrzkowski

Use 'SubGRB' to identify subthreshold GRBs

parent 5deb90b8
Pipeline #71773 passed with stages
in 5 minutes
......@@ -2,7 +2,7 @@
## 1.0.3 (unreleased)
- No changes yet.
- Uses search field to identify sub-threshold GRBs.
## 1.0.2 (2019-06-06)
......
......@@ -204,7 +204,8 @@ def compose_raven(gracedb_id, authors=(),
# FIXME in GraceDb: Even SNEWS triggers have an extra attribute GRB.
external_trigger_id = em_event['extra_attributes']['GRB']['trigger_id']
snews = (em_event['search'] == 'Supernova')
grb = (em_event['search'] == 'GRB')
grb = em_event['search'] in ['GRB', 'SubGRB']
subthreshold = (em_event['search'] == 'SubGRB')
o = urllib.parse.urlparse(client.service_url)
kwargs = dict(
......@@ -217,6 +218,7 @@ def compose_raven(gracedb_id, authors=(),
external_trigger=external_trigger_id,
snews=snews,
grb=grb,
subthreshold=subthreshold,
latency=abs(round(em_event_gpstime-gpstime, 1)),
beforeafter='before' if gpstime > em_event_gpstime else 'after')
......@@ -233,18 +235,6 @@ def compose_raven(gracedb_id, authors=(),
time_coinc_far=time_coinc_far,
space_time_coinc_far=space_time_coinc_far)
# Check if subthreshold trigger
voevent_text = client.files(
em_event_id, 'initial.data').read()
root = lxml.etree.fromstring(voevent_text)
try:
notice_type = root.find(
'./What/Param[@name="NoticeType"]').attrib['value'].lower()
except AttributeError:
notice_type = ''
subthreshold = ('subthreshold' in notice_type)
kwargs.update(subthreshold=subthreshold)
# Find combined sky map for GRB
logs = client.logs(gracedb_id).json()['log']
for message in reversed(logs):
......
......@@ -38,7 +38,7 @@
"far": null,
"instruments": "",
"labels": [],
"search": "GRB",
"search": "SubGRB",
"nevents": null,
"superevent": "S5678",
"submitter": "emfollow",
......
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