23 from .cameraGeomLib
import FOCAL_PLANE
27 """!An immutable collection of Detectors that can be accessed by name or ID 31 """!Construct a DetectorCollection 33 @param[in] detectorList a sequence of detectors in index order 38 for detector
in detectorList:
39 for corner
in detector.getCorners(FOCAL_PLANE):
42 raise RuntimeError(
"Detector IDs are not unique")
44 raise RuntimeError(
"Detector names are not unique")
47 """!Support the iter function: return an iterator over all detectors in this collection 52 """!Support the len function: return the number of detectors 57 """!Support the [key] operator: return the specified detector 59 @param[in] key detector name or ID 61 if isinstance(key, str):
67 """!Implement the "in" operator: return true if the specified detector is in the collection 69 @param[in] key detector name or ID 71 if isinstance(key, str):
77 """!Get an iterator over detector names 82 """!Get an iterator over detector IDs 87 """!Return a focal plane bounding box that encompasses all detectors def __len__(self)
Support the len function: return the number of detectors.
def __contains__(self, key)
Implement the "in" operator: return true if the specified detector is in the collection.
def getFpBBox(self)
Return a focal plane bounding box that encompasses all detectors.
def __getitem__(self, key)
Support the [key] operator: return the specified detector.
def __init__(self, detectorList)
Construct a DetectorCollection.
def getNameIter(self)
Get an iterator over detector names.
def __iter__(self)
Support the iter function: return an iterator over all detectors in this collection.
def getIdIter(self)
Get an iterator over detector IDs.
An immutable collection of Detectors that can be accessed by name or ID.