3 from .transformConfig
import TransformMapConfig
5 __all__ = [
"CameraConfig",
"DetectorConfig"]
9 """!A configuration that represents (and can be used to construct) a Detector 11 transformDict = pexConfig.ConfigField(
12 "Dictionary of camera transforms keyed on the transform type.", TransformMapConfig)
13 name = pexConfig.Field(
"Name of detector slot", str)
14 id = pexConfig.Field(
"ID of detector slot", int)
15 bbox_x0 = pexConfig.Field(
"x0 of pixel bounding box", int)
16 bbox_y0 = pexConfig.Field(
"y0 of pixel bounding box", int)
17 bbox_x1 = pexConfig.Field(
"x1 of pixel bounding box", int)
18 bbox_y1 = pexConfig.Field(
"y1 of pixel bounding box", int)
19 detectorType = pexConfig.Field(
20 "Detector type: SCIENCE=0, FOCUS=1, GUIDER=2, WAVEFRONT=3", int)
21 serial = pexConfig.Field(
22 "Serial string associated with this specific detector", str)
23 offset_x = pexConfig.Field(
24 "x offset from the origin of the camera in mm in the transposed system.", float)
25 offset_y = pexConfig.Field(
26 "y offset from the origin of the camera in mm in the transposed system.", float)
27 refpos_x = pexConfig.Field(
"x position of the reference point in the detector in pixels " 28 "in transposed coordinates.", float)
29 refpos_y = pexConfig.Field(
"y position of the reference point in the detector in pixels " 30 "in transposed coordinates.", float)
31 yawDeg = pexConfig.Field(
"yaw (rotation about z) of the detector in degrees. " 32 "This includes any necessary rotation to go from " 33 "detector coordinates to camera coordinates " 34 "after optional transposition.", float)
35 pitchDeg = pexConfig.Field(
36 "pitch (rotation about y) of the detector in degrees", float)
37 rollDeg = pexConfig.Field(
38 "roll (rotation about x) of the detector in degrees", float)
39 pixelSize_x = pexConfig.Field(
"Pixel size in the x dimension in mm", float)
40 pixelSize_y = pexConfig.Field(
"Pixel size in the y dimension in mm", float)
44 transposeDetector = pexConfig.Field(
45 "Transpose the pixel grid before orienting in focal plane?", bool)
47 crosstalk = pexConfig.ListField(
49 doc=(
"Flattened crosstalk coefficient matrix; should have nAmps x nAmps entries. " 50 "Once 'reshape'-ed, ``coeffs[i][j]`` is the fraction of the j-th amp present on the i-th amp."),
55 """Return a 2-D numpy array of crosstalk coefficients of the proper shape""" 59 return np.array(self.
crosstalk, dtype=np.float32).reshape((numAmps, numAmps))
60 except Exception
as e:
61 raise RuntimeError(
"Cannot reshape 'crosstalk' coefficients to square matrix: %s" % (e,))
65 """!A configuration that represents (and can be used to construct) a Camera 67 detectorList = pexConfig.ConfigDictField(
68 "List of detector configs", keytype=int, itemtype=DetectorConfig)
69 transformDict = pexConfig.ConfigField(
70 "Dictionary of camera transforms keyed on the transform type.", TransformMapConfig)
71 name = pexConfig.Field(
"Name of this camera", str)
73 plateScale = pexConfig.Field(
74 "Plate scale of the camera in arcsec/mm", float)
77 radialCoeffs = pexConfig.ListField(
78 "Coefficients for radial distortion", float)
A configuration that represents (and can be used to construct) a Detector.
def getCrosstalk(self, numAmps)
A configuration that represents (and can be used to construct) a Camera.