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