gwcelery.tasks.raven module

Search for GRB-GW coincidences with ligo-raven.

(task)gwcelery.tasks.raven.calculate_coincidence_far(superevent, exttrig, tl, th)[source]

Compute coincidence FAR for external trigger and superevent coincidence by calling ligo.raven.search.calc_signif_gracedb, using sky map info if available.

Parameters
  • superevent (dict) – superevent dictionary

  • exttrig (dict) – external event dictionary

  • tl (float) – start of coincident time window

  • th (float) – end of coincident time window

Perform ligo-raven search for coincidences. Determines time window to use. If events found, launches raven pipeline.

Parameters
  • gracedb_id (str) – ID of the trigger used by GraceDB

  • alert_object (dict) – lvalert[‘object’]

  • group (str) – Burst or CBC

  • pipelines (list) – list of external trigger pipeline names

(task)gwcelery.tasks.raven.search(gracedb_id, alert_object, tl=- 5, th=5, group=None, pipelines=[], searches=[])[source]

Perform ligo-raven search for coincidences.

Parameters
  • gracedb_id (str) – ID of the trigger used by GraceDB

  • alert_object (dict) – lvalert[‘object’]

  • tl (int) – number of seconds to search before

  • th (int) – number of seconds to search after

  • group (str) – Burst or CBC

  • pipelines (list) – list of external trigger pipelines for performing coincidence search against

Return type

list with the dictionaries of related gracedb events

(task)gwcelery.tasks.raven.raven_pipeline(raven_search_results, gracedb_id, alert_object, tl, th, gw_group)[source]

Executes much of the full raven pipeline, including adding the external trigger to the superevent, calculating the coincidence false alarm rate, and applying ‘EM_COINC’ to the appropriate events. Also a preimlinary alert will be triggered if the coincidence passes threshold.

Parameters
  • raven_search_results (list) – list of dictionaries of each related gracedb trigger

  • gracedb_id (str) – ID of either a superevent or external trigger

  • alert_object (dict) – lvalert[‘object’], either a superevent or an external event

  • gw_group (str) – Burst or CBC

(task)gwcelery.tasks.raven.preferred_superevent(raven_search_results)[source]

Chooses the superevent with the lowest far for an external event to be added to. This is to prevent errors from trying to add one external event to multiple superevents.

Parameters

raven_search_results (list) – list of dictionaries of each related gracedb trigger

(task)gwcelery.tasks.raven.trigger_raven_alert(coinc_far_dict, superevent, gracedb_id, ext_event, gw_group)[source]

Determine whether an event should be published as a preliminary alert. If yes, then triggers an alert by applying RAVEN_ALERT to the preferred event.

All of the following conditions must be true for a preliminary alert:

  • The external event must be a threshold GRB or SNEWS event.

  • If triggered on a SNEW event, the GW false alarm rate must pass snews_gw_far_threshold.

  • The event’s RAVEN coincidence false alarm rate, weighted by the group-specific trials factor as specified by the preliminary_alert_trials_factor configuration setting, is less than or equal to preliminary_alert_far_threshold.

  • If the external event is from Swift, both sky maps must be present.

Parameters
  • coinc_far_dict (dict) – Dictionary containing coincidence false alarm rate results from RAVEN

  • superevent (dict) – superevent dictionary

  • gracedb_id (str) – ID of the trigger that launched RAVEN

  • ext_event (dict) – external event dictionary

  • gw_group (str) – Burst or CBC