LSST Applications g00274db5b6+edbf708997,g00d0e8bbd7+edbf708997,g199a45376c+5137f08352,g1fd858c14a+1d4b6db739,g262e1987ae+f4d9505c4f,g29ae962dfc+7156fb1a53,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3e17d7035e+5b3adc59f5,g3fd5ace14f+852fa6fbcb,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+9f17e571f4,g67b6fd64d1+6dc8069a4c,g74acd417e5+ae494d68d9,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+536efcc10a,g7cc15d900a+d121454f8d,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d7436a09f+28c28d8d6d,g8ea07a8fe4+db21c37724,g92c671f44c+9f17e571f4,g98df359435+b2e6376b13,g99af87f6a8+b0f4ad7b8d,gac66b60396+966efe6077,gb88ae4c679+7dec8f19df,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gc24b5d6ed1+9f17e571f4,gca7fc764a6+6dc8069a4c,gcc769fe2a4+97d0256649,gd7ef33dd92+6dc8069a4c,gdab6d2f7ff+ae494d68d9,gdbb4c4dda9+9f17e571f4,ge410e46f29+6dc8069a4c,geaed405ab2+e194be0d2b,w.2025.47
LSST Data Management Base Package
Loading...
Searching...
No Matches
lsst::afw::cameraGeom::Detector::Builder Class Referenceabstract

A helper class for Detector that allows amplifiers and most fields to be modified. More...

#include <Detector.h>

Inheritance diagram for lsst::afw::cameraGeom::Detector::Builder:
lsst::afw::cameraGeom::DetectorBase lsst::afw::typehandling::Storable lsst::afw::table::io::Persistable lsst::afw::cameraGeom::Detector::InCameraBuilder lsst::afw::cameraGeom::Detector::PartialRebuilder

Public Types

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

Public Member Functions

 Builder (Builder const &)=delete
 
 Builder (Builder &&)=delete
 
Builderoperator= (Builder const &)=delete
 
Builderoperator= (Builder &&)=delete
 
 ~Builder () noexcept override=0
 
void setBBox (lsst::geom::Box2I const &bbox)
 Set the bounding box.
 
void setType (DetectorType type)
 Set the purpose of this detector.
 
void setSerial (std::string const &serial)
 Set the detector serial "number".
 
void setPhysicalType (std::string const &physicalType)
 Set the detector's physical type.
 
void setCrosstalk (CrosstalkMatrix const &crosstalk)
 Set the crosstalk coefficients.
 
void unsetCrosstalk ()
 Remove the crosstalk coefficient matrix.
 
std::vector< std::shared_ptr< Amplifier::Builder > > const & getAmplifiers () const
 Return the sequence of Amplifier::Builders directly.
 
auto begin ()
 An iterator range over amplifers.
 
auto end ()
 
std::shared_ptr< Amplifier::Builderoperator[] (size_t i) const
 Get the amplifier builder specified by index.
 
std::shared_ptr< Amplifier::Builderoperator[] (std::string const &name) const
 Get a builder for the amplifier specified by name.
 
void append (std::shared_ptr< Amplifier::Builder > builder)
 Append a new amplifier.
 
void clear ()
 Remove all amplifiers.
 
std::size_t size () const
 Return the number of amplifiers (renamed to len in Python).
 
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.
 
virtual std::shared_ptr< Storable > cloneStorable () const
 Create a new object that is a copy of this one (optional operation).
 
virtual std::string toString () const
 Create a string representation of this object (optional operation).
 
virtual std::size_t hash_value () const
 Return a hash of this object (optional operation).
 
virtual bool equals (Storable const &other) const noexcept
 Compare this object to another Storable.
 
void writeFits (std::string const &fileName, std::string const &mode="w") const
 Write the object to a regular FITS file.
 
void writeFits (fits::MemFileManager &manager, std::string const &mode="w") const
 Write the object to a FITS image in memory.
 
void writeFits (fits::Fits &fitsfile) const
 Write the object to an already-open FITS object.
 
virtual bool isPersistable () const noexcept
 Return true if this particular object can be persisted using afw::table::io.
 

Protected Types

using OutputArchiveHandle = io::OutputArchiveHandle
 

Protected Member Functions

 Builder (std::string const &name, int id)
 Construct a Detector::Builder with no amplifiers and the given name and ID.
 
 Builder (Fields fields, std::vector< std::shared_ptr< Amplifier::Builder > > &&amplifiers)
 Construct a Detector::Builder with the given field values and amplifiers.
 
Fields const & getFields () const override
 Return a reference to a Fields struct.
 
std::vector< std::shared_ptr< Amplifier const > > finishAmplifiers () const
 Create a vector of Amplifiers from the Amplifier::Builder sequence.
 
void setOrientation (Orientation const &orientation)
 Set the orientation of the detector in the focal plane.
 
void setPixelSize (lsst::geom::Extent2D const &pixelSize)
 Set the pixel size (in mm).
 
virtual std::string getPersistenceName () const
 Return the unique name used to persist this object and look up its factory.
 
virtual std::string getPythonModule () const
 Return the fully-qualified Python module that should be imported to guarantee that its factory is registered.
 
virtual void write (OutputArchiveHandle &handle) const
 Write the object to one or more catalogs.
 

Static Protected Member Functions

static std::vector< std::shared_ptr< Amplifier::Builder > > rebuildAmplifiers (Detector const &detector)
 Create a vector of Amplifier::Builders from the Amplifiers in a Detector.
 
template<class T>
static bool singleClassEquals (T const &lhs, Storable const &rhs)
 Test if a Storable is of a particular class and equal to another object.
 

Related Symbols

(Note that these are not member symbols.)

std::ostreamoperator<< (std::ostream &os, Storable const &storable)
 Output operator for Storable.
 

Detailed Description

A helper class for Detector that allows amplifiers and most fields to be modified.

Because Detector is immutable, creation and modification always go through Builder, or more precisely, one of its two subclasses:

Detector::Builder itself provides functionality common to these:

  • setters for the simple data fields of Detector;
  • a container of Amplifier::Builders. It is not intended define an interface independent of its subclasses.

The name and ID of a detector (but not its "serial" string) are set at initial construction and are an integral part of the relationship between it and its Camera, and can never be changed, even by Builders.

The fact that Amplifier::Builder inherits from Amplifier does not mean that a container of Amplifier::Builder can inherit from a container of Amplifier, and hence Detector::Builder (which has a container of Amplifer::Builder) cannot inherit directly from Detector (which has a container of Amplifier). But in both Python and templated C++ code, the container interfaces of Detector and Detector::Builder are identical (i.e. they're "duck type" equivalent), aside from the fact that Detector::Builder also permits addition and removal of amplifiers.

Definition at line 361 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.

◆ OutputArchiveHandle

using lsst::afw::table::io::Persistable::OutputArchiveHandle = io::OutputArchiveHandle
protectedinherited

Definition at line 108 of file Persistable.h.

Constructor & Destructor Documentation

◆ Builder() [1/4]

lsst::afw::cameraGeom::Detector::Builder::Builder ( Builder const & )
delete

◆ Builder() [2/4]

lsst::afw::cameraGeom::Detector::Builder::Builder ( Builder && )
delete

◆ ~Builder()

lsst::afw::cameraGeom::Detector::Builder::~Builder ( )
overridepure virtualdefaultnoexcept

◆ Builder() [3/4]

lsst::afw::cameraGeom::Detector::Builder::Builder ( std::string const & name,
int id )
protected

Construct a Detector::Builder with no amplifiers and the given name and ID.

Definition at line 391 of file Detector.cc.

391 {
392 _fields.name = name;
393 _fields.id = id;
394}

◆ Builder() [4/4]

lsst::afw::cameraGeom::Detector::Builder::Builder ( Fields fields,
std::vector< std::shared_ptr< Amplifier::Builder > > && amplifiers )
inlineprotected

Construct a Detector::Builder with the given field values and amplifiers.

Definition at line 470 of file Detector.h.

470 :
471 _fields(std::move(fields)),
472 _amplifiers(std::move(amplifiers))
473 {}
T move(T... args)

Member Function Documentation

◆ append()

void lsst::afw::cameraGeom::Detector::Builder::append ( std::shared_ptr< Amplifier::Builder > builder)

Append a new amplifier.

Definition at line 376 of file Detector.cc.

376 {
377 _amplifiers.push_back(std::move(builder));
378}

◆ begin()

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

An iterator range over amplifers.

Iterators dereference to shared_ptr<Amplifier::Builder>.

Definition at line 425 of file Detector.h.

425{ return _amplifiers.begin(); }

◆ clear()

void lsst::afw::cameraGeom::Detector::Builder::clear ( )
inline

Remove all amplifiers.

Definition at line 447 of file Detector.h.

447{ _amplifiers.clear(); }

◆ cloneStorable()

std::shared_ptr< Storable > lsst::afw::typehandling::Storable::cloneStorable ( ) const
virtualinherited

Create a new object that is a copy of this one (optional operation).

This operation is required for Storables that are stored in GenericMap by value, but not for those stored by shared pointer.

Exceptions
UnsupportedOperationExceptionThrown if this object is not cloneable.
Note
If this class supports a clone operation, the two should behave identically except for the formal return type.
When called on Python classes, this method delegates to __deepcopy__ if it exists.

Reimplemented in lsst::afw::detection::Psf, lsst::afw::geom::polygon::Polygon, lsst::afw::geom::SkyWcs, lsst::afw::image::ApCorrMap, lsst::afw::image::CoaddInputs, lsst::afw::image::FilterLabel, lsst::afw::image::PhotoCalib, lsst::afw::image::VisitInfo, and lsst::afw::typehandling::StorableHelper< Base >.

Definition at line 36 of file Storable.cc.

36 {
37 throw LSST_EXCEPT(UnsupportedOperationException, "Cloning is not supported.");
38}
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition Exception.h:48

◆ end()

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

Definition at line 426 of file Detector.h.

426{ return _amplifiers.end(); }

◆ equals()

bool lsst::afw::typehandling::Storable::equals ( Storable const & other) const
virtualnoexceptinherited

Compare this object to another Storable.

Subclasses that implement equality comparison must override this method to give results consistent with operator== for all inputs that are accepted by both.

Returns
This implementation returns whether the two objects are the same.
Warning
This method compares an object to any type of Storable, although cross-class comparisons should usually return false. If cross-class comparisons are valid, implementers should take care that they are symmetric and will give the same result no matter what the compile-time types of the left- and right-hand sides are.
See also
singleClassEquals
Note
When called on Python classes, this method delegates to __eq__ if it exists.

Reimplemented in lsst::afw::geom::polygon::Polygon, lsst::afw::geom::SkyWcs, lsst::afw::image::PhotoCalib, lsst::afw::image::VisitInfo, and lsst::afw::typehandling::StorableHelper< Base >.

Definition at line 48 of file Storable.cc.

48{ return this == &other; }

◆ finishAmplifiers()

AmpVector lsst::afw::cameraGeom::Detector::Builder::finishAmplifiers ( ) const
protected

Create a vector of Amplifiers from the Amplifier::Builder sequence.

Definition at line 398 of file Detector.cc.

398 {
399 AmpVector result;
400 result.reserve(_amplifiers.size());
401 for (auto const & ampBuilderPtr : _amplifiers) {
402 result.push_back(ampBuilderPtr->finish());
403 }
404 return result;
405}

◆ getAmplifiers()

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

Return the sequence of Amplifier::Builders directly.

Definition at line 417 of file Detector.h.

417{ return _amplifiers; }

◆ getBBox()

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

Get the bounding box.

Definition at line 85 of file Detector.h.

85{ return getFields().bbox; }
virtual Fields const & getFields() const =0
Return a reference to a Fields struct.

◆ 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::Builder::getFields ( ) const
inlineoverrideprotectedvirtual

Return a reference to a Fields struct.

Must be implemented by all subclasses.

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

Definition at line 475 of file Detector.h.

475{ return _fields; }

◆ 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.

123{ return CameraSys(PIXELS, getName()); }
std::string getName() const
Get the detector name.
Definition Detector.h:64
CameraSysPrefix const PIXELS
Pixel coordinates: Nominal position on the entry surface of a given detector (x, y unbinned pixels).
Definition CameraSys.cc:34

◆ 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::table::io::Persistable::getPersistenceName ( ) const
protectedvirtualinherited

Return the unique name used to persist this object and look up its factory.

Must be less than ArchiveIndexSchema::MAX_NAME_LENGTH characters.

Reimplemented in lsst::afw::cameraGeom::Camera, lsst::afw::cameraGeom::Detector, lsst::afw::cameraGeom::DetectorCollection, lsst::afw::cameraGeom::TransformMap, lsst::afw::detection::Footprint, lsst::afw::detection::GaussianPsf, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::Factory, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >, lsst::afw::geom::polygon::Polygon, lsst::afw::geom::SkyWcs, lsst::afw::geom::SpanSet, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, GenericEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, GenericEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, Point2Endpoint >, lsst::afw::geom::Transform< Point2Endpoint, Point2Endpoint >, lsst::afw::geom::Transform< Point2Endpoint, SpherePointEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, SpherePointEndpoint >, lsst::afw::image::ApCorrMap, lsst::afw::image::CoaddInputs, lsst::afw::image::FilterLabel, lsst::afw::image::PhotoCalib, lsst::afw::image::VisitInfo, lsst::afw::math::AnalyticKernel, lsst::afw::math::BilinearWarpingKernel, lsst::afw::math::Chebyshev1Function2< ReturnT >, lsst::afw::math::ChebyshevBoundedField, lsst::afw::math::DeltaFunctionKernel, lsst::afw::math::DoubleGaussianFunction2< ReturnT >, lsst::afw::math::FixedKernel, lsst::afw::math::GaussianFunction2< ReturnT >, lsst::afw::math::LanczosWarpingKernel, lsst::afw::math::LinearCombinationKernel, lsst::afw::math::NearestWarpingKernel, lsst::afw::math::PixelAreaBoundedField, lsst::afw::math::PolynomialFunction2< ReturnT >, lsst::afw::math::ProductBoundedField, lsst::afw::math::TransformBoundedField, lsst::afw::math::WarpingControl, lsst::afw::typehandling::StorableHelper< Base >, lsst::meas::algorithms::CoaddBoundedField, lsst::meas::algorithms::CoaddPsf, lsst::meas::algorithms::DoubleGaussianPsf, lsst::meas::algorithms::KernelPsf, lsst::meas::algorithms::PcaPsf, lsst::meas::algorithms::SingleGaussianPsf, lsst::meas::algorithms::WarpedPsf, lsst::meas::extensions::psfex::PsfexPsf, and lsst::meas::modelfit::Mixture.

Definition at line 34 of file Persistable.cc.

34{ return std::string(); }

◆ 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.

91{ return getFields().pixelSize; }

◆ getPythonModule()

std::string lsst::afw::table::io::Persistable::getPythonModule ( ) const
protectedvirtualinherited

Return the fully-qualified Python module that should be imported to guarantee that its factory is registered.

Must be less than ArchiveIndexSchema::MAX_MODULE_LENGTH characters.

Will be ignored if empty.

Reimplemented in lsst::afw::cameraGeom::Detector, lsst::afw::cameraGeom::DetectorCollection, lsst::afw::cameraGeom::TransformMap, lsst::afw::detection::Footprint, lsst::afw::detection::GaussianPsf, lsst::afw::geom::SkyWcs, lsst::afw::geom::SpanSet, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, GenericEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, GenericEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, Point2Endpoint >, lsst::afw::geom::Transform< Point2Endpoint, Point2Endpoint >, lsst::afw::geom::Transform< Point2Endpoint, SpherePointEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, SpherePointEndpoint >, lsst::afw::image::ApCorrMap, lsst::afw::image::CoaddInputs, lsst::afw::image::FilterLabel, lsst::afw::image::TransmissionCurve, lsst::afw::math::BilinearWarpingKernel, lsst::afw::math::ChebyshevBoundedField, lsst::afw::math::Function< ReturnT >, lsst::afw::math::Function< Kernel::Pixel >, lsst::afw::math::Kernel, lsst::afw::math::LanczosWarpingKernel, lsst::afw::math::NearestWarpingKernel, lsst::afw::math::PixelAreaBoundedField, lsst::afw::math::ProductBoundedField, lsst::afw::math::TransformBoundedField, lsst::afw::math::WarpingControl, lsst::afw::typehandling::StorableHelper< Base >, lsst::meas::algorithms::CoaddBoundedField, lsst::meas::algorithms::CoaddPsf, lsst::meas::algorithms::KernelPsf, lsst::meas::algorithms::WarpedPsf, lsst::meas::extensions::psfex::PsfexPsf, and lsst::meas::modelfit::Mixture.

Definition at line 36 of file Persistable.cc.

36{ return std::string(); }

◆ getSerial()

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

Get the detector serial "number".

Definition at line 73 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.

94 {
95 return !(getFields().crosstalk.isEmpty() ||
96 getFields().crosstalk.getShape() == ndarray::makeVector(0, 0));
97 }

◆ hash_value()

std::size_t lsst::afw::typehandling::Storable::hash_value ( ) const
virtualinherited

Return a hash of this object (optional operation).

Exceptions
UnsupportedOperationExceptionThrown if this object is not hashable.
Note
C++ subclass authors are responsible for any associated specializations of std::hash.
When called on Python classes, this method delegates to __hash__ if it exists.

Reimplemented in lsst::afw::geom::polygon::Polygon, lsst::afw::image::FilterLabel, lsst::afw::image::VisitInfo, and lsst::afw::typehandling::StorableHelper< Base >.

Definition at line 44 of file Storable.cc.

44 {
45 throw LSST_EXCEPT(UnsupportedOperationException, "Hashes are not supported.");
46}

◆ isPersistable()

virtual bool lsst::afw::table::io::Persistable::isPersistable ( ) const
inlinevirtualnoexceptinherited

Return true if this particular object can be persisted using afw::table::io.

Reimplemented in lsst::afw::cameraGeom::Camera, lsst::afw::cameraGeom::Detector, lsst::afw::cameraGeom::DetectorCollection, lsst::afw::cameraGeom::TransformMap, lsst::afw::detection::Footprint, lsst::afw::detection::GaussianPsf, lsst::afw::geom::polygon::Polygon, lsst::afw::geom::SkyWcs, lsst::afw::geom::SpanSet, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, GenericEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, GenericEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, Point2Endpoint >, lsst::afw::geom::Transform< Point2Endpoint, Point2Endpoint >, lsst::afw::geom::Transform< Point2Endpoint, SpherePointEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, SpherePointEndpoint >, lsst::afw::image::ApCorrMap, lsst::afw::image::CoaddInputs, lsst::afw::image::FilterLabel, lsst::afw::image::PhotoCalib, lsst::afw::image::VisitInfo, lsst::afw::math::AnalyticKernel, lsst::afw::math::BilinearWarpingKernel, lsst::afw::math::Chebyshev1Function2< ReturnT >, lsst::afw::math::ChebyshevBoundedField, lsst::afw::math::DeltaFunctionKernel, lsst::afw::math::DoubleGaussianFunction2< ReturnT >, lsst::afw::math::FixedKernel, lsst::afw::math::GaussianFunction2< ReturnT >, lsst::afw::math::LanczosWarpingKernel, lsst::afw::math::LinearCombinationKernel, lsst::afw::math::NearestWarpingKernel, lsst::afw::math::PixelAreaBoundedField, lsst::afw::math::PolynomialFunction2< ReturnT >, lsst::afw::math::ProductBoundedField, lsst::afw::math::TransformBoundedField, lsst::afw::math::WarpingControl, lsst::afw::typehandling::StorableHelper< Base >, lsst::meas::algorithms::CoaddBoundedField, lsst::meas::algorithms::CoaddPsf, lsst::meas::algorithms::DoubleGaussianPsf, lsst::meas::algorithms::KernelPsf, lsst::meas::algorithms::SingleGaussianPsf, lsst::meas::algorithms::WarpedPsf, lsst::meas::extensions::psfex::PsfexPsf, and lsst::meas::modelfit::Mixture.

Definition at line 102 of file Persistable.h.

102{ return false; }

◆ 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.

110{ return cameraSys; }

◆ 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.

118 {
119 return CameraSys(cameraSysPrefix, getFields().name);
120 }

◆ operator=() [1/2]

Builder & lsst::afw::cameraGeom::Detector::Builder::operator= ( Builder && )
delete

◆ operator=() [2/2]

Builder & lsst::afw::cameraGeom::Detector::Builder::operator= ( Builder const & )
delete

◆ operator[]() [1/2]

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

Get the amplifier builder specified by index.

Exceptions
std::out_of_rangeif index is out of range.

Definition at line 434 of file Detector.h.

434{ return _amplifiers.at(i); }

◆ operator[]() [2/2]

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

Get a builder for the amplifier specified by name.

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

Definition at line 372 of file Detector.cc.

372 {
373 return *findAmpIterByName(_amplifiers.begin(), _amplifiers.end(), name);
374}

◆ rebuildAmplifiers()

std::vector< std::shared_ptr< Amplifier::Builder > > lsst::afw::cameraGeom::Detector::Builder::rebuildAmplifiers ( Detector const & detector)
staticprotected

Create a vector of Amplifier::Builders from the Amplifiers in a Detector.

Definition at line 380 of file Detector.cc.

382 {
383 std::vector<std::shared_ptr<Amplifier::Builder>> result;
384 result.reserve(detector.size());
385 for (auto const & ampPtr : detector) {
387 }
388 return result;
389}
T make_shared(T... args)

◆ setBBox()

void lsst::afw::cameraGeom::Detector::Builder::setBBox ( lsst::geom::Box2I const & bbox)
inline

Set the bounding box.

Definition at line 374 of file Detector.h.

374{ _fields.bbox = bbox; }

◆ setCrosstalk()

void lsst::afw::cameraGeom::Detector::Builder::setCrosstalk ( CrosstalkMatrix const & crosstalk)
inline

Set the crosstalk coefficients.

The shape of the crosstalk matrix must be consistent with the set of amplifiers, but is not checked until a Detector instance is actually constructed.

Setting with a zero-size matrix is equivalent to calling unsetCrosstalk().

Definition at line 399 of file Detector.h.

399{ _fields.crosstalk = crosstalk; }

◆ setOrientation()

void lsst::afw::cameraGeom::Detector::Builder::setOrientation ( Orientation const & orientation)
inlineprotected

Set the orientation of the detector in the focal plane.

This is intended for use by InCameraBuilder only; the orientation is used to set the coordinate transform from FOCAL_PLANE to PIXELS, and hence cannot be modified unless the full Camera is being modified.

Definition at line 489 of file Detector.h.

489{ _fields.orientation = orientation; }
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.

◆ setPhysicalType()

void lsst::afw::cameraGeom::Detector::Builder::setPhysicalType ( std::string const & physicalType)
inline

Set 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 387 of file Detector.h.

387{ _fields.physicalType = physicalType; }

◆ setPixelSize()

void lsst::afw::cameraGeom::Detector::Builder::setPixelSize ( lsst::geom::Extent2D const & pixelSize)
inlineprotected

Set the pixel size (in mm).

This is intended for use by InCameraBuilder only; the pixel size is used to set the coordinate transform from FOCAL_PLANE to PIXELS, and hence cannot be modified unless the full Camera is being modified.

Definition at line 498 of file Detector.h.

498{ _fields.pixelSize = pixelSize; }

◆ setSerial()

void lsst::afw::cameraGeom::Detector::Builder::setSerial ( std::string const & serial)
inline

Set the detector serial "number".

Definition at line 380 of file Detector.h.

380{ _fields.serial = serial; }

◆ setType()

void lsst::afw::cameraGeom::Detector::Builder::setType ( DetectorType type)
inline

Set the purpose of this detector.

Definition at line 377 of file Detector.h.

377{ _fields.type = type; }

◆ singleClassEquals()

template<class T>
static bool lsst::afw::typehandling::Storable::singleClassEquals ( T const & lhs,
Storable const & rhs )
inlinestaticprotectedinherited

Test if a Storable is of a particular class and equal to another object.

This method template simplifies implementations of equals that delegate to operator== without supporting cross-class comparisons.

Template Parameters
TThe class expected of the two objects to be compared.
Parameters
lhs,rhsThe objects to compare. Note that rhs need not be a T, while lhs must be.
Returns
true if rhs is a T and lhs == rhs; false otherwise.
Exception Safety
Provides the same level of exception safety as operator==. Most implementations of operator== do not throw.
Note
This method template calls operator== with both arguments of compile-time type T const&. Its use is not recommended if there would be any ambiguity as to which operator== gets picked by overload resolution.

This method template is typically called from equals as:

bool MyType::equals(Storable const& other) const noexcept {
    return singleClassEquals(*this, other);
}

Definition at line 151 of file Storable.h.

151 {
152 auto typedRhs = dynamic_cast<T const*>(&rhs);
153 if (typedRhs != nullptr) {
154 return lhs == *typedRhs;
155 } else {
156 return false;
157 }
158 }

◆ size()

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

Return the number of amplifiers (renamed to len in Python).

Definition at line 450 of file Detector.h.

450{ return _amplifiers.size(); }

◆ toString()

std::string lsst::afw::typehandling::Storable::toString ( ) const
virtualinherited

Create a string representation of this object (optional operation).

Exceptions
UnsupportedOperationExceptionThrown if this object does not have a string representation.
Note
When called on Python classes, this method delegates to __repr__.

Reimplemented in lsst::afw::geom::polygon::Polygon, lsst::afw::geom::SkyWcs, lsst::afw::image::FilterLabel, lsst::afw::image::PhotoCalib, lsst::afw::image::VisitInfo, and lsst::afw::typehandling::StorableHelper< Base >.

Definition at line 40 of file Storable.cc.

40 {
41 throw LSST_EXCEPT(UnsupportedOperationException, "No string representation available.");
42}

◆ unsetCrosstalk()

void lsst::afw::cameraGeom::Detector::Builder::unsetCrosstalk ( )
inline

Remove the crosstalk coefficient matrix.

Definition at line 402 of file Detector.h.

402{ _fields.crosstalk = CrosstalkMatrix(); }
ndarray::Array< float const, 2 > CrosstalkMatrix
Definition Detector.h:59

◆ write()

void lsst::afw::table::io::Persistable::write ( OutputArchiveHandle & handle) const
protectedvirtualinherited

Write the object to one or more catalogs.

The handle object passed to this function provides an interface for adding new catalogs and adding nested objects to the same archive (while checking for duplicates). See OutputArchiveHandle for more information.

Reimplemented in lsst::afw::cameraGeom::Camera, lsst::afw::cameraGeom::Detector, lsst::afw::cameraGeom::DetectorCollection, lsst::afw::cameraGeom::TransformMap, lsst::afw::detection::Footprint, lsst::afw::detection::GaussianPsf, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::Factory, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >, lsst::afw::geom::polygon::Polygon, lsst::afw::geom::SkyWcs, lsst::afw::geom::SpanSet, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, GenericEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, GenericEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, Point2Endpoint >, lsst::afw::geom::Transform< Point2Endpoint, Point2Endpoint >, lsst::afw::geom::Transform< Point2Endpoint, SpherePointEndpoint >, lsst::afw::geom::Transform< Point2Endpoint, SpherePointEndpoint >, lsst::afw::image::ApCorrMap, lsst::afw::image::CoaddInputs, lsst::afw::image::FilterLabel, lsst::afw::image::PhotoCalib, lsst::afw::image::VisitInfo, lsst::afw::math::AnalyticKernel, lsst::afw::math::BilinearWarpingKernel, lsst::afw::math::Chebyshev1Function2< ReturnT >, lsst::afw::math::ChebyshevBoundedField, lsst::afw::math::DeltaFunctionKernel, lsst::afw::math::DoubleGaussianFunction2< ReturnT >, lsst::afw::math::FixedKernel, lsst::afw::math::GaussianFunction2< ReturnT >, lsst::afw::math::LanczosWarpingKernel, lsst::afw::math::LinearCombinationKernel, lsst::afw::math::NearestWarpingKernel, lsst::afw::math::PixelAreaBoundedField, lsst::afw::math::PolynomialFunction2< ReturnT >, lsst::afw::math::ProductBoundedField, lsst::afw::math::TransformBoundedField, lsst::afw::math::WarpingControl, lsst::afw::typehandling::StorableHelper< Base >, lsst::meas::algorithms::CoaddBoundedField, lsst::meas::algorithms::CoaddPsf, lsst::meas::algorithms::DoubleGaussianPsf, lsst::meas::algorithms::KernelPsf, lsst::meas::algorithms::SingleGaussianPsf, lsst::meas::algorithms::WarpedPsf, lsst::meas::extensions::psfex::PsfexPsf, and lsst::meas::modelfit::Mixture.

Definition at line 38 of file Persistable.cc.

38 {
39 assert(!isPersistable());
40 throw LSST_EXCEPT(pex::exceptions::LogicError,
41 "afw::table-based persistence is not supported for this object.");
42}
virtual bool isPersistable() const noexcept
Return true if this particular object can be persisted using afw::table::io.

◆ writeFits() [1/3]

void lsst::afw::table::io::Persistable::writeFits ( fits::Fits & fitsfile) const
inherited

Write the object to an already-open FITS object.

Parameters
[in]fitsfileOpen FITS object to write to.

Definition at line 18 of file Persistable.cc.

18 {
19 OutputArchive archive;
20 archive.put(this);
21 archive.writeFits(fitsfile);
22}

◆ writeFits() [2/3]

void lsst::afw::table::io::Persistable::writeFits ( fits::MemFileManager & manager,
std::string const & mode = "w" ) const
inherited

Write the object to a FITS image in memory.

Parameters
[in]managerName of the file to write to.
[in]modeIf "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file.

Definition at line 29 of file Persistable.cc.

29 {
30 fits::Fits fitsfile(manager, mode, fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK);
31 writeFits(fitsfile);
32}
void writeFits(std::string const &fileName, std::string const &mode="w") const
Write the object to a regular FITS file.

◆ writeFits() [3/3]

void lsst::afw::table::io::Persistable::writeFits ( std::string const & fileName,
std::string const & mode = "w" ) const
inherited

Write the object to a regular FITS file.

Parameters
[in]fileNameName of the file to write to.
[in]modeIf "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file.

Definition at line 24 of file Persistable.cc.

24 {
25 fits::Fits fitsfile(fileName, mode, fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK);
26 writeFits(fitsfile);
27}

Friends And Related Symbol Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream & os,
Storable const & storable )
related

Output operator for Storable.

Parameters
osthe desired output stream
storablethe object to print
Returns
a reference to os
Exceptions
UnsupportedOperationExceptionThrown if storable does not have an implementation of Storable::toString.

Definition at line 174 of file Storable.h.

174 {
175 return os << storable.toString();
176}

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