29 namespace cameraGeom {
32 std::string
const &
name,
35 std::string
const &serial,
47 _ampInfoCatalog(ampInfoCatalog),
49 _orientation(orientation),
50 _pixelSize(pixelSize),
77 std::ostringstream os;
78 os <<
"Unknown amplifier \"" << name <<
"\"";
79 throw LSST_EXCEPT(pexExcept::InvalidParameterError, os.str());
81 return *(ampIter->second);
93 return _transformMap[cameraSys];
97 return getTransform(makeCameraSys(cameraSysPrefix));
108 throw LSST_EXCEPT(pexExcept::InvalidParameterError,
109 "Invalid ampInfoCatalog: not all amplifier names are unique");
115 if (trIter->first.hasDetectorName() && trIter->first.getDetectorName() !=
_name) {
116 std::ostringstream os;
117 os <<
"Invalid transformMap: " << trIter->first <<
" detector name != \"" <<
_name <<
"\"";
118 throw LSST_EXCEPT(pexExcept::InvalidParameterError, os.str());
Camera coordinate system; used as a key in in TransformMap.
table::Key< std::string > name
table::AmpInfoCatalog _ampInfoCatalog
list of amplifier data
Geometry and electronic information about raw amplifier images.
std::string const & _name
A custom container class for records, based on std::vector.
CameraTransformMap _transformMap
registry of coordinate transforms
CameraSysPrefix const PIXELS
Nominal pixels on the detector (unbinned) This ignores manufacturing imperfections, "tree ring" distortions and all other such effects.
void _init()
Finish constructing this object.
size_type size() const
Return the number of elements in the catalog.
CameraPoint makeCameraPoint(geom::Point2D point, CameraSys cameraSys) const
Make a CameraPoint from a point and a camera system.
std::vector< geom::Point2D > getCorners(CameraSys const &cameraSys) const
Get the corners of the detector in the specified coordinate system.
An integer coordinate rectangle.
Describe a detector's orientation in the focal plane.
std::string _name
name of detector's location in the camera
bool hasTransform(CameraSys const &cameraSys) const
Does the specified CameraSys exist in the transform registry.
iterator begin()
Iterator access.
_AmpInfoMap _ampNameIterMap
map of amplifier name: catalog iterator
lsst::afw::table::AmpInfoRecord const & operator[](size_t i) const
Get the amplifier specified by index.
CameraSys const makeCameraSys(CameraSys const &cameraSys) const
Get a coordinate system from a coordinate system (return input unchanged and untested) ...
geom::Box2I const & _bbox
Iterator class for CatalogT.
geom::Box2I _bbox
bounding box
Camera coordinate system prefix.
#define LSST_EXCEPT(type,...)
Create an exception with a given type and message and optionally other arguments (dependent on the ty...
Information about a CCD or other imaging detector.
iterator end()
Iterator access.
std::vector< Point2D > getCorners() const
Get the corner points.
Detector(std::string const &name, int id, DetectorType type, std::string const &serial, geom::Box2I const &bbox, lsst::afw::table::AmpInfoCatalog const &InfoCatalog, Orientation const &orientation, geom::Extent2D const &pixelSize, CameraTransformMap::Transforms const &transforms)
Make a Detector.
A Point2D with associated camera coordinate system.
CameraPoint getCenter(CameraSys const &cameraSys) const
Get the center of the detector in the specified coordinate system.
A floating-point coordinate rectangle geometry.
#define CONST_PTR(...)
A shared pointer to a const object.
DetectorType
Type of imaging detector.
CameraPoint transform(CameraPoint const &fromCameraPoint, CameraSys const &toSys) const
Convert a CameraPoint from one coordinate system to another.