llama.detectors module

A registry of detectors providing uniform naming conventions.

Available Detectors















Zwicky Transient Facility



Low-Latency Algorithm for Multimessenger Astrophysics

class llama.detectors.Detector

Bases: llama.detectors.TableRowRepresentable

An object describing some sort of detector (or, more generally, a source of data). Use these instances to provide uniform naming conventions, data source descriptions, and other information across the pipeline. You shouldn’t create Detector instances outside of the main detectors file since they are meant to be stored in the same namespace for shared use throughout the pipeline. On instantiation, an assertion runs to ensure that there are no name collisions or inconsistencies and to register the new detector name in the detectors namespace. This allows the detectors submodule to provide a convenient, unified interface for accessing all defined Detector isntances and avoid runtime complications. This name disambiguation is important to keep automatically-generated code and documentation uniform and unambiguous with respect to detector references.

  • name (str) – The name of the detector. Must be a valid name for a python variable, and should correspond to the name of the Detector in the detectors submodule.

  • abbrev (str) – A very short abbreviation (think 3 characters) for this detector. Must be a valid name for a python variable. This will be used for dynamically-generated subclasses and filenames.

  • fullname (str, optional) – The full name of the detector (useful for longer detector names). If name is an acronym or other abbreviation, then fullname should spell out what name stands for. If not provided, this will take the same value as name.

  • url (str, optional) – A URL pointing to this detector’s homepage (or whatever page best summarizes this detector/links to other good information about the detector/offers data access). (default: None)

  • summary (str, optional) – A short (think: one or two lines) sentence that describes the detector. If not provided, this will take the same value as name.

  • description (str, optional) – An extended (think: up to a few paragraphs) description of the detector from which a new developer could gain cursory understanding of the data source.

  • citations (ImmutableDict, optional) – A dictionary of citations which a developer or user can use to learn more about the detector. Map article titles/names (str) to URLs (str) at which those articles can be found, e.g. NASA ADS or arXiv links.


TypeError – If this detector clashes in name or abbrev with another existing detector.

class llama.detectors.DetectorTuple(name, abbrev, fullname, url, summary, description, citations)

Bases: tuple

property abbrev

Alias for field number 1

property citations

Alias for field number 6

property description

Alias for field number 5

property fullname

Alias for field number 2

property name

Alias for field number 0

property summary

Alias for field number 4

property url

Alias for field number 3

class llama.detectors.TableRowRepresentable

Bases: llama.detectors.DetectorTuple

A class for printing DetectorTuple rows in docstring format for a table. This superclass of Detector implements table printing for ``DetectorTuple`` instances in such a way that it can be reused to generate the header rows of the ``llama.detectors`` module docstring.

TABLE_COLUMN_WIDTHS = DetectorTuple(name=13, abbrev=13, fullname=65, url=None, summary=None, description=None, citations=None)

Get a row describing this DetectorTuple for inclusion in a table of all detectors. This method is defined in a separate class from Detector because it is also used (in a hacky way) to generate the table header.


Get the header rows for the table of Detector instances in llama.detectors.__doc__.