22 from __future__
import absolute_import, division, print_function
23 from past.builtins
import basestring
24 from builtins
import object
26 from .cameraGeomLib
import FOCAL_PLANE
30 """!An immutable collection of Detectors that can be accessed by name or ID 34 """!Construct a DetectorCollection 36 @param[in] detectorList a sequence of detectors in index order 41 for detector
in detectorList:
42 for corner
in detector.getCorners(FOCAL_PLANE):
45 raise RuntimeError(
"Detector IDs are not unique")
47 raise RuntimeError(
"Detector names are not unique")
50 """!Support the iter function: return an iterator over all detectors in this collection 55 """!Support the len function: return the number of detectors 60 """!Support the [key] operator: return the specified detector 62 @param[in] key detector name or ID 64 if isinstance(key, basestring):
70 """!Implement the "in" operator: return true if the specified detector is in the collection 72 @param[in] key detector name or ID 74 if isinstance(key, basestring):
80 """!Get an iterator over detector names 85 """!Get an iterator over detector IDs 90 """!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.
A floating-point coordinate rectangle geometry.
def getIdIter(self)
Get an iterator over detector IDs.
An immutable collection of Detectors that can be accessed by name or ID.