Skip to content
Snippets Groups Projects

Draft: Produce internal-only GCN Notices for subthreshold events

Files
2
@@ -96,9 +96,7 @@ def handle_superevent(alert):
|
gracedb.get_event.s()
|
preliminary_alert.s(alert,
annotation_prefix='subthreshold.',
initiate_voevent=False)
preliminary_alert.s(alert)
).apply_async()
# launch second preliminary on GCN_PRELIM_SENT
@@ -459,8 +457,7 @@ def _proceed_if_no_advocate_action(filenames, superevent_id):
@app.task(ignore_result=True, shared=False)
def preliminary_alert(event, alert, annotation_prefix='',
initiate_voevent=True):
def preliminary_alert(event, alert):
"""Produce a preliminary alert by copying any sky maps.
This consists of the following steps:
@@ -500,11 +497,11 @@ def preliminary_alert(event, alert, annotation_prefix='',
|
group(
gracedb.upload.s(
annotation_prefix + skymap_filename,
skymap_filename,
superevent_id,
message='Localization copied from {}'.format(
preferred_event_id),
tags=['sky_loc'] if annotation_prefix else [
tags=['sky_loc'] if is_publishable else [
'sky_loc', 'public']
)
|
@@ -513,9 +510,9 @@ def preliminary_alert(event, alert, annotation_prefix='',
),
skymaps.annotate_fits.s(
annotation_prefix + skymap_filename,
skymap_filename,
superevent_id,
['sky_loc'] if annotation_prefix else [
['sky_loc'] if is_publishable else [
'sky_loc', 'public']
)
)
@@ -527,11 +524,11 @@ def preliminary_alert(event, alert, annotation_prefix='',
gracedb.download.si('em_bright.json', preferred_event_id)
|
gracedb.upload.s(
annotation_prefix + 'em_bright.json',
'em_bright.json',
superevent_id,
message='Source properties copied from {}'.format(
preferred_event_id),
tags=['em_bright'] if annotation_prefix else [
tags=['em_bright'] if is_publishable else [
'em_bright', 'public']
)
|
@@ -545,11 +542,11 @@ def preliminary_alert(event, alert, annotation_prefix='',
gracedb.download.si('p_astro.json', preferred_event_id)
|
gracedb.upload.s(
annotation_prefix + 'p_astro.json',
'p_astro.json',
superevent_id,
message='Source classification copied from {}'.format(
preferred_event_id),
tags=['p_astro'] if annotation_prefix else [
tags=['p_astro'] if is_publishable else [
'p_astro', 'public']
)
|
@@ -571,7 +568,7 @@ def preliminary_alert(event, alert, annotation_prefix='',
return
# Send GCN notice and upload GCN circular draft for online events.
if is_publishable and initiate_voevent:
if is_publishable:
canvas |= (
_proceed_if_no_advocate_action.s(superevent_id)
|
@@ -626,7 +623,8 @@ def parameter_estimation(far_event, superevent_id):
@gracedb.task(ignore_result=True, shared=False)
def preliminary_initial_update_alert(filenames, superevent, alert_type):
def preliminary_initial_update_alert(filenames, superevent, alert_type,
is_publishable=True):
"""
Create and send a preliminary, initial, or update GCN notice.
@@ -709,7 +707,7 @@ def preliminary_initial_update_alert(filenames, superevent, alert_type):
group(
gracedb.download.si(em_bright_filename, superevent_id),
gracedb.download.si(p_astro_filename, superevent_id),
gracedb.expose.s(superevent_id),
*((gracedb.expose.s(superevent_id),) if is_publishable else ()),
*(
gracedb.create_tag.s(filename, 'public', superevent_id)
for filename in [
@@ -723,8 +721,8 @@ def preliminary_initial_update_alert(filenames, superevent, alert_type):
superevent_id,
alert_type,
skymap_filename=skymap_filename,
internal=False,
open_alert=True,
internal=not is_publishable,
open_alert=is_publishable,
raven_coinc=('RAVEN_ALERT' in labels)
)
|
Loading