diff --git a/CHANGES.rst b/CHANGES.rst index 192af5150bf5df2086220a2205fcd2297fa91dc5..0db26974379a1c6d20c03b35a5f840a581fc7da7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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. diff --git a/gwcelery/tasks/raven.py b/gwcelery/tasks/raven.py index 82cf606ac6d218dcd209515197457482f4e67939..de03271e0cc73ac2e5c6c50b149faa5fd12e27f4 100644 --- a/gwcelery/tasks/raven.py +++ b/gwcelery/tasks/raven.py @@ -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: diff --git a/gwcelery/tests/test_tasks_raven.py b/gwcelery/tests/test_tasks_raven.py index 4ccc6135beaa5254c0c99daf9f305e6bad02b5e5..acc8ae97d6667f0316e2f04578962609010ac2fe 100644 --- a/gwcelery/tests/test_tasks_raven.py +++ b/gwcelery/tests/test_tasks_raven.py @@ -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')