Skip to content
Snippets Groups Projects
Commit 71870bfd authored by Brandon Piotrzkowski's avatar Brandon Piotrzkowski
Browse files

Require sky map to launch a GRB RAVEN alert; fixes #517

parent 81d6af85
No related branches found
No related tags found
1 merge request!1112Require sky map to launch a GRB RAVEN alert; fixes #517
......@@ -42,6 +42,8 @@ Changelog
emfollow-playground server, creating mock coincidences with a frequency
given by the ``joint_O3_replay_freq`` variable.
- Require sky map information to publish coincidence with a GRB candidate.
- Fix collation of INTEGRAL notices by getting the GCN ID from the IVORN
field.
......
......@@ -358,7 +358,7 @@ def trigger_raven_alert(coinc_far_dict, superevent, gracedb_id,
gw_group = gw_group.lower()
pipeline = ext_event['pipeline']
trials_factor = app.conf['preliminary_alert_trials_factor'][gw_group]
missing_skymap = 'Swift' == pipeline
missing_skymap = True
messages = []
# Since the significance of SNEWS triggers is so high, we will publish
......@@ -369,6 +369,7 @@ def trigger_raven_alert(coinc_far_dict, superevent, gracedb_id,
far_threshold = app.conf['snews_gw_far_threshold']
pass_far_threshold = gw_far * trials_factor < far_threshold
is_ext_subthreshold = False
missing_skymap = False
# Set coinc FAR to gw FAR only for the sake of a message below
time_coinc_far = space_coinc_far = coinc_far = None
coinc_far_f = gw_far
......@@ -440,8 +441,8 @@ def trigger_raven_alert(coinc_far_dict, superevent, gracedb_id,
messages.append(('RAVEN: Alert already triggered for {}'.format(
ext_id)))
if missing_skymap:
messages.append('RAVEN: Will only publish Swift coincidence '
'event if spatial-temporal FAR is present. '
messages.append('RAVEN: Will only publish GRB coincidence '
'if spatial-temporal FAR is present. '
'Waiting for both sky maps to be available '
'first.')
for message in messages:
......
......@@ -493,12 +493,18 @@ def _mock_get_event(graceid):
"search": 'GRB',
"labels": ['NOT_GRB'],
"group": 'External'}
elif graceid == 'M5':
return {"graceid": "M5",
elif graceid == 'M6':
return {"graceid": "M6",
"pipeline": 'Fermi',
"search": 'MDC',
"labels": [],
"group": 'External'}
elif graceid == 'E7':
return {"graceid": "E7",
"pipeline": 'Fermi',
"search": 'GRB',
"labels": [],
"group": 'External'}
else:
raise AssertionError
......@@ -537,7 +543,9 @@ def _mock_get_coinc_far(graceid):
['S2468', 'E5', 'CBC', False],
['S2468', 'E2', 'CBC', False],
['S2345', 'E3', 'Burst', True],
['MS1111', 'M5', 'CBC', True],
['MS1111', 'M6', 'CBC', True],
['S5678', 'E1', 'CBC', False],
['S5678', 'E7', 'CBC', False],
['E1', 'S9876', 'CBC', True],
['E1', 'S2468', 'CBC', False],
['E2', 'S5678', 'CBC', False],
......@@ -578,7 +586,7 @@ def test_trigger_raven_alert(mock_create_label, mock_update_superevent,
[['S2468', 'E5', True],
['S2468', 'E1', True],
['S2468', 'E2', False],
['S2468', 'M5', True],
['S2468', 'M6', True],
['S2345', 'E1', False],
['S2345', 'E2', False]])
@patch('gwcelery.tasks.gracedb.create_label.run')
......
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