pyrex.detector.Detector¶
-
class
pyrex.detector.
Detector
(*args, **kwargs)¶ Base class for detectors for easily building up sets of antennas.
Designed for automatically generating antenna positions based on geometry parameters, then building all the antennas with some properties. Any parameters to the
__init__
method are automatically passed on to theset_positions
method. Once the antennas have been built, the object can be directly iterated over to iterate over the antennas (as if the object were just a list of the antennas).- Raises
- ValueError
If
test_antenna_positions
isTrue
and an antenna is found to be above the ice surface.
See also
pyrex.Antenna
Base class for antennas.
AntennaSystem
Base class for antenna system with front-end processing.
Notes
When this class is subclassed, the
__init__
method will mirror the signature of theset_positions
method so that parameters can be easily discovered.The class is designed to be flexible in what defines a “detector”. This should allow for easier modularization by defining detectors whose subsets are detectors themselves, and so on. For example, a string of antennas could be set up as a subclass of
Detector
which sets up some antennas in a vertical line. Then a station could be set up as a subclass ofDetector
which sets up multiple instances of the string class at different positions. Then a final overarching detector class can subclassDetector
and set up multiple instances of the station class at different positions. In this example thesubsets
of the overarching detector class would be the station objects, thesubsets
of the station objects would be the string objects, and thesubsets
of the string objects would finally be the antenna objects. But the way the iteration of theDetector
class is built, iterating over that overarching detector class would iterate directly over each antenna in each string in each station as a simple 1D list.- Attributes
- antenna_positionslist
List (potentially with sub-lists) of the positions of the antennas generated by the
set_positions
method.- subsetslist
List of the antenna or detector objects which make up the detector.
- test_antenna_positionsboolean
Class attribute for whether or not an error should be raised if antenna positions are found above the surface of the ice (where simulation behavior is ill-defined). Defaults to
True
.
Methods
build_antennas
(*args, **kwargs)Creates antenna objects at the set antenna positions.
clear
([reset_noise])Reset the detector to an empty state.
set_positions
(*args, **kwargs)Sets the positions of antennas in the detector.
triggered
(*args[, require_mc_truth])Check if the detector is triggered based on its current state.