diff --git a/CHANGES.rst b/CHANGES.rst index 3e02b3f82168860484c48b52d4cac66ee011e2b3..f2892be220012cbecddb438b234d9fbbec0866ab 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,9 @@ Changelog - Set delay to produce preliminary alert to 0 seconds. +- Produce GCN notices of type ``LVC_EARLY_WARNING`` for events that have the + ``EarlyWarning`` search tag. + 0.12.0 (2020-03-05) ------------------- diff --git a/gwcelery/tasks/orchestrator.py b/gwcelery/tasks/orchestrator.py index 69ba0f1a8c4b6efbd20a5e5c0c33432a94a32d10..b24742d93d8218bca1bd0b17cd5d0edfe7a7afe0 100644 --- a/gwcelery/tasks/orchestrator.py +++ b/gwcelery/tasks/orchestrator.py @@ -570,7 +570,10 @@ def preliminary_alert(event, superevent_id, annotation_prefix='', _proceed_if_no_advocate_action.s(superevent_id) | preliminary_initial_update_alert.s( - superevent_id, 'preliminary', labels=event['labels']) + superevent_id, + ('earlywarning' if event['search'] == 'earlywarning' + else 'preliminary'), + labels=event['labels']) ) canvas.apply_async(priority=priority) @@ -645,7 +648,7 @@ def preliminary_initial_update_alert(filenames, superevent_id, alert_type, A list of the sky map, em_bright, and p_astro filenames. superevent_id : str The superevent ID. - alert_type : {'preliminary', 'initial', 'update'} + alert_type : {'earlywarning', 'preliminary', 'initial', 'update'} The alert type. labels : list A list of labels applied to superevent. @@ -686,7 +689,7 @@ def preliminary_initial_update_alert(filenames, superevent_id, alert_type, and f.endswith('.json'): p_astro_filename = fv - if alert_type in ['preliminary', 'initial']: + if alert_type in {'earlywarning', 'preliminary', 'initial'}: if 'RAVEN_ALERT' in labels: circular_task = circulars.create_emcoinc_circular.si(superevent_id) circular_filename = '{}-emcoinc-circular.txt'.format(alert_type) @@ -742,7 +745,8 @@ def preliminary_initial_update_alert(filenames, superevent_id, alert_type, | ( gracedb.create_label.si('GCN_PRELIM_SENT', superevent_id) - if alert_type == 'preliminary' else identity.si() + if alert_type in {'earlywarning', 'preliminary'} + else identity.si() ), circular_canvas,