LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
The cameraGeom package describes the geometry of an imaging camera, including the location of each detector (e.g. CCD) on the focal plane, information about the amplifier subregions of each detector, and the location of known bad pixels in each detector. The cameraGeom package supports operations such as:
Data for constructing a Camera comes from the appropriate observatory-specific obs_ package. For example obs_lsstSim contains data for the LSST camera simulator, obs_sdss contains data for the SDSS imager, and obs_subaru contains data for both Suprime-Cam and Hyper Suprime-Cam (HSC).
There are a few utilities available for visualizing and debugging camera.Camera objects. Examples of available utility methods are: display a particular amp, display an assembled sensor, display a the full camera modaic, plot the sensor boundaries with a grid of test points in FOCAL_PLANE coordinates. An example of how to use the utilities to visualize a camera is available in the obs_lsstSim package as $OBS_LSSTSIM_DIR/bin/displayCamera.py. Following is the help from displayCamera.py:
usage: displayCamera.py [-h] [--showAmp SHOWAMP [SHOWAMP ...]] [--showCcd SHOWCCD [SHOWCCD ...]] [--showRaft SHOWRAFT [SHOWRAFT ...]] [--showCamera] [--cameraBinSize CAMERABINSIZE] [--plotFocalPlane] Display the lsstSim camera optional arguments: -h, --help show this help message and exit --showAmp SHOWAMP [SHOWAMP ...] Show an amplifier segment on an image display. May occur multiple times. Format like R:Rx,Ry S:Sx,Sy A:Ax,Ay e.g. "R:2,2 S:1,1 A:0,0" --showCcd SHOWCCD [SHOWCCD ...] Show a CCD from the mosaic on an image display. May occur multiple times. Format like R:Rx,Ry S:Sx,Sy e.g. "R:2,2 S:1,1" --showRaft SHOWRAFT [SHOWRAFT ...] Show a Raft from the mosaic on an image display. May occur multiple times. Format like R:Rx,Ry e.g. "R:2,2" --showCamera Show the camera mosaic an image display. --cameraBinSize CAMERABINSIZE Size of binning when displaying the full camera mosaic --plotFocalPlane Plot the focalplane in an interactive matplotlib window
The cameraGeom package supports the following camera-based 2-dimensional coordinate systems, and it is possible to add others:
The file examples/cameraGeomExample.py shows some basic usage of the cameraGeom package
The cameraGeom package contains the following important objects; unless otherwise noted, all are available in both C++ and Python:
Camera is a collection of Detectors. Camera also supports coordinate transformation between all camera coordinate systems.
Detector contains information about a given imaging detector (typically a CCD), including its position and orientation in the focal plane and information about amplifiers (such as the image region, overscan and readout corner). Amplifier data is stored as records in an amp info table, and Detector acts as a collection of amp info records.
Detector also supports transforms between focal plane, pixels, and actual pixels coordinates.
CameraSys represents a camera coordinate system. It contains a coordinate system name and a detector name. The detector name is blank for non-detector-based camera coordinate systems such as FOCAL_PLANE and PUPIL, but must always name a specific detector for detector-based coordinate systems.
CameraSysPrefix is a specialized variant of CameraSys that represents a detector-based coordinate system when the detector is not specified. CameraSysPrefix contains a coordinate system name but no detector name.
A constant is provided each camera coordinate system:
CameraSys and CameraSysPrefix are closely related and most methods that take one type are overloaded to also take the other. For example Camera.transform(fromCameraPoint, toSys) transforms a point from one coordinate system to another. ToSys may be either a CameraSys or a CameraSysPrefix, and this affects whether tranform will use the specified detector or search for a suitable detector. See the basic usage for for a concrete example.
A class that holds a 2-dimensional location and its associated camera coordinate system:
The intent is to make transformation more robust and less confusing by keeping a 2-d point and its camera coordinate system together. This is appropriate for transforming small numbers of points, but does not scale well when transforming large numbers of points, so CameraTransformMap also supports a version of transform that takes and returns a vector of geom::Point2D.
A registry of camera coordinate system transforms, keyed by CameraSys. Specifically CameraTransformMap is geom::TransformMap<CameraSys>. Each CameraTransformMap has a native (aka "reference") coordinate system, and each transform in CameraTransformMap is an geom::XYTransform that transforms a 2-d point from the native system to the key's coordinate system in the forward direction. CameraTransformMap.transform transforms a point between any two supported coordinate systems.
Camera and Detector both contain CameraTransformMaps.