LSSTApplications
19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
23 #if !defined(LSST_AFW_CAMERAGEOM_DETECTOR_H)
24 #define LSST_AFW_CAMERAGEOM_DETECTOR_H
28 #include <unordered_map>
39 namespace cameraGeom {
229 template <
typename FromSysT,
typename ToSysT>
231 ToSysT
const &toSys)
const;
245 template <
typename FromSysT,
typename ToSysT>
247 ToSysT
const &toSys)
const;
261 template <
typename FromSysT,
typename ToSysT>
263 FromSysT
const &fromSys, ToSysT
const &toSys)
const;
278 auto begin()
const {
return _amplifiers.begin(); }
279 auto end()
const {
return _amplifiers.end(); }
323 Fields
const _fields;
426 auto begin() {
return _amplifiers.begin(); }
427 auto end() {
return _amplifiers.end(); }
448 void clear() { _amplifiers.clear(); }
472 _fields(
std::move(fields)),
473 _amplifiers(
std::move(amplifiers))
476 Fields
const &
getFields()
const override {
return _fields; }
DetectorType getType() const
Return the purpose of this detector.
An immutable representation of a camera.
table::Key< table::Array< float > > crosstalk
std::string getSerial() const
Get the detector serial "number".
lsst::geom::Point2D getCenter(CameraSys const &cameraSys) const
Get the center of the detector in the specified camera coordinate system.
std::string getPhysicalType() const
Get the detector's physical type.
DetectorBase()=default
DetectorBase has no state, and is hence default-constructable, copyable, and movable.
int orientation(UnitVector3d const &a, UnitVector3d const &b, UnitVector3d const &c)
orientation computes and returns the orientations of 3 unit vectors a, b and c.
void append(std::shared_ptr< Amplifier::Builder > builder)
Append a new amplifier.
virtual ~DetectorBase() noexcept=default
void clearTransforms()
Remove all coordinate transforms.
CameraSys getNativeCoordSys() const
The "native" coordinate system of this detector.
table::Key< int > transformMap
Builder & operator=(Builder &&)=delete
std::shared_ptr< TransformMap const > getTransformMap() const
Get the transform registry.
virtual Fields const & getFields() const =0
Return a reference to a Fields struct.
bool isPersistable() const noexcept override
Detector is always persistable.
Builder(Fields fields, std::vector< std::shared_ptr< Amplifier::Builder >> &&lifiers)
Construct a Detector::Builder with the given field values and amplifiers.
bool hasTransform(CameraSys const &cameraSys) const
Can this object convert between PIXELS and the specified camera coordinate system?
Interface supporting iteration over heterogenous containers.
void setTransformFromPixelsTo(CameraSysPrefix const &toSys, std::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > transform)
Set the transformation from PIXELS to the given coordinate system.
ndarray::Array< float const, 2 > CrosstalkMatrix
DetectorType
Type of imaging detector.
std::shared_ptr< PartialRebuilder > rebuild() const
Return a Builder object initialized with the state of this Detector.
std::vector< std::shared_ptr< Amplifier::Builder > > const & getAmplifiers() const
Return the sequence of Amplifier::Builders directly.
def write(self, patchRef, catalog)
Write the output.
lsst::geom::Box2I getBBox() const
Get the bounding box.
static std::vector< std::shared_ptr< Amplifier::Builder > > rebuildAmplifiers(Detector const &detector)
Create a vector of Amplifier::Builders from the Amplifiers in a Detector.
bool discardTransformFromPixelsTo(CameraSysPrefix const &toSys)
Remove any transformation from PIXELS to the given coordinate system.
An abstract base class that provides common accessors for Detector and Detector::Builder.
Builder(Builder &&)=delete
void setPixelSize(lsst::geom::Extent2D const &pixelSize)
Set the pixel size (in mm).
lsst::geom::Extent2D getPixelSize() const
Get size of pixel along (mm)
Fields const & getFields() const override
Return a reference to a Fields struct.
DetectorBase(DetectorBase const &)=default
table::Key< std::string > physicalType
DetectorBase & operator=(DetectorBase &&)=default
bool hasCrosstalk() const
Have we got crosstalk coefficients?
DetectorBase & operator=(DetectorBase const &)=default
Orientation getOrientation() const
Get detector's orientation in the focal plane.
table::Key< std::string > serial
DetectorBase(DetectorBase &&)=default
A helper class that allows the properties of a single detector to be modified in isolation.
auto begin()
An iterator range over amplifers.
std::shared_ptr< Amplifier const > operator[](size_t i) const
Get the amplifier specified by index.
A helper class that allows the properties of a detector to be modified in the course of modifying a f...
A base class for image defects.
Describe a detector's orientation in the focal plane.
Builder(Builder const &)=delete
void setOrientation(Orientation const &orientation)
Set the orientation of the detector in the focal plane.
void setCrosstalk(CrosstalkMatrix const &crosstalk)
Set the crosstalk coefficients.
std::size_t size() const
Return the number of amplifiers (renamed to len in Python).
void setBBox(lsst::geom::Box2I const &bbox)
Set the bounding box.
Builder & operator=(Builder const &)=delete
void unsetCrosstalk()
Remove the crosstalk coefficient matrix.
void clear()
Remove all amplifiers.
std::vector< lsst::geom::Point2D > getCorners(CameraSys const &cameraSys) const
Get the corners of the detector in the specified camera coordinate system.
Fields const & getFields() const override
Return a reference to a Fields struct.
lsst::geom::Extent2D pixelSize
CameraSys makeCameraSys(CameraSysPrefix const &cameraSysPrefix) const
Get a coordinate system from a detector system prefix (add detector name)
std::vector< std::shared_ptr< Amplifier const > > finishAmplifiers() const
Create a vector of Amplifiers from the Amplifier::Builder sequence.
std::string getName() const
Get the detector name.
table::Key< int > detector
A CRTP facade class for subclasses of Persistable.
void setPixelSize(lsst::geom::Extent2D const &pixelSize)
Set the pixel size (in mm).
An integer coordinate rectangle.
~Builder() noexcept override=0
void setType(DetectorType type)
Set the purpose of this detector.
PartialRebuilder(Detector const &detector)
Construct a PartialRebuilder initialized to the state of the given Detector.
std::shared_ptr< afw::geom::TransformPoint2ToPoint2 > getTransform(FromSysT const &fromSys, ToSysT const &toSys) const
Get a Transform from one camera coordinate system, or camera coordinate system prefix,...
CrosstalkMatrix getCrosstalk() const
Get the crosstalk coefficients.
std::size_t size() const
Get the number of amplifiers.
void setPhysicalType(std::string const &physicalType)
Set the detector's physical type.
std::vector< std::shared_ptr< Amplifier const > > const & getAmplifiers() const
Return the sequence of Amplifiers directly.
CameraSys makeCameraSys(CameraSys const &cameraSys) const
Get a coordinate system from a coordinate system (return input unchanged and untested)
A helper class for Detector that allows amplifiers and most fields to be modified.
std::shared_ptr< Amplifier::Builder > operator[](size_t i) const
Get the amplifier builder specified by index.
std::shared_ptr< Detector const > finish() const
Construct a new Detector from the current state of the Builder.
Camera coordinate system prefix.
CameraSysPrefix const PIXELS
Pixel coordinates: Nominal position on the entry surface of a given detector (x, y unbinned pixels).
io::OutputArchiveHandle OutputArchiveHandle
CrosstalkMatrix crosstalk
lsst::geom::Point2D transform(lsst::geom::Point2D const &point, FromSysT const &fromSys, ToSysT const &toSys) const
Transform a point from one camera system to another.
table::Point2DKey pixelSize
int getId() const
Get the detector ID.
A representation of a detector in a mosaic camera.
void setOrientation(Orientation const &orientation)
Set the orientation of the detector in the focal plane.
auto begin() const
An iterator range over amplifers.
Camera coordinate system; used as a key in in TransformMap.
void setSerial(std::string const &serial)
Set the detector serial "number".