pyrex.custom.irex.StationGrid¶
-
class
pyrex.custom.irex.
StationGrid
(stations=1, station_separation=500, station_type=<class 'pyrex.custom.irex.detector.IREXString'>, **station_kwargs)¶ Rectangular grid of stations or strings.
Sets the positions of stations in a square layout if possible, otherwise in a rectangular layout (drops any extra stations). Supports any station type (including string types) and passes extra keyword arguments on to the station class. Once the antennas have been built with
build_antennas
, the object can be directly iterated over to iterate over the antennas (as if the object were just a list of the antennas).- Parameters
- stationsfloat, optional
Number of stations to be placed.
- station_separationfloat, optional
Distance (m) between adjacent stations.
- station_typeoptional
Class to be used for creating station objects for subsets.
- **station_kwargs
Keyword arguments to be passed on to the
__init__
methods of the station_type class.
- Raises
- ValueError
If
test_antenna_positions
isTrue
and an antenna is found to be above the ice surface.
Warning
If the number of stations provided does not divide nicely into a rectangle, extra stations may be dropped without warning. For example, if stations is 5, then a 2x2 grid will be created and the last station will be silently dropped.
See also
IREXString
String of IREX Vpol antennas.
RegularStation
Station geometry with strings evenly spaced radially around the center.
CoxeterStation
Station geometry with center string and the rest evenly spaced radially.
Notes
This class is designed to have station-like or string-like objects (which are subclasses of
Detector
) as its subsets. Then whenever an object of this class is iterated, all the antennas of its strings will be yielded as in a 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
([stations, …])Generates antenna positions around the station.
triggered
([station_requirement, …])Check if the detector is triggered based on its current state.