LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
cameraConfig.py
Go to the documentation of this file.
1 import lsst.pex.config as pexConfig
2 from lsst.afw.geom import TransformMapConfig
3 
4 __all__ = ["CameraConfig", "DetectorConfig"]
5 
6 class DetectorConfig(pexConfig.Config):
7  transformDict = pexConfig.ConfigField("Dictionary of camera transforms keyed on the transform type.", TransformMapConfig)
8  name = pexConfig.Field("Name of detector slot", str)
9  id = pexConfig.Field("ID of detector slot", int)
10  bbox_x0 = pexConfig.Field("x0 of pixel bounding box", int)
11  bbox_y0 = pexConfig.Field("y0 of pixel bounding box", int)
12  bbox_x1 = pexConfig.Field("x1 of pixel bounding box", int)
13  bbox_y1 = pexConfig.Field("y1 of pixel bounding box", int)
14  detectorType = pexConfig.Field("Detector type: SCIENCE=0, FOCUS=1, GUIDER=2, WAVEFRONT=3", int)
15  serial = pexConfig.Field("Serial string associated with this specific detector", str)
16  offset_x = pexConfig.Field("x offset from the origin of the camera in mm in the transposed system.", float)
17  offset_y = pexConfig.Field("y offset from the origin of the camera in mm in the transposed system.", float)
18  refpos_x = pexConfig.Field("x position of the reference point in the detector in pixels "+\
19  "in transposed coordinates.", float)
20  refpos_y = pexConfig.Field("y position of the reference point in the detector in pixels "+\
21  "in transposed coordinates.", float)
22  yawDeg = pexConfig.Field("yaw (rotation about z) of the detector in degrees. "+\
23  "This includes any necessary rotation to go from detector coordinates to camera coordinates "+\
24  "after optional transposition.", float)
25  pitchDeg = pexConfig.Field("pitch (rotation about y) of the detector in degrees", float)
26  rollDeg = pexConfig.Field("roll (rotation about x) of the detector in degrees", float)
27  pixelSize_x = pexConfig.Field("Pixel size in the x dimension in mm", float)
28  pixelSize_y = pexConfig.Field("Pixel size in the y dimension in mm", float)
29 
30  # Depending on the choice of detector coordinates, the pixel grid may need to be transposed before rotation to put
31  # it in camera coordinates.
32  transposeDetector = pexConfig.Field("Transpose the pixel grid before orienting in focal plane?", bool)
33 
34 class CameraConfig(pexConfig.Config):
35  detectorList = pexConfig.ConfigDictField("List of detector configs", keytype=int, itemtype=DetectorConfig)
36  transformDict = pexConfig.ConfigField("Dictionary of camera transforms keyed on the transform type.", TransformMapConfig)
37  name = pexConfig.Field("Name of this camera", str)
38 
39  plateScale = pexConfig.Field("Plate scale of the camera in arcsec/mm", float)
40  # Note that the radial transform will also apply a scaling, so all coefficients should be
41  # scaled by the plate scale in appropriate units
42  radialCoeffs = pexConfig.ListField("Coefficients for radial distortion", float)
43  # The following is commented until radialXYTransform supports an offset (ticket/3155)
44  #boresiteOffset_x = pexConfig.Field("Offset of the camera coordinates system relative to the boresite (x value)", float)
45  #boresiteOffset_y = pexConfig.Field("Offset of the camera coordinates system relative to the boresite (y value)", float)