gwcelery.tasks.alerts module¶
- (task)gwcelery.tasks.alerts._add_external_coinc_to_alert(alert_dict, superevent, combined_skymap_filename)[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, combined_skymap=None)[source]¶
Write the alert to the Kafka topic
- (task)gwcelery.tasks.alerts._send_with_combined(alert_dict_combined_skymap, skymap, brokerhost)[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.send(skymap_and_classification, superevent, alert_type, raven_coinc=False, combined_skymap_filename=None)[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 bygwcelery.tasks.em_bright.classifier()
andgwcelery.tasks.p_astro.compute_p_astro()
or content of{gstlal,mbta}.p_astro.json
uploaded by {gstlal,mbta} 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?
combined_skymap_filename (str) – Combined skymap filename. Default None.
- (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, combined_skymap_filename=None)[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()
andgwcelery.tasks.p_astro.compute_p_astro()
or content of{gstlal,mbta}.p_astro.json
uploaded by {gstlal,mbta} respectively; or Nonesuperevent (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?
combined_skymap_filename (str) – The combined skymap filename. Default None