llama.files.lvalert_json module

FileHandler for a JSON file holding data about an LVAlert. Generated when an LVAlert comes in.

class llama.files.lvalert_json.LVAlertJSON

Bases: llama.filehandler.EventTriggeredFileHandler, llama.filehandler.JSONFile

digraph "llama.files.lvalert_json.LVAlertJSON" { charset="utf-8" splines=ortho bgcolor=none margin=0 rankdir=LR "llama.files.lvalert_json.LVAlertJSON" [label=<{{<B>LVAlertJSON</B>|<I>lvalert.json</I>|EventTriggeredFileHandler<BR/>JSONFile}}>, shape="record", style=filled, target=_top, URL="/llama.files.lvalert_json.html#llama.files.lvalert_json.LVAlertJSON", fillcolor="#cccccc"]; }

llama.files.lvalert_json.LVAlertJSON is created from external triggers. It therefore has no LLAMA-representable input dependencies, but instead acts as initial input for other FileHandler classes.

An LVAlert JSON object containing skymap info.

FILENAME = 'lvalert.json'
MANIFEST_TYPES = (<class 'llama.files.lvalert_json.LVAlertJSON'>,)
UR_DEPENDENCIES = ()
UR_DEPENDENCY_TREE = frozenset({})
property alert_type

Get the alert_type of this LVAlert.

property base_filename

Get the unversioned filename for this file. This only works for LVAlerts corresponding to uploads.

Returns

base_filename – The skymap filename as a SkymapFilename instance.

Return type

files.lvc_skymap.utils.SkymapFilename

Raises

KeyError – If this LVAlert does not contain a filename.

property far

The False Alarm Rate of this trigger.

property graceid

The GraceID, a unique ID used on GraceDB to register gravitational wave triggers.

property notice_time_str

Get the time at which the LVAlert was created.

property skymap_filename

Get the exact filename, including version information, for this file. If this LVAlert does not correspond to a skymap upload, try to pull down the most recently generated skymap.

Returns

filename – The full canonical filename as a SkymapFilename instance.

Return type

files.lvc_skymap.utils.SkymapFilename

property skymap_version

Get the version of the skymap with this particular filename. This only works for LVAlerts corresponding to uploads.

Returns

version – File version corresponding to this upload.

Return type

int