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_positionsmethod. 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_positionsisTrueand an antenna is found to be above the ice surface.
See also
pyrex.AntennaBase class for antennas.
AntennaSystemBase class for antenna system with front-end processing.
Notes
When this class is subclassed, the
__init__method will mirror the signature of theset_positionsmethod 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
Detectorwhich sets up some antennas in a vertical line. Then a station could be set up as a subclass ofDetectorwhich sets up multiple instances of the string class at different positions. Then a final overarching detector class can subclassDetectorand set up multiple instances of the station class at different positions. In this example thesubsetsof the overarching detector class would be the station objects, thesubsetsof the station objects would be the string objects, and thesubsetsof the string objects would finally be the antenna objects. But the way the iteration of theDetectorclass 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_positionsmethod.- 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.
