PyREx

pyrex.Detector

class pyrex.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 the set_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 is True 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 the set_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 of Detector which sets up multiple instances of the string class at different positions. Then a final overarching detector class can subclass Detector and set up multiple instances of the station class at different positions. In this example the subsets of the overarching detector class would be the station objects, the subsets of the station objects would be the string objects, and the subsets of the string objects would finally be the antenna objects. But the way the iteration of the Detector 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.

PyREx

A Python package for simulation of neutrinos and radio antennas in ice. Version 1.10.0

Navigation