gwcelery.tasks.gracedb module

Communication with GraceDB.

gwcelery.tasks.gracedb.task(*args, **kwargs)[source]
(task)gwcelery.tasks.gracedb.create_event(filecontents, search, pipeline, group)[source]

Create an event in GraceDb.

(task)gwcelery.tasks.gracedb.create_label(label, graceid)[source]

Create a label in GraceDb.

(task)gwcelery.tasks.gracedb.create_signoff(status, comment, signoff_type, graceid)[source]

Create a label in GraceDb.

(task)gwcelery.tasks.gracedb.create_tag(filename, tag, graceid)[source]

Create a tag in GraceDb.

(task)gwcelery.tasks.gracedb.create_voevent(graceid, voevent_type, **kwargs)[source]

Create a VOEvent.

Returns:The filename of the new VOEvent.
Return type:str
(task)gwcelery.tasks.gracedb.download(filename, graceid)[source]

Download a file from GraceDB.

(task)gwcelery.tasks.gracedb.expose(graceid)[source]

Expose an event to the public.

(task)gwcelery.tasks.gracedb.get_events(query=None, orderby=None, count=None, columns=None)[source]

Get events from GraceDb.

(task)gwcelery.tasks.gracedb.get_event(graceid)[source]

Retrieve an event from GraceDb.

(task)gwcelery.tasks.gracedb.get_labels(graceid)[source]

Get all labels for an event in GraceDb.

(task)gwcelery.tasks.gracedb.get_log(graceid)[source]

Get all log messages for an event in GraceDb.

(task)gwcelery.tasks.gracedb.get_number_of_instruments(gracedb_id)[source]

Get the number of gravitational-wave instruments that contributed to the ranking statistic of a coincident event.

Parameters:gracedb_id (str) – The GraceDB ID.
Returns:The number of instruments that contributed to the ranking statistic for the event.
Return type:int

Notes

The number of instruments that contributed data to an event is given by the instruments key of the GraceDB event JSON structure. However, some pipelines (e.g. gstlal) have a distinction between which instruments contributed data and which were considered in the ranking of the candidate. For such pipelines, we infer which pipelines contributed to the ranking by counting only the SingleInspiral records for which the chi squared field is non-empty.

(task)gwcelery.tasks.gracedb.get_superevent(graceid)[source]

Retrieve a superevent from GraceDb.

(task)gwcelery.tasks.gracedb.replace_event(graceid, payload)[source]

Get an event from GraceDb.

(task)gwcelery.tasks.gracedb.upload(filecontents, filename, graceid, message, tags=())[source]

Upload a file to GraceDB.

(task)gwcelery.tasks.gracedb.get_superevents(query)[source]

List matching superevents in gracedb.

Parameters:query (str) – query to be passed to superevents()
Returns:superevents – The list of the superevents.
Return type:list
(task)gwcelery.tasks.gracedb.update_superevent(superevent_id, t_start=None, t_end=None, t_0=None, preferred_event=None)[source]

Update superevent information. Wrapper around updateSuperevent()

Parameters:
  • superevent_id (str) – superevent uid
  • t_start (float) – start of superevent time window, unchanged if None
  • t_end (float) – end of superevent time window, unchanged if None
  • t_0 (float) – superevent t_0, unchanged if None
  • preferred_event (str) – uid of the preferred event, unchanged if None
(task)gwcelery.tasks.gracedb.create_superevent(graceid, t0, d_t_start, d_t_end, category)[source]

Create new superevent in GraceDb with graceid

Parameters:
  • graceid (str) – graceid with which superevent is created.
  • t0 (float) – t_0 parameter of superevent
  • d_t_start (float) – superevent t_start = t0 - d_t_start
  • d_t_end (float) – superevent t_end = t0 + t_end
  • category (str) – superevent category
(task)gwcelery.tasks.gracedb.add_event_to_superevent(superevent_id, graceid)[source]

Add an event to a superevent in GraceDb.