lsst.afw  13.0-73-gb2a4e38
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
cameraConfig.py
Go to the documentation of this file.
1 from __future__ import absolute_import, division, print_function
2 
3 import lsst.pex.config as pexConfig
4 from lsst.afw.geom import TransformMapConfig
5 
6 __all__ = ["CameraConfig", "DetectorConfig"]
7 
8 
9 class DetectorConfig(pexConfig.Config):
10  """!A configuration that represents (and can be used to construct) a Detector
11  """
12  transformDict = pexConfig.ConfigField(
13  "Dictionary of camera transforms keyed on the transform type.", TransformMapConfig)
14  name = pexConfig.Field("Name of detector slot", str)
15  id = pexConfig.Field("ID of detector slot", int)
16  bbox_x0 = pexConfig.Field("x0 of pixel bounding box", int)
17  bbox_y0 = pexConfig.Field("y0 of pixel bounding box", int)
18  bbox_x1 = pexConfig.Field("x1 of pixel bounding box", int)
19  bbox_y1 = pexConfig.Field("y1 of pixel bounding box", int)
20  detectorType = pexConfig.Field(
21  "Detector type: SCIENCE=0, FOCUS=1, GUIDER=2, WAVEFRONT=3", int)
22  serial = pexConfig.Field(
23  "Serial string associated with this specific detector", str)
24  offset_x = pexConfig.Field(
25  "x offset from the origin of the camera in mm in the transposed system.", float)
26  offset_y = pexConfig.Field(
27  "y offset from the origin of the camera in mm in the transposed system.", float)
28  refpos_x = pexConfig.Field("x position of the reference point in the detector in pixels " +
29  "in transposed coordinates.", float)
30  refpos_y = pexConfig.Field("y position of the reference point in the detector in pixels " +
31  "in transposed coordinates.", float)
32  yawDeg = pexConfig.Field("yaw (rotation about z) of the detector in degrees. " +
33  "This includes any necessary rotation to go from " +
34  "detector coordinates to camera coordinates " +
35  "after optional transposition.", float)
36  pitchDeg = pexConfig.Field(
37  "pitch (rotation about y) of the detector in degrees", float)
38  rollDeg = pexConfig.Field(
39  "roll (rotation about x) of the detector in degrees", float)
40  pixelSize_x = pexConfig.Field("Pixel size in the x dimension in mm", float)
41  pixelSize_y = pexConfig.Field("Pixel size in the y dimension in mm", float)
42 
43  # Depending on the choice of detector coordinates, the pixel grid may need
44  # to be transposed before rotation to put it in camera coordinates.
45  transposeDetector = pexConfig.Field(
46  "Transpose the pixel grid before orienting in focal plane?", bool)
47 
48 
49 class CameraConfig(pexConfig.Config):
50  """!A configuration that represents (and can be used to construct) a Camera
51  """
52  detectorList = pexConfig.ConfigDictField(
53  "List of detector configs", keytype=int, itemtype=DetectorConfig)
54  transformDict = pexConfig.ConfigField(
55  "Dictionary of camera transforms keyed on the transform type.", TransformMapConfig)
56  name = pexConfig.Field("Name of this camera", str)
57 
58  plateScale = pexConfig.Field(
59  "Plate scale of the camera in arcsec/mm", float)
60  # Note that the radial transform will also apply a scaling, so all coefficients should be
61  # scaled by the plate scale in appropriate units
62  radialCoeffs = pexConfig.ListField(
63  "Coefficients for radial distortion", float)
64  # The following is commented until radialXYTransform supports an offset (ticket/3155)
65  # boresiteOffset_x = pexConfig.Field("Offset of the camera coordinates " +
66  # "system relative to the boresite (x value)", float)
67  # boresiteOffset_y = pexConfig.Field("Offset of the camera coordinates " +
68  # "system relative to the boresite (y value)", float)
A configuration that represents (and can be used to construct) a Detector.
Definition: cameraConfig.py:9
A configuration that represents (and can be used to construct) a Camera.
Definition: cameraConfig.py:49