gwcelery.tasks.alerts module

(task)gwcelery.tasks.alerts._add_external_coinc_to_alert(alert_dict, superevent)[source]

Proxy that evaluates object once.

Proxy will evaluate the object each time, while the promise will only evaluate it once.

(task)gwcelery.tasks.alerts._upload_notice(payload, brokerhost, superevent_id)[source]

Upload serialized alert notice to GraceDB

(task)gwcelery.tasks.alerts._send(alert_dict, skymap, brokerhost)[source]

Write the alert to the Kafka topic

(task)gwcelery.tasks.alerts.send(skymap_and_classification, superevent, alert_type, raven_coinc=False)[source]

Send an public alert to all currently connected kafka brokers.

Parameters:
  • skymap_and_classification (tuple, None) – The filecontents of the skymap followed by a collection of JSON strings. The former generated by gwcelery.tasks.gracedb.download(), the latter generated by gwcelery.tasks.em_bright.classifier() and gwcelery.tasks.p_astro.compute_p_astro() or content of p_astro.json uploaded by gstlal respectively. Can also be None.

  • superevent (dict) – The superevent dictionary, typically obtained from an IGWN Alert or from querying GraceDB.

  • alert_type ({'earlywarning', 'preliminary', 'initial', 'update'}) – The alert type.

  • raven_coinc (bool) – Is there a coincident external event processed by RAVEN?

(task)gwcelery.tasks.alerts._create_skymap_classification_tuple(skymap, classification)[source]

Proxy that evaluates object once.

Proxy will evaluate the object each time, while the promise will only evaluate it once.

(task)gwcelery.tasks.alerts.download_skymap_and_send_alert(classification, superevent, alert_type, skymap_filename=None, raven_coinc=False)[source]

Wrapper for send function when caller has not already downloaded the skymap.

Parameters:
  • classification (tuple, None) – A collection of JSON strings, generated by gwcelery.tasks.em_bright.classifier() and gwcelery.tasks.p_astro.compute_p_astro() or content of p_astro.json uploaded by gstlal respectively; or None

  • superevent (dict) – The superevent dictionary, typically obtained from an IGWN Alert or from querying GraceDB.

  • alert_type ({'earlywarning', 'preliminary', 'initial', 'update'}) – The alert type.

  • skymap_filename (string) – The skymap filename.

  • raven_coinc (bool) – Is there a coincident external event processed by RAVEN?