lsst.afw gba399f52f3+9b61cfce8e
Loading...
Searching...
No Matches
lsst::afw::cameraGeom::Detector Class Referencefinal

A representation of a detector in a mosaic camera. More...

#include <Detector.h>

Inheritance diagram for lsst::afw::cameraGeom::Detector:
lsst::afw::cameraGeom::DetectorBase lsst::afw::table::io::PersistableFacade< Detector >

Classes

class  Builder
 A helper class for Detector that allows amplifiers and most fields to be modified. More...
class  PartialRebuilder
 A helper class that allows the properties of a single detector to be modified in isolation. More...
class  InCameraBuilder
 A helper class that allows the properties of a detector to be modified in the course of modifying a full camera. More...
class  Factory

Public Types

using CrosstalkMatrix = ndarray::Array<float const, 2>

Public Member Functions

std::shared_ptr< PartialRebuilder > rebuild () const
 Return a Builder object initialized with the state of this Detector.
std::vector< lsst::geom::Point2D > getCorners (CameraSys const &cameraSys) const
 Get the corners of the detector in the specified camera coordinate system.
std::vector< lsst::geom::Point2D > getCorners (CameraSysPrefix const &cameraSysPrefix) const
 Get the corners of the detector in the specified camera coordinate system prefix.
lsst::geom::Point2D getCenter (CameraSys const &cameraSys) const
 Get the center of the detector in the specified camera coordinate system.
lsst::geom::Point2D getCenter (CameraSysPrefix const &cameraSysPrefix) const
 Get the center of the detector in the specified camera coordinate system prefix.
bool hasTransform (CameraSys const &cameraSys) const
 Can this object convert between PIXELS and the specified camera coordinate system?
bool hasTransform (CameraSysPrefix const &cameraSysPrefix) const
 Can this object convert between PIXELS and the specified camera coordinate system prefix?
template<typename FromSysT, typename ToSysT>
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, to another.
template<typename FromSysT, typename ToSysT>
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.
template<typename FromSysT, typename ToSysT>
std::vector< lsst::geom::Point2D > transform (std::vector< lsst::geom::Point2D > const &points, FromSysT const &fromSys, ToSysT const &toSys) const
 Transform a vector of points from one camera system to another.
std::shared_ptr< TransformMap const > getTransformMap () const
 Get the transform registry.
std::vector< std::shared_ptr< Amplifier const > > const & getAmplifiers () const
 Return the sequence of Amplifiers directly.
auto begin () const
 An iterator range over amplifers.
auto end () const
std::shared_ptr< Amplifier const > operator[] (size_t i) const
 Get the amplifier specified by index.
std::shared_ptr< Amplifier const > operator[] (std::string const &name) const
 Get the amplifier specified by name.
std::size_t size () const
 Get the number of amplifiers.
bool isPersistable () const noexcept override
 Detector is always persistable.
template<typename FromSysT, typename ToSysT>
std::shared_ptr< geom::TransformPoint2ToPoint2 > getTransform (FromSysT const &fromSys, ToSysT const &toSys) const
std::string getName () const
 Get the detector name.
int getId () const
 Get the detector ID.
DetectorType getType () const
 Return the purpose of this detector.
std::string getSerial () const
 Get the detector serial "number".
std::string getPhysicalType () const
 Get the detector's physical type.
lsst::geom::Box2I getBBox () const
 Get the bounding box.
Orientation getOrientation () const
 Get detector's orientation in the focal plane.
lsst::geom::Extent2D getPixelSize () const
 Get size of pixel along (mm).
bool hasCrosstalk () const
 Have we got crosstalk coefficients?
CrosstalkMatrix getCrosstalk () const
 Get the crosstalk coefficients.
CameraSys makeCameraSys (CameraSys const &cameraSys) const
 Get a coordinate system from a coordinate system (return input unchanged and untested).
CameraSys makeCameraSys (CameraSysPrefix const &cameraSysPrefix) const
 Get a coordinate system from a detector system prefix (add detector name).
CameraSys getNativeCoordSys () const
 The "native" coordinate system of this detector.

Static Public Member Functions

static std::shared_ptr< Detector > readFits (fits::Fits &fitsfile)
 Read an object from an already open FITS object.
static std::shared_ptr< Detector > dynamicCast (std::shared_ptr< Persistable > const &ptr)
 Dynamically cast a shared_ptr.

Protected Member Functions

Fields const & getFields () const override
 Return a reference to a Fields struct.

Private Member Functions

std::string getPersistenceName () const override
std::string getPythonModule () const override
void write (OutputArchiveHandle &handle) const override

Detailed Description

A representation of a detector in a mosaic camera.

Detector holds both simple data fields (see DetectorBase) and a set of related coordinate systems and transforms, and acts as a container of Amplifier objects.

Detector is immutable, but copies can be modified via one of its Builder classes. A Detector must be created initially as part of a Camera (see Camera::Builder::add), but can then be modified either individually (see Detector::rebuild and Detector::PartialRebuilder) or as part of modifying the full Camera (see Detector::InCameraBuilder).

The coordinate systems and transforms known to a Detector are shared with its parent Camera and all other Detectors in that Camera.

Definition at line 181 of file Detector.h.

Member Typedef Documentation

◆ CrosstalkMatrix

using lsst::afw::cameraGeom::DetectorBase::CrosstalkMatrix = ndarray::Array<float const, 2>
inherited

Definition at line 59 of file Detector.h.

Member Function Documentation

◆ begin()

auto lsst::afw::cameraGeom::Detector::begin ( ) const
inline

An iterator range over amplifers.

Iterators dereference to shared_ptr<Amplifier const>.

Definition at line 277 of file Detector.h.

◆ dynamicCast()

template std::shared_ptr< math::WarpingControl > lsst::afw::table::io::PersistableFacade< Detector >::dynamicCast ( std::shared_ptr< Persistable > const & ptr)
staticinherited

Dynamically cast a shared_ptr.

Dynamically cast a shared pointer and raise on failure.

You must provide an explicit template instantiation in the .cc file for each class that inherits from PersistableFacade. Designed to work around RTTI issues on macOS with hidden symbols;

Exceptions
lsst::pex::exceptions::LogicErrorif the cast fails

param[in] ptr The pointer to be cast.

Returns
The cast pointer.
Exceptions
lsst::pex::exceptions::TypeErrorIf the dynamic cast fails.

Definition at line 218 of file Persistable.cc.

◆ end()

auto lsst::afw::cameraGeom::Detector::end ( ) const
inline

Definition at line 278 of file Detector.h.

◆ getAmplifiers()

std::vector< std::shared_ptr< Amplifier const > > const & lsst::afw::cameraGeom::Detector::getAmplifiers ( ) const
inline

Return the sequence of Amplifiers directly.

Definition at line 269 of file Detector.h.

◆ getBBox()

lsst::geom::Box2I lsst::afw::cameraGeom::DetectorBase::getBBox ( ) const
inlineinherited

Get the bounding box.

Definition at line 85 of file Detector.h.

◆ getCenter() [1/2]

lsst::geom::Point2D lsst::afw::cameraGeom::Detector::getCenter ( CameraSys const & cameraSys) const

Get the center of the detector in the specified camera coordinate system.

Definition at line 72 of file Detector.cc.

◆ getCenter() [2/2]

lsst::geom::Point2D lsst::afw::cameraGeom::Detector::getCenter ( CameraSysPrefix const & cameraSysPrefix) const

Get the center of the detector in the specified camera coordinate system prefix.

Definition at line 78 of file Detector.cc.

◆ getCorners() [1/2]

std::vector< lsst::geom::Point2D > lsst::afw::cameraGeom::Detector::getCorners ( CameraSys const & cameraSys) const

Get the corners of the detector in the specified camera coordinate system.

Definition at line 62 of file Detector.cc.

◆ getCorners() [2/2]

std::vector< lsst::geom::Point2D > lsst::afw::cameraGeom::Detector::getCorners ( CameraSysPrefix const & cameraSysPrefix) const

Get the corners of the detector in the specified camera coordinate system prefix.

Definition at line 68 of file Detector.cc.

◆ getCrosstalk()

CrosstalkMatrix lsst::afw::cameraGeom::DetectorBase::getCrosstalk ( ) const
inlineinherited

Get the crosstalk coefficients.

Definition at line 100 of file Detector.h.

◆ getFields()

Fields const & lsst::afw::cameraGeom::Detector::getFields ( ) const
inlineoverrideprotectedvirtual

Return a reference to a Fields struct.

Must be implemented by all subclasses.

Implements lsst::afw::cameraGeom::DetectorBase.

Definition at line 305 of file Detector.h.

◆ getId()

int lsst::afw::cameraGeom::DetectorBase::getId ( ) const
inlineinherited

Get the detector ID.

Definition at line 67 of file Detector.h.

◆ getName()

std::string lsst::afw::cameraGeom::DetectorBase::getName ( ) const
inlineinherited

Get the detector name.

Definition at line 64 of file Detector.h.

◆ getNativeCoordSys()

CameraSys lsst::afw::cameraGeom::DetectorBase::getNativeCoordSys ( ) const
inlineinherited

The "native" coordinate system of this detector.

Definition at line 123 of file Detector.h.

◆ getOrientation()

Orientation lsst::afw::cameraGeom::DetectorBase::getOrientation ( ) const
inlineinherited

Get detector's orientation in the focal plane.

Definition at line 88 of file Detector.h.

◆ getPersistenceName()

std::string lsst::afw::cameraGeom::Detector::getPersistenceName ( ) const
overrideprivate

Definition at line 319 of file Detector.cc.

◆ getPhysicalType()

std::string lsst::afw::cameraGeom::DetectorBase::getPhysicalType ( ) const
inlineinherited

Get the detector's physical type.

This may mean different things for different cameras; possibilities include the manufacturer ("ITL" vs "E2V") or fundamental technology ("CCD" vs "HgCdTe").

Definition at line 82 of file Detector.h.

◆ getPixelSize()

lsst::geom::Extent2D lsst::afw::cameraGeom::DetectorBase::getPixelSize ( ) const
inlineinherited

Get size of pixel along (mm).

Definition at line 91 of file Detector.h.

◆ getPythonModule()

std::string lsst::afw::cameraGeom::Detector::getPythonModule ( ) const
overrideprivate

Definition at line 325 of file Detector.cc.

◆ getSerial()

std::string lsst::afw::cameraGeom::DetectorBase::getSerial ( ) const
inlineinherited

Get the detector serial "number".

Definition at line 73 of file Detector.h.

◆ getTransform() [1/2]

template<typename FromSysT, typename ToSysT>
std::shared_ptr< afw::geom::TransformPoint2ToPoint2 > lsst::afw::cameraGeom::Detector::getTransform ( FromSysT const & fromSys,
ToSysT const & toSys ) const

Get a Transform from one camera coordinate system, or camera coordinate system prefix, to another.

Template Parameters
FromSysT,ToSysTType of fromSys, toSys: one of CameraSys or CameraSysPrefix
Parameters
fromSys,toSyscamera coordinate systems or prefixes between which to transform
Returns
a Transform that converts from fromSys to toSys in the forward direction. The Transform will be invertible.
Exceptions
lsst::pex::exceptions::InvalidParameterErrorThrown if either fromSys or toSys is not supported.

◆ getTransform() [2/2]

template<typename FromSysT, typename ToSysT>
std::shared_ptr< geom::TransformPoint2ToPoint2 > lsst::afw::cameraGeom::Detector::getTransform ( FromSysT const & fromSys,
ToSysT const & toSys ) const

Definition at line 89 of file Detector.cc.

◆ getTransformMap()

std::shared_ptr< TransformMap const > lsst::afw::cameraGeom::Detector::getTransformMap ( ) const
inline

Get the transform registry.

Definition at line 266 of file Detector.h.

◆ getType()

DetectorType lsst::afw::cameraGeom::DetectorBase::getType ( ) const
inlineinherited

Return the purpose of this detector.

Definition at line 70 of file Detector.h.

◆ hasCrosstalk()

bool lsst::afw::cameraGeom::DetectorBase::hasCrosstalk ( ) const
inlineinherited

Have we got crosstalk coefficients?

Definition at line 94 of file Detector.h.

◆ hasTransform() [1/2]

bool lsst::afw::cameraGeom::Detector::hasTransform ( CameraSys const & cameraSys) const

Can this object convert between PIXELS and the specified camera coordinate system?

Definition at line 82 of file Detector.cc.

◆ hasTransform() [2/2]

bool lsst::afw::cameraGeom::Detector::hasTransform ( CameraSysPrefix const & cameraSysPrefix) const

Can this object convert between PIXELS and the specified camera coordinate system prefix?

Definition at line 84 of file Detector.cc.

◆ isPersistable()

bool lsst::afw::cameraGeom::Detector::isPersistable ( ) const
inlineoverridenoexcept

Detector is always persistable.

Definition at line 301 of file Detector.h.

◆ makeCameraSys() [1/2]

CameraSys lsst::afw::cameraGeom::DetectorBase::makeCameraSys ( CameraSys const & cameraSys) const
inlineinherited

Get a coordinate system from a coordinate system (return input unchanged and untested).

Parameters
[in]cameraSysCamera coordinate system
Returns
cameraSys unchanged
Note
the CameraSysPrefix version needs the detector name, which is why this is not static.

Definition at line 110 of file Detector.h.

◆ makeCameraSys() [2/2]

CameraSys lsst::afw::cameraGeom::DetectorBase::makeCameraSys ( CameraSysPrefix const & cameraSysPrefix) const
inlineinherited

Get a coordinate system from a detector system prefix (add detector name).

Parameters
[in]cameraSysPrefixCamera coordinate system prefix
Returns
cameraSysPrefix with the detector name added

Definition at line 118 of file Detector.h.

◆ operator[]() [1/2]

std::shared_ptr< Amplifier const > lsst::afw::cameraGeom::Detector::operator[] ( size_t i) const
inline

Get the amplifier specified by index.

Exceptions
std::out_of_rangeif index is out of range.

Definition at line 286 of file Detector.h.

◆ operator[]() [2/2]

std::shared_ptr< Amplifier const > lsst::afw::cameraGeom::Detector::operator[] ( std::string const & name) const

Get the amplifier specified by name.

Exceptions
lsst::pex::exceptions::InvalidParameterErrorif no such amplifier.

Definition at line 106 of file Detector.cc.

◆ readFits()

std::shared_ptr< Detector > lsst::afw::table::io::PersistableFacade< Detector >::readFits ( fits::Fits & fitsfile)
inlinestaticinherited

Read an object from an already open FITS object.

Parameters
[in]fitsfileFITS object to read from, already positioned at the desired HDU.

Definition at line 183 of file Persistable.h.

◆ rebuild()

std::shared_ptr< Detector::PartialRebuilder > lsst::afw::cameraGeom::Detector::rebuild ( ) const

Return a Builder object initialized with the state of this Detector.

This is simply a shortcut for Detector::PartialRebuilder(*this).

Definition at line 58 of file Detector.cc.

◆ size()

std::size_t lsst::afw::cameraGeom::Detector::size ( ) const
inline

Get the number of amplifiers.

Renamed to __len__ in Python.

Definition at line 298 of file Detector.h.

◆ transform() [1/2]

template<typename FromSysT, typename ToSysT>
lsst::geom::Point2D lsst::afw::cameraGeom::Detector::transform ( lsst::geom::Point2D const & point,
FromSysT const & fromSys,
ToSysT const & toSys ) const

Transform a point from one camera system to another.

Template Parameters
FromSysTClass of fromSys: one of CameraSys or CameraSysPrefix
ToSysTClass of toSys: one of CameraSys or CameraSysPrefix
Parameters
[in]pointCamera point to transform
[in]fromSysCamera coordinate system of point
[in]toSysCamera coordinate system of returned point
Returns
The transformed point
Exceptions
pex::exceptions::InvalidParameterErrorif fromSys or toSys is unknown

Definition at line 95 of file Detector.cc.

◆ transform() [2/2]

template<typename FromSysT, typename ToSysT>
std::vector< lsst::geom::Point2D > lsst::afw::cameraGeom::Detector::transform ( std::vector< lsst::geom::Point2D > const & points,
FromSysT const & fromSys,
ToSysT const & toSys ) const

Transform a vector of points from one camera system to another.

Template Parameters
FromSysTClass of fromSys: one of CameraSys or CameraSysPrefix
ToSysTClass of toSys: one of CameraSys or CameraSysPrefix
Parameters
[in]pointsCamera points to transform
[in]fromSysCamera coordinate system of points
[in]toSysCamera coordinate system of returned points
Returns
The transformed points
Exceptions
pex::exceptions::InvalidParameterErrorif fromSys or toSys is unknown

Definition at line 101 of file Detector.cc.

◆ write()

void lsst::afw::cameraGeom::Detector::write ( OutputArchiveHandle & handle) const
overrideprivate

Definition at line 329 of file Detector.cc.


The documentation for this class was generated from the following files: