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::DetectorBase Class Referenceabstract

An abstract base class that provides common accessors for Detector and Detector::Builder. More...

#include <Detector.h>

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

Classes

struct  Fields
 

Public Types

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

Public Member Functions

virtual ~DetectorBase () noexcept=default
 
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

 DetectorBase ()=default
 DetectorBase has no state, and is hence default-constructable, copyable, and movable.
 
 DetectorBase (DetectorBase const &)=default
 
 DetectorBase (DetectorBase &&)=default
 
DetectorBaseoperator= (DetectorBase const &)=default
 
DetectorBaseoperator= (DetectorBase &&)=default
 
virtual Fields const & getFields () const =0
 Return a reference to a Fields struct.
 
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

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

An abstract base class that provides common accessors for Detector and Detector::Builder.

Definition at line 56 of file Detector.h.

Member Typedef Documentation

◆ CrosstalkMatrix

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

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

◆ ~DetectorBase()

virtual lsst::afw::cameraGeom::DetectorBase::~DetectorBase ( )
virtualdefaultnoexcept

◆ DetectorBase() [1/3]

lsst::afw::cameraGeom::DetectorBase::DetectorBase ( )
protecteddefault

DetectorBase has no state, and is hence default-constructable, copyable, and movable.

◆ DetectorBase() [2/3]

lsst::afw::cameraGeom::DetectorBase::DetectorBase ( DetectorBase const & )
protecteddefault

◆ DetectorBase() [3/3]

lsst::afw::cameraGeom::DetectorBase::DetectorBase ( DetectorBase && )
protecteddefault

Member Function Documentation

◆ 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

◆ 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; }

◆ getBBox()

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

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
inline

Get the crosstalk coefficients.

Definition at line 100 of file Detector.h.

◆ getFields()

virtual Fields const & lsst::afw::cameraGeom::DetectorBase::getFields ( ) const
protectedpure virtual

Return a reference to a Fields struct.

Must be implemented by all subclasses.

Implemented in lsst::afw::cameraGeom::Detector::Builder, and lsst::afw::cameraGeom::Detector.

◆ getId()

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

Get the detector ID.

Definition at line 67 of file Detector.h.

◆ getName()

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

Get the detector name.

Definition at line 64 of file Detector.h.

◆ getNativeCoordSys()

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

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
inline

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
inline

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
inline

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
inline

Get the detector serial "number".

Definition at line 73 of file Detector.h.

◆ getType()

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

Return the purpose of this detector.

Definition at line 70 of file Detector.h.

◆ hasCrosstalk()

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

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
inline

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
inline

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]

DetectorBase & lsst::afw::cameraGeom::DetectorBase::operator= ( DetectorBase && )
protecteddefault

◆ operator=() [2/2]

DetectorBase & lsst::afw::cameraGeom::DetectorBase::operator= ( DetectorBase const & )
protecteddefault

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

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

◆ 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 file: