llama.files.skymap_info package

SkymapInfo records basic information about GW triggers/skymaps being used for a LLAMA analysis in a uniform, simple format.

class llama.files.skymap_info.FarThresholdMixin

Bases: llama.filehandler.mixins.ObservingVetoMixin

An ObservingVetoMixin that only triggers on plausible-seeming events whose FAR is less than 10 per day.

class_vetoes = ((<function event_far_greater_than_10_per_day>, None),)
class llama.files.skymap_info.SkymapInfo

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

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

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

A JSON file containing information on where to find the latest and greatest skymap for this event. Any incoming alert file should also generate this file. The resulting file is a simple JSON object with key:value pairs concerning information about the event and the current skymap to be used.

FILENAME = 'skymap_info.json'
MANIFEST_TYPES = (<class 'llama.files.skymap_info.SkymapInfo'>,)
UR_DEPENDENCY_TREE = frozenset({})
property alert_file_handler

Get the file handler for this alert file type. For a manually-generated instance of this file, the return value is None; otherwise, it is a FileHandler instance matched to this event.

property alert_type

Get the type of the alert, i.e. how this trigger was made in the LLAMA pipeline. For example, if this trigger was made as part of a gstlal offline subthreshold search, the value would be “gstlal-offline”. Look in SkymapInfo._alert_types for allowed alert type values.

NB: This is NOT related to the ``alert_type`` key in LVAlerts!

property event_time_gps

Get the time of the observed event up to nanosecond precision (less accurate than this in practice).

property event_time_gps_nanoseconds

Get the number of nanoseconds past the last GPS second at the time of the observed event. Ostensibly provides nanosecond precision, but is less accurate than this in practice.

property event_time_gps_seconds

Get the time of the observed event in GPS seconds (truncated to the nearest second).

property event_time_mjd

Get the time of the observed event in Modified Julian Day format (UTC time).

property event_time_str

Get a unicode string with the ISO date and time of the observed event straight from the VOEvent file. UTC time.

property far

Get the false alarm rate of this VOEvent as a float value.

generate_from_gracedb(graceid: str, skymap_filename: str = None)

Supplement the original filename with data pulled from the GraceDB API on the event. Used for manually generating skymap_info.

generate_from_gracedb_superevent(graceid: str, skymap_filename: str = None)

Supplement the original filename with data pulled from the GraceDB API on the superevent. Used for manually generating skymap_info from a superevent. If no skymap is provided, pull down the most recently uploaded one defined in llama.files.lvc_skymap.SKYMAP_FILENAMES.

generate_from_lvc_gcn_xml(voe: llama.files.lvc_gcn_xml.LvcGcnXml)

Generate this file from LvcGcnXml VOEvent. Used for implementation.

property gracedb_url

Get the GraceDB URL for this GraceID, assuming it is in the expected format for GraceIDs. Will autodetect if this is a superevent or regular event. Returns None if this doesn’t look like a valid GraceID (but will not check on the actual gracedb server).

property graceid

Get the GraceID corresponding to this VOEvent.

property human_url

Get the human-viewable URL for this file (i.e. the one that can be accessed from a web-browser using interactive authentication)

property is_super

Check whether this GraceID corresponds to an event or a superevent.

property notice_time_str

Get a unicode string with the date and time of creation of the notification associated with this VOEvent, rather than the time of detection of the event itself.

property pipeline

Return an ALL-CAPS name of the pipeline used to generate this event, e.g. GSTLAL or CWB.

property skymap_filename

Get the filename of the skymap as a SkymapFilename as stored on GraceDB.


Veto if the FAR defined in SkymapInfo is greater than ten day.


Return the GraceDB URL for this GraceID (assuming it exists and is in a recognized GraceID format). If this doesn’t look like a valid GraceID, returns None.


Check whether this is a normal GraceID (by seeing whether is_super throws an error).