Coverage for python/lsst/afw/cameraGeom/cameraConfig.py : 80%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
|
# This file is part of afw. # # Developed for the LSST Data Management System. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>.
"""A configuration that represents (and can be used to construct) a Detector. """ "Dictionary of camera transforms keyed on the transform type.", TransformMapConfig) "Detector type: SCIENCE=0, FOCUS=1, GUIDER=2, WAVEFRONT=3", int) "How this specific detector is constructed; e.g. CCD, E2V, HgCdTe ", str, default="CCD") "Serial string associated with this specific detector", str) "x offset from the origin of the camera in mm in the transposed system.", float) "y offset from the origin of the camera in mm in the transposed system.", float) "in transposed coordinates.", float) "in transposed coordinates.", float) "This includes any necessary rotation to go from " "detector coordinates to camera coordinates " "after optional transposition.", float) "pitch (rotation about y) of the detector in degrees", float) "roll (rotation about x) of the detector in degrees", float)
# Depending on the choice of detector coordinates, the pixel grid may need # to be transposed before rotation to put it in camera coordinates. "Transpose the pixel grid before orienting in focal plane?", bool)
dtype=float, doc=("Flattened crosstalk coefficient matrix; should have nAmps x nAmps entries. " "Once 'reshape'-ed, ``coeffs[i][j]`` is the fraction of the j-th amp present on the i-th amp."), optional=True )
"""Return a 2-D numpy array of crosstalk coefficients of the proper shape""" if not self.crosstalk: return None try: return np.array(self.crosstalk, dtype=np.float32).reshape((numAmps, numAmps)) except Exception as e: raise RuntimeError("Cannot reshape 'crosstalk' coefficients to square matrix: %s" % (e,))
"""A configuration that represents (and can be used to construct) a Camera. """ "List of detector configs", keytype=int, itemtype=DetectorConfig) "Dictionary of camera transforms keyed on the transform type.", TransformMapConfig)
"Plate scale of the camera in arcsec/mm", float) # Note that the radial transform will also apply a scaling, so all coefficients should be # scaled by the plate scale in appropriate units "Coefficients for radial distortion", float) |