29 namespace cameraGeom {
40 _ampInfoCatalog(ampInfoCatalog),
43 _pixelSize(pixelSize),
70 i = _ampInfoCatalog.
size() + i;
72 return _ampInfoCatalog.
get(i);
76 _AmpInfoMap::const_iterator ampIter = _ampNameIterMap.find(name);
77 if (ampIter == _ampNameIterMap.end()) {
78 std::ostringstream os;
79 os <<
"Unknown amplifier \"" << name <<
"\"";
80 throw LSST_EXCEPT(pexExcept::InvalidParameterError, os.str());
82 return ampIter->second;
92 return _transformMap[cameraSys];
100 void Detector::_init() {
103 ampIter != _ampInfoCatalog.
end(); ++ampIter) {
104 _ampNameIterMap.insert(std::make_pair(ampIter->getName(), ampIter));
106 if (_ampNameIterMap.size() != _ampInfoCatalog.
size()) {
107 throw LSST_EXCEPT(pexExcept::InvalidParameterError,
108 "Invalid ampInfoCatalog: not all amplifier names are unique");
112 for (CameraTransformMap::Transforms::const_iterator trIter = _transformMap.
begin();
113 trIter != _transformMap.
end(); ++trIter) {
114 if (trIter->first.hasDetectorName() && trIter->first.getDetectorName() != _name) {
115 std::ostringstream os;
116 os <<
"Invalid transformMap: " << trIter->first <<
" detector name != \"" << _name <<
"\"";
117 throw LSST_EXCEPT(pexExcept::InvalidParameterError, os.str());
CameraPoint transform(CameraPoint const &fromCameraPoint, CameraSys const &toSys) const
Convert a CameraPoint from one coordinate system to another.
Camera coordinate system; used as a key in in TransformMap.
std::string const & _name
Geometry and electronic information about raw amplifier images.
CameraSysPrefix const PIXELS
Nominal pixels on the detector (unbinned) This ignores manufacturing imperfections, "tree ring" distortions and all other such effects.
std::shared_ptr< lsst::afw::table::AmpInfoRecord const > _get(int i) const
Get the amplifier specified by index, returning a shared pointer to an AmpInfo record.
CameraPoint makeCameraPoint(geom::Point2D const &point, CameraSys const &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 camera coordinate system.
An integer coordinate rectangle.
Describe a detector's orientation in the focal plane.
CameraSys const makeCameraSys(CameraSys const &cameraSys) const
Get a coordinate system from a coordinate system (return input unchanged and untested) ...
A base class for image defects.
iterator end()
Iterator access.
std::vector< Point2D > getCorners() const
Get the corner points.
Iterator class for CatalogT.
bool hasTransform(CameraSys const &cameraSys) const
Does the specified camera coordinate system exist in the transform registry?
table::Key< std::string > name
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.
CameraPoint getCenter(CameraSys const &cameraSys) const
Get the center of the detector in the specified camera coordinate system.
std::shared_ptr< afw::geom::XYTransform const > getTransform(CameraSys const &cameraSys) const
Get an XYTransform that transforms from cameraSys to the native system in the forward direction...
Camera coordinate system prefix.
std::shared_ptr< RecordT > const get(size_type i) const
Return a pointer to the record at index i.
A Point2D with associated camera coordinate system.
size_type size() const
Return the number of elements in the catalog.
A floating-point coordinate rectangle geometry.
iterator begin()
Iterator access.
lsst::afw::table::AmpInfoRecord const & operator[](size_t i) const
Get the amplifier specified by index.
DetectorType
Type of imaging detector.