llama.detectors module¶
A registry of detectors providing uniform naming conventions.
Available Detectors¶
|
|
|
---|---|---|
IceCube |
i3 |
IceCube |
LVC |
lvc |
LVC |
Fermi |
frm |
Fermi |
ZTF |
ztf |
Zwicky Transient Facility |
LLAMA |
lma |
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 thedetectors
namespace. This allows thedetectors
submodule to provide a convenient, unified interface for accessing all definedDetector
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.- Parameters
name (str) – The name of the detector. Must be a valid name for a
python
variable, and should correspond to the name of theDetector
in thedetectors
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, thenfullname
should spell out whatname
stands for. If not provided, this will take the same value asname
.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.
- Raises
TypeError – If this detector clashes in
name
orabbrev
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
-
property
-
class
llama.detectors.
TableRowRepresentable
¶ Bases:
llama.detectors.DetectorTuple
A class for printing
DetectorTuple
rows in docstring format for a table. This superclass ofDetector
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)¶
-
doctable_row
()¶ Get a row describing this
DetectorTuple
for inclusion in a table of all detectors. This method is defined in a separate class fromDetector
because it is also used (in a hacky way) to generate the table header.
-
-
llama.detectors.
doc_table_header
()¶ Get the header rows for the table of
Detector
instances inllama.detectors.__doc__
.