LSST Applications  21.0.0-147-g0e635eb1+1acddb5be5,22.0.0+052faf71bd,22.0.0+1ea9a8b2b2,22.0.0+6312710a6c,22.0.0+729191ecac,22.0.0+7589c3a021,22.0.0+9f079a9461,22.0.1-1-g7d6de66+b8044ec9de,22.0.1-1-g87000a6+536b1ee016,22.0.1-1-g8e32f31+6312710a6c,22.0.1-10-gd060f87+016f7cdc03,22.0.1-12-g9c3108e+df145f6f68,22.0.1-16-g314fa6d+c825727ab8,22.0.1-19-g93a5c75+d23f2fb6d8,22.0.1-19-gb93eaa13+aab3ef7709,22.0.1-2-g8ef0a89+b8044ec9de,22.0.1-2-g92698f7+9f079a9461,22.0.1-2-ga9b0f51+052faf71bd,22.0.1-2-gac51dbf+052faf71bd,22.0.1-2-gb66926d+6312710a6c,22.0.1-2-gcb770ba+09e3807989,22.0.1-20-g32debb5+b8044ec9de,22.0.1-23-gc2439a9a+fb0756638e,22.0.1-3-g496fd5d+09117f784f,22.0.1-3-g59f966b+1e6ba2c031,22.0.1-3-g849a1b8+f8b568069f,22.0.1-3-gaaec9c0+c5c846a8b1,22.0.1-32-g5ddfab5d3+60ce4897b0,22.0.1-4-g037fbe1+64e601228d,22.0.1-4-g8623105+b8044ec9de,22.0.1-5-g096abc9+d18c45d440,22.0.1-5-g15c806e+57f5c03693,22.0.1-7-gba73697+57f5c03693,master-g6e05de7fdc+c1283a92b8,master-g72cdda8301+729191ecac,w.2021.39
LSST Data Management Base Package
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
lsst::afw::image::ExposureInfo Class Referencefinal

A collection of all the things that make an Exposure different from a MaskedImage. More...

#include <ExposureInfo.h>

Public Member Functions

bool hasWcs () const
 Does this exposure have a Wcs? More...
 
std::shared_ptr< geom::SkyWcs const > getWcs () const
 Return the WCS of the exposure. More...
 
void setWcs (std::shared_ptr< geom::SkyWcs const > wcs)
 Set the WCS of the exposure. More...
 
bool hasDetector () const
 Does this exposure have Detector information? More...
 
std::shared_ptr< cameraGeom::Detector const > getDetector () const
 Return the exposure's Detector information. More...
 
void setDetector (std::shared_ptr< cameraGeom::Detector const > detector)
 Set the exposure's Detector information. More...
 
Filter getFilter () const
 Return the exposure's filter. More...
 
void setFilter (Filter const &filter)
 Set the exposure's filter. More...
 
bool hasFilterLabel () const
 Does this exposure have filter information? More...
 
std::shared_ptr< FilterLabel const > getFilterLabel () const
 Return the exposure's filter information. More...
 
void setFilterLabel (std::shared_ptr< FilterLabel const > filterLabel)
 Set the exposure's filter information. More...
 
bool hasPhotoCalib () const
 Does this exposure have a photometric calibration? More...
 
std::shared_ptr< PhotoCalib const > getPhotoCalib () const
 Return the exposure's photometric calibration. More...
 
void setPhotoCalib (std::shared_ptr< PhotoCalib const > photoCalib)
 Set the Exposure's PhotoCalib object. More...
 
std::shared_ptr< daf::base::PropertySetgetMetadata () const
 Return flexible metadata. More...
 
void setMetadata (std::shared_ptr< daf::base::PropertySet > metadata)
 Set the flexible metadata. More...
 
bool hasPsf () const
 Does this exposure have a Psf? More...
 
std::shared_ptr< detection::Psf const > getPsf () const
 Return the exposure's point-spread function. More...
 
void setPsf (std::shared_ptr< detection::Psf const > psf)
 Set the exposure's point-spread function. More...
 
bool hasValidPolygon () const
 Does this exposure have a valid Polygon. More...
 
std::shared_ptr< geom::polygon::Polygon const > getValidPolygon () const
 Return the valid Polygon. More...
 
void setValidPolygon (std::shared_ptr< geom::polygon::Polygon const > polygon)
 Set the exposure's valid Polygon. More...
 
bool hasApCorrMap () const
 Return true if the exposure has an aperture correction map. More...
 
std::shared_ptr< ApCorrMap const > getApCorrMap () const
 Return the exposure's aperture correction map (null pointer if !hasApCorrMap()) More...
 
void setApCorrMap (std::shared_ptr< ApCorrMap const > apCorrMap)
 Set the exposure's aperture correction map (null pointer if !hasApCorrMap()) More...
 
void initApCorrMap ()
 Set the exposure's aperture correction map to a new, empty map. More...
 
bool hasCoaddInputs () const
 Does this exposure have coadd provenance catalogs? More...
 
void setCoaddInputs (std::shared_ptr< CoaddInputs const > coaddInputs)
 Set the exposure's coadd provenance catalogs. More...
 
std::shared_ptr< CoaddInputs const > getCoaddInputs () const
 Return a pair of catalogs that record the inputs, if this Exposure is a coadd (otherwise null). More...
 
std::shared_ptr< image::VisitInfo const > getVisitInfo () const
 Return the exposure's visit info. More...
 
bool hasVisitInfo () const
 Does this exposure have visit info? More...
 
void setVisitInfo (std::shared_ptr< image::VisitInfo const > const visitInfo)
 Set the exposure's visit info. More...
 
bool hasTransmissionCurve () const
 Does this exposure have a transmission curve? More...
 
std::shared_ptr< TransmissionCurve const > getTransmissionCurve () const
 Return the exposure's transmission curve. More...
 
void setTransmissionCurve (std::shared_ptr< TransmissionCurve const > tc)
 Set the exposure's transmission curve. More...
 
template<class T >
void setComponent (typehandling::Key< std::string, std::shared_ptr< T >> const &key, std::shared_ptr< T > const &object)
 Add a generic component to the ExposureInfo. More...
 
template<class T >
bool hasComponent (typehandling::Key< std::string, T > const &key) const
 Test whether a generic component is defined. More...
 
template<class T >
std::shared_ptr< T > getComponent (typehandling::Key< std::string, std::shared_ptr< T >> const &key) const
 Retrieve a generic component from the ExposureInfo. More...
 
template<class T >
bool removeComponent (typehandling::Key< std::string, T > const &key)
 Clear a generic component from the ExposureInfo. More...
 
 ExposureInfo (std::shared_ptr< geom::SkyWcs const > const &wcs=std::shared_ptr< geom::SkyWcs const >(), std::shared_ptr< detection::Psf const > const &psf=std::shared_ptr< detection::Psf const >(), std::shared_ptr< PhotoCalib const > const &photoCalib=std::shared_ptr< PhotoCalib const >(), std::shared_ptr< cameraGeom::Detector const > const &detector=std::shared_ptr< cameraGeom::Detector const >(), std::shared_ptr< geom::polygon::Polygon const > const &polygon=std::shared_ptr< geom::polygon::Polygon const >(), Filter const &filter=Filter(), std::shared_ptr< daf::base::PropertySet > const &metadata=std::shared_ptr< daf::base::PropertySet >(), std::shared_ptr< CoaddInputs > const &coaddInputs=std::shared_ptr< CoaddInputs >(), std::shared_ptr< ApCorrMap > const &apCorrMap=std::shared_ptr< ApCorrMap >(), std::shared_ptr< image::VisitInfo const > const &visitInfo=std::shared_ptr< image::VisitInfo const >(), std::shared_ptr< TransmissionCurve const > const &transmissionCurve=std::shared_ptr< TransmissionCurve >())
 Construct an ExposureInfo from its various components. More...
 
 ExposureInfo (ExposureInfo const &other)
 Copy constructor; shares all components. More...
 
 ExposureInfo (ExposureInfo &&other)
 
 ExposureInfo (ExposureInfo const &other, bool copyMetadata)
 Copy constructor; shares everything except possibly the metadata. More...
 
ExposureInfooperator= (ExposureInfo const &other)
 Assignment; shares all components. More...
 
ExposureInfooperator= (ExposureInfo &&other)
 
 ~ExposureInfo ()
 

Static Public Member Functions

static int getFitsSerializationVersion ()
 Get the version of FITS serialization that this ExposureInfo understands. More...
 
static std::string const & getFitsSerializationVersionName ()
 Get the version of FITS serialization version info name. More...
 

Static Public Attributes

static typehandling::Key< std::string, std::shared_ptr< geom::SkyWcs const > > const KEY_WCS
 Standard key for looking up the Wcs. More...
 
static typehandling::Key< std::string, std::shared_ptr< detection::Psf const > > const KEY_PSF
 Standard key for looking up the point-spread function. More...
 
static typehandling::Key< std::string, std::shared_ptr< PhotoCalib const > > const KEY_PHOTO_CALIB
 Standard key for looking up the photometric calibration. More...
 
static typehandling::Key< std::string, std::shared_ptr< cameraGeom::Detector const > > const KEY_DETECTOR
 Standard key for looking up the detector information. More...
 
static typehandling::Key< std::string, std::shared_ptr< geom::polygon::Polygon const > > const KEY_VALID_POLYGON
 Standard key for looking up the valid polygon. More...
 
static typehandling::Key< std::string, std::shared_ptr< CoaddInputs const > > const KEY_COADD_INPUTS
 Standard key for looking up coadd provenance catalogs. More...
 
static typehandling::Key< std::string, std::shared_ptr< ApCorrMap const > > const KEY_AP_CORR_MAP
 Standard key for looking up the aperture correction map. More...
 
static typehandling::Key< std::string, std::shared_ptr< TransmissionCurve const > > const KEY_TRANSMISSION_CURVE
 Standard key for looking up the transmission curve. More...
 
static typehandling::Key< std::string, std::shared_ptr< FilterLabel const > > const KEY_FILTER
 Standard key for looking up filter information. More...
 

Friends

template<typename ImageT , typename MaskT , typename VarianceT >
class Exposure
 

Detailed Description

A collection of all the things that make an Exposure different from a MaskedImage.

The constness semantics of the things held by ExposureInfo are admittedly a bit of a mess, but they're that way to preserve backwards compatibility for now. Eventually I'd like to make a lot of these things immutable, but in the meantime, here's the summary:

The setter for Wcs clones its input arguments (this is a departure from the previous behavior for Wcs but it's safer w.r.t. aliasing and it matches the old (and current) behavior of the Exposure and ExposureInfo constructors, which clone their arguments. The setter for Psf and constructors do not clone the Psf, as Psfs are immutable and hence we don't need to ensure strict ownership. The setter for Detector does not clone its input argument, because while it technically isn't, we can safely consider a Detector to be immutable once it's attached to an ExposureInfo.

Definition at line 86 of file ExposureInfo.h.

Constructor & Destructor Documentation

◆ ExposureInfo() [1/4]

lsst::afw::image::ExposureInfo::ExposureInfo ( std::shared_ptr< geom::SkyWcs const > const &  wcs = std::shared_ptr<geom::SkyWcs const>(),
std::shared_ptr< detection::Psf const > const &  psf = std::shared_ptr<detection::Psf const>(),
std::shared_ptr< PhotoCalib const > const &  photoCalib = std::shared_ptr<PhotoCalib const>(),
std::shared_ptr< cameraGeom::Detector const > const &  detector = std::shared_ptr<cameraGeom::Detector const>(),
std::shared_ptr< geom::polygon::Polygon const > const &  polygon = std::shared_ptr<geom::polygon::Polygon const>(),
Filter const &  filter = Filter(),
std::shared_ptr< daf::base::PropertySet > const &  metadata = std::shared_ptr<daf::base::PropertySet>(),
std::shared_ptr< CoaddInputs > const &  coaddInputs = std::shared_ptr<CoaddInputs>(),
std::shared_ptr< ApCorrMap > const &  apCorrMap = std::shared_ptr<ApCorrMap>(),
std::shared_ptr< image::VisitInfo const > const &  visitInfo = std::shared_ptr<image::VisitInfo const>(),
std::shared_ptr< TransmissionCurve const > const &  transmissionCurve = std::shared_ptr<TransmissionCurve>() 
)
explicit

Construct an ExposureInfo from its various components.

If a null PhotoCalib and/or PropertySet pointer is passed (the default), a new PhotoCalib and/or PropertyList will be created. To set these pointers to null, you must explicitly call setPhotoCalib or setMetadata after construction.

Definition at line 178 of file ExposureInfo.cc.

188  : _metadata(metadata ? metadata
189  : std::shared_ptr<daf::base::PropertySet>(new daf::base::PropertyList())),
190  _visitInfo(visitInfo),
191  _components(std::make_unique<MapClass>()) {
192  // setFilter guards against default filters
193  setFilter(filter);
194  setWcs(wcs);
195  setPsf(psf);
198  setValidPolygon(polygon);
199  setCoaddInputs(coaddInputs);
200  setApCorrMap(_cloneApCorrMap(apCorrMap));
202 }
table::Key< int > detector
table::Key< table::Array< std::uint8_t > > wcs
Definition: SkyWcs.cc:66
void setFilter(Filter const &filter)
Set the exposure's filter.
void setValidPolygon(std::shared_ptr< geom::polygon::Polygon const > polygon)
Set the exposure's valid Polygon.
Definition: ExposureInfo.cc:95
void setWcs(std::shared_ptr< geom::SkyWcs const > wcs)
Set the WCS of the exposure.
Definition: ExposureInfo.cc:56
void setApCorrMap(std::shared_ptr< ApCorrMap const > apCorrMap)
Set the exposure's aperture correction map (null pointer if !hasApCorrMap())
void setPhotoCalib(std::shared_ptr< PhotoCalib const > photoCalib)
Set the Exposure's PhotoCalib object.
Definition: ExposureInfo.cc:72
void setCoaddInputs(std::shared_ptr< CoaddInputs const > coaddInputs)
Set the exposure's coadd provenance catalogs.
void setDetector(std::shared_ptr< cameraGeom::Detector const > detector)
Set the exposure's Detector information.
Definition: ExposureInfo.cc:83
void setPsf(std::shared_ptr< detection::Psf const > psf)
Set the exposure's point-spread function.
Definition: ExposureInfo.cc:63
void setTransmissionCurve(std::shared_ptr< TransmissionCurve const > tc)
Set the exposure's transmission curve.
Key< int > psf
Definition: Exposure.cc:65
Key< int > visitInfo
Definition: Exposure.cc:70
Key< int > photoCalib
Definition: Exposure.cc:67
Key< int > transmissionCurve
Definition: Exposure.cc:71
Key< int > apCorrMap
Definition: Exposure.cc:68

◆ ExposureInfo() [2/4]

lsst::afw::image::ExposureInfo::ExposureInfo ( ExposureInfo const &  other)

Copy constructor; shares all components.

Definition at line 204 of file ExposureInfo.cc.

204 : ExposureInfo(other, false) {}
ExposureInfo(std::shared_ptr< geom::SkyWcs const > const &wcs=std::shared_ptr< geom::SkyWcs const >(), std::shared_ptr< detection::Psf const > const &psf=std::shared_ptr< detection::Psf const >(), std::shared_ptr< PhotoCalib const > const &photoCalib=std::shared_ptr< PhotoCalib const >(), std::shared_ptr< cameraGeom::Detector const > const &detector=std::shared_ptr< cameraGeom::Detector const >(), std::shared_ptr< geom::polygon::Polygon const > const &polygon=std::shared_ptr< geom::polygon::Polygon const >(), Filter const &filter=Filter(), std::shared_ptr< daf::base::PropertySet > const &metadata=std::shared_ptr< daf::base::PropertySet >(), std::shared_ptr< CoaddInputs > const &coaddInputs=std::shared_ptr< CoaddInputs >(), std::shared_ptr< ApCorrMap > const &apCorrMap=std::shared_ptr< ApCorrMap >(), std::shared_ptr< image::VisitInfo const > const &visitInfo=std::shared_ptr< image::VisitInfo const >(), std::shared_ptr< TransmissionCurve const > const &transmissionCurve=std::shared_ptr< TransmissionCurve >())
Construct an ExposureInfo from its various components.

◆ ExposureInfo() [3/4]

lsst::afw::image::ExposureInfo::ExposureInfo ( ExposureInfo &&  other)

Definition at line 207 of file ExposureInfo.cc.

207 : ExposureInfo(other) {}

◆ ExposureInfo() [4/4]

lsst::afw::image::ExposureInfo::ExposureInfo ( ExposureInfo const &  other,
bool  copyMetadata 
)

Copy constructor; shares everything except possibly the metadata.

Definition at line 209 of file ExposureInfo.cc.

210  : _metadata(other._metadata),
211  _visitInfo(other._visitInfo),
212  // ExposureInfos can (historically) share objects, but should each have their own pointers to them
213  _components(std::make_unique<MapClass>(*(other._components))) {
214  if (copyMetadata) _metadata = _metadata->deepCopy();
215 }

◆ ~ExposureInfo()

lsst::afw::image::ExposureInfo::~ExposureInfo ( )
default

Member Function Documentation

◆ getApCorrMap()

std::shared_ptr< ApCorrMap const > lsst::afw::image::ExposureInfo::getApCorrMap ( ) const

Return the exposure's aperture correction map (null pointer if !hasApCorrMap())

Definition at line 114 of file ExposureInfo.cc.

114 { return getComponent(KEY_AP_CORR_MAP); }
std::shared_ptr< T > getComponent(typehandling::Key< std::string, std::shared_ptr< T >> const &key) const
Retrieve a generic component from the ExposureInfo.
Definition: ExposureInfo.h:289
static typehandling::Key< std::string, std::shared_ptr< ApCorrMap const > > const KEY_AP_CORR_MAP
Standard key for looking up the aperture correction map.
Definition: ExposureInfo.h:102

◆ getCoaddInputs()

std::shared_ptr< CoaddInputs const > lsst::afw::image::ExposureInfo::getCoaddInputs ( ) const

Return a pair of catalogs that record the inputs, if this Exposure is a coadd (otherwise null).

Definition at line 106 of file ExposureInfo.cc.

106  {
108 }
static typehandling::Key< std::string, std::shared_ptr< CoaddInputs const > > const KEY_COADD_INPUTS
Standard key for looking up coadd provenance catalogs.
Definition: ExposureInfo.h:100

◆ getComponent()

template<class T >
std::shared_ptr<T> lsst::afw::image::ExposureInfo::getComponent ( typehandling::Key< std::string, std::shared_ptr< T >> const &  key) const
inline

Retrieve a generic component from the ExposureInfo.

Parameters
keya strongly typed identifier for the component
Returns
the component identified by that key, or a null pointer if no such component exists.
Exception Safety
Provides strong exception safety.

Definition at line 289 of file ExposureInfo.h.

289  {
290  try {
291  return _components->at(key);
292  } catch (pex::exceptions::OutOfRangeError const& e) {
293  return nullptr;
294  }
295  }

◆ getDetector()

std::shared_ptr< cameraGeom::Detector const > lsst::afw::image::ExposureInfo::getDetector ( ) const

Return the exposure's Detector information.

Definition at line 80 of file ExposureInfo.cc.

80  {
81  return getComponent(KEY_DETECTOR);
82 }
static typehandling::Key< std::string, std::shared_ptr< cameraGeom::Detector const > > const KEY_DETECTOR
Standard key for looking up the detector information.
Definition: ExposureInfo.h:95

◆ getFilter()

Filter lsst::afw::image::ExposureInfo::getFilter ( ) const

Return the exposure's filter.

Definition at line 135 of file ExposureInfo.cc.

135  {
137  if (label) {
138  return makeFilter(*label);
139  } else {
140  // Old exposures always had a Filter, even if only the default
141  return Filter();
142  }
143 }
std::shared_ptr< FilterLabel const > getFilterLabel() const
Return the exposure's filter information.
Filter makeFilter(FilterLabel const &label)
Convert a FilterLabel back to an old-style Filter.

◆ getFilterLabel()

std::shared_ptr< FilterLabel const > lsst::afw::image::ExposureInfo::getFilterLabel ( ) const

Return the exposure's filter information.

Definition at line 150 of file ExposureInfo.cc.

150 { return getComponent(KEY_FILTER); }
static typehandling::Key< std::string, std::shared_ptr< FilterLabel const > > const KEY_FILTER
Standard key for looking up filter information.
Definition: ExposureInfo.h:107

◆ getFitsSerializationVersion()

int lsst::afw::image::ExposureInfo::getFitsSerializationVersion ( )
static

Get the version of FITS serialization that this ExposureInfo understands.

Definition at line 155 of file ExposureInfo.cc.

155  {
156  // Version history:
157  // unversioned and 0: photometric calibration via Calib, WCS via SkyWcs using AST.
158  // 1: photometric calibration via PhotoCalib, generic components
159  // 2: remove Filter, replaced with (generic) FilterLabel
160  static int const version = 2;
161  return version;
162 }

◆ getFitsSerializationVersionName()

std::string const & lsst::afw::image::ExposureInfo::getFitsSerializationVersionName ( )
static

Get the version of FITS serialization version info name.

Definition at line 164 of file ExposureInfo.cc.

164  {
165  static std::string const versionName("EXPINFO_V");
166  return versionName;
167 }

◆ getMetadata()

std::shared_ptr<daf::base::PropertySet> lsst::afw::image::ExposureInfo::getMetadata ( ) const
inline

Return flexible metadata.

Definition at line 163 of file ExposureInfo.h.

163 { return _metadata; }

◆ getPhotoCalib()

std::shared_ptr< PhotoCalib const > lsst::afw::image::ExposureInfo::getPhotoCalib ( ) const

Return the exposure's photometric calibration.

Definition at line 69 of file ExposureInfo.cc.

69  {
71 }
static typehandling::Key< std::string, std::shared_ptr< PhotoCalib const > > const KEY_PHOTO_CALIB
Standard key for looking up the photometric calibration.
Definition: ExposureInfo.h:93

◆ getPsf()

std::shared_ptr< detection::Psf const > lsst::afw::image::ExposureInfo::getPsf ( ) const

Return the exposure's point-spread function.

Definition at line 62 of file ExposureInfo.cc.

62 { return getComponent(KEY_PSF); }
static typehandling::Key< std::string, std::shared_ptr< detection::Psf const > > const KEY_PSF
Standard key for looking up the point-spread function.
Definition: ExposureInfo.h:91

◆ getTransmissionCurve()

std::shared_ptr< TransmissionCurve const > lsst::afw::image::ExposureInfo::getTransmissionCurve ( ) const

Return the exposure's transmission curve.

Definition at line 124 of file ExposureInfo.cc.

124  {
126 }
static typehandling::Key< std::string, std::shared_ptr< TransmissionCurve const > > const KEY_TRANSMISSION_CURVE
Standard key for looking up the transmission curve.
Definition: ExposureInfo.h:105

◆ getValidPolygon()

std::shared_ptr< geom::polygon::Polygon const > lsst::afw::image::ExposureInfo::getValidPolygon ( ) const

Return the valid Polygon.

Definition at line 92 of file ExposureInfo.cc.

92  {
94 }
static typehandling::Key< std::string, std::shared_ptr< geom::polygon::Polygon const > > const KEY_VALID_POLYGON
Standard key for looking up the valid polygon.
Definition: ExposureInfo.h:98

◆ getVisitInfo()

std::shared_ptr<image::VisitInfo const> lsst::afw::image::ExposureInfo::getVisitInfo ( ) const
inline

Return the exposure's visit info.

Definition at line 213 of file ExposureInfo.h.

213 { return _visitInfo; }

◆ getWcs()

std::shared_ptr< geom::SkyWcs const > lsst::afw::image::ExposureInfo::getWcs ( ) const

Return the WCS of the exposure.

Definition at line 55 of file ExposureInfo.cc.

55 { return getComponent(KEY_WCS); }
static typehandling::Key< std::string, std::shared_ptr< geom::SkyWcs const > > const KEY_WCS
Standard key for looking up the Wcs.
Definition: ExposureInfo.h:89

◆ hasApCorrMap()

bool lsst::afw::image::ExposureInfo::hasApCorrMap ( ) const

Return true if the exposure has an aperture correction map.

Definition at line 113 of file ExposureInfo.cc.

113 { return hasComponent(KEY_AP_CORR_MAP); }
bool hasComponent(typehandling::Key< std::string, T > const &key) const
Test whether a generic component is defined.
Definition: ExposureInfo.h:275

◆ hasCoaddInputs()

bool lsst::afw::image::ExposureInfo::hasCoaddInputs ( ) const

Does this exposure have coadd provenance catalogs?

Definition at line 102 of file ExposureInfo.cc.

102 { return hasComponent(KEY_COADD_INPUTS); }

◆ hasComponent()

template<class T >
bool lsst::afw::image::ExposureInfo::hasComponent ( typehandling::Key< std::string, T > const &  key) const
inline

Test whether a generic component is defined.

Parameters
keya strongly typed identifier for the component
Returns
true if there is a component with key, false otherwise
Exception Safety
Provides strong exception safety.

Definition at line 275 of file ExposureInfo.h.

275  {
276  return _components->contains(key);
277  }

◆ hasDetector()

bool lsst::afw::image::ExposureInfo::hasDetector ( ) const

Does this exposure have Detector information?

Definition at line 79 of file ExposureInfo.cc.

79 { return hasComponent(KEY_DETECTOR); }

◆ hasFilterLabel()

bool lsst::afw::image::ExposureInfo::hasFilterLabel ( ) const

Does this exposure have filter information?

Definition at line 149 of file ExposureInfo.cc.

149 { return hasComponent(KEY_FILTER); }

◆ hasPhotoCalib()

bool lsst::afw::image::ExposureInfo::hasPhotoCalib ( ) const

Does this exposure have a photometric calibration?

Definition at line 68 of file ExposureInfo.cc.

68 { return hasComponent(KEY_PHOTO_CALIB); }

◆ hasPsf()

bool lsst::afw::image::ExposureInfo::hasPsf ( ) const

Does this exposure have a Psf?

Definition at line 61 of file ExposureInfo.cc.

61 { return hasComponent(KEY_PSF); }

◆ hasTransmissionCurve()

bool lsst::afw::image::ExposureInfo::hasTransmissionCurve ( ) const

Does this exposure have a transmission curve?

Definition at line 123 of file ExposureInfo.cc.

◆ hasValidPolygon()

bool lsst::afw::image::ExposureInfo::hasValidPolygon ( ) const

Does this exposure have a valid Polygon.

Definition at line 91 of file ExposureInfo.cc.

◆ hasVisitInfo()

bool lsst::afw::image::ExposureInfo::hasVisitInfo ( ) const
inline

Does this exposure have visit info?

Definition at line 216 of file ExposureInfo.h.

216 { return static_cast<bool>(_visitInfo); }

◆ hasWcs()

bool lsst::afw::image::ExposureInfo::hasWcs ( ) const

Does this exposure have a Wcs?

Definition at line 54 of file ExposureInfo.cc.

54 { return hasComponent(KEY_WCS); }

◆ initApCorrMap()

void lsst::afw::image::ExposureInfo::initApCorrMap ( )

Set the exposure's aperture correction map to a new, empty map.

Note that the ExposureInfo constructors do not create an empty aperture correction map, so this method provide a convenient way to initialize one before filling it.

Definition at line 229 of file ExposureInfo.cc.

229 { setApCorrMap(std::make_shared<ApCorrMap>()); }

◆ operator=() [1/2]

ExposureInfo & lsst::afw::image::ExposureInfo::operator= ( ExposureInfo &&  other)

Definition at line 227 of file ExposureInfo.cc.

227 { return *this = other; }

◆ operator=() [2/2]

ExposureInfo & lsst::afw::image::ExposureInfo::operator= ( ExposureInfo const &  other)

Assignment; shares all components.

Definition at line 217 of file ExposureInfo.cc.

217  {
218  if (&other != this) {
219  _metadata = other._metadata;
220  _visitInfo = other._visitInfo;
221  // ExposureInfos can (historically) share objects, but should each have their own pointers to them
222  _components = std::make_unique<MapClass>(*(other._components));
223  }
224  return *this;
225 }

◆ removeComponent()

template<class T >
bool lsst::afw::image::ExposureInfo::removeComponent ( typehandling::Key< std::string, T > const &  key)
inline

Clear a generic component from the ExposureInfo.

Parameters
keya strongly typed identifier for the component. Only components of a compatible type are removed.
Returns
true if a component was removed, false otherwise.
Exception Safety
Provides strong exception safety.

Definition at line 307 of file ExposureInfo.h.

307  {
308  return _components->erase(key);
309  }

◆ setApCorrMap()

void lsst::afw::image::ExposureInfo::setApCorrMap ( std::shared_ptr< ApCorrMap const >  apCorrMap)

Set the exposure's aperture correction map (null pointer if !hasApCorrMap())

Definition at line 115 of file ExposureInfo.cc.

115  {
117 }
void setComponent(typehandling::Key< std::string, std::shared_ptr< T >> const &key, std::shared_ptr< T > const &object)
Add a generic component to the ExposureInfo.
Definition: ExposureInfo.h:255

◆ setCoaddInputs()

void lsst::afw::image::ExposureInfo::setCoaddInputs ( std::shared_ptr< CoaddInputs const >  coaddInputs)

Set the exposure's coadd provenance catalogs.

Definition at line 103 of file ExposureInfo.cc.

103  {
104  setComponent(KEY_COADD_INPUTS, coaddInputs);
105 }

◆ setComponent()

template<class T >
void lsst::afw::image::ExposureInfo::setComponent ( typehandling::Key< std::string, std::shared_ptr< T >> const &  key,
std::shared_ptr< T > const &  object 
)
inline

Add a generic component to the ExposureInfo.

If another component is already present under the key, it is overwritten. If a component of a different type is present under the same name, this method raises an exception.

Template Parameters
Ta subclass of typehandling::Storable
Parameters
keya strongly typed identifier for the component
objectthe object to add.
Exceptions
pex::exceptions::TypeErrorThrown if a component of a different type is present under the requested name.
pex::exceptions::RuntimeErrorThrown if the insertion failed for implementation-dependent reasons.
Exception Safety
Provides basic exception safety (a pre-existing component may be removed).
Note
if object is a null pointer, then hasComponent(key) shall return false after this method returns. This is for compatibility with old ExposureInfo idioms, which often use assignment of null to indicate no data.

Definition at line 255 of file ExposureInfo.h.

256  {
257  static_assert(std::is_base_of<typehandling::Storable, T>::value, "T must be a Storable");
258  // "No data" always represented internally by absent key-value pair, not by mapping to null
259  if (object != nullptr) {
260  _setComponent(key, object);
261  } else {
262  removeComponent(key);
263  }
264  }
bool removeComponent(typehandling::Key< std::string, T > const &key)
Clear a generic component from the ExposureInfo.
Definition: ExposureInfo.h:307

◆ setDetector()

void lsst::afw::image::ExposureInfo::setDetector ( std::shared_ptr< cameraGeom::Detector const >  detector)

Set the exposure's Detector information.

Definition at line 83 of file ExposureInfo.cc.

83  {
85 }

◆ setFilter()

void lsst::afw::image::ExposureInfo::setFilter ( Filter const &  filter)

Set the exposure's filter.

Parameters
filterThe filter to set. If this is the default filter ("_unknown_"), it is interpreted as "no filter".

Definition at line 145 of file ExposureInfo.cc.

void setFilterLabel(std::shared_ptr< FilterLabel const > filterLabel)
Set the exposure's filter information.
std::shared_ptr< FilterLabel > makeFilterLabel(Filter const &filter)
Convert an old-style Filter to a FilterLabel.

◆ setFilterLabel()

void lsst::afw::image::ExposureInfo::setFilterLabel ( std::shared_ptr< FilterLabel const >  filterLabel)

Set the exposure's filter information.

Definition at line 151 of file ExposureInfo.cc.

151  {
152  setComponent(KEY_FILTER, label);
153 }

◆ setMetadata()

void lsst::afw::image::ExposureInfo::setMetadata ( std::shared_ptr< daf::base::PropertySet metadata)
inline

Set the flexible metadata.

Definition at line 166 of file ExposureInfo.h.

166 { _metadata = metadata; }

◆ setPhotoCalib()

void lsst::afw::image::ExposureInfo::setPhotoCalib ( std::shared_ptr< PhotoCalib const >  photoCalib)

Set the Exposure's PhotoCalib object.

Definition at line 72 of file ExposureInfo.cc.

72  {
74 }

◆ setPsf()

void lsst::afw::image::ExposureInfo::setPsf ( std::shared_ptr< detection::Psf const >  psf)

Set the exposure's point-spread function.

Definition at line 63 of file ExposureInfo.cc.

◆ setTransmissionCurve()

void lsst::afw::image::ExposureInfo::setTransmissionCurve ( std::shared_ptr< TransmissionCurve const >  tc)

Set the exposure's transmission curve.

Definition at line 127 of file ExposureInfo.cc.

127  {
129 }

◆ setValidPolygon()

void lsst::afw::image::ExposureInfo::setValidPolygon ( std::shared_ptr< geom::polygon::Polygon const >  polygon)

Set the exposure's valid Polygon.

Definition at line 95 of file ExposureInfo.cc.

95  {
97 }

◆ setVisitInfo()

void lsst::afw::image::ExposureInfo::setVisitInfo ( std::shared_ptr< image::VisitInfo const > const  visitInfo)
inline

Set the exposure's visit info.

Definition at line 219 of file ExposureInfo.h.

219 { _visitInfo = visitInfo; }

◆ setWcs()

void lsst::afw::image::ExposureInfo::setWcs ( std::shared_ptr< geom::SkyWcs const >  wcs)

Set the WCS of the exposure.

Definition at line 56 of file ExposureInfo.cc.

Friends And Related Function Documentation

◆ Exposure

template<typename ImageT , typename MaskT , typename VarianceT >
friend class Exposure
friend

Definition at line 358 of file ExposureInfo.h.

Member Data Documentation

◆ KEY_AP_CORR_MAP

typehandling::Key< std::string, std::shared_ptr< ApCorrMap const > > const lsst::afw::image::ExposureInfo::KEY_AP_CORR_MAP
static
Initial value:
=
typehandling::makeKey<std::shared_ptr<ApCorrMap const>>("AP_CORR_MAP"s)

Standard key for looking up the aperture correction map.

Definition at line 102 of file ExposureInfo.h.

◆ KEY_COADD_INPUTS

typehandling::Key< std::string, std::shared_ptr< CoaddInputs const > > const lsst::afw::image::ExposureInfo::KEY_COADD_INPUTS
static
Initial value:
=
typehandling::makeKey<std::shared_ptr<CoaddInputs const>>("COADD_INPUTS"s)

Standard key for looking up coadd provenance catalogs.

Definition at line 100 of file ExposureInfo.h.

◆ KEY_DETECTOR

typehandling::Key< std::string, std::shared_ptr< cameraGeom::Detector const > > const lsst::afw::image::ExposureInfo::KEY_DETECTOR
static
Initial value:
=
typehandling::makeKey<std::shared_ptr<cameraGeom::Detector const>>("DETECTOR"s)

Standard key for looking up the detector information.

Definition at line 95 of file ExposureInfo.h.

◆ KEY_FILTER

typehandling::Key< std::string, std::shared_ptr< FilterLabel const > > const lsst::afw::image::ExposureInfo::KEY_FILTER
static
Initial value:
=
typehandling::makeKey<std::shared_ptr<FilterLabel const>>("FILTER"s)

Standard key for looking up filter information.

Definition at line 107 of file ExposureInfo.h.

◆ KEY_PHOTO_CALIB

typehandling::Key< std::string, std::shared_ptr< PhotoCalib const > > const lsst::afw::image::ExposureInfo::KEY_PHOTO_CALIB
static
Initial value:
=
typehandling::makeKey<std::shared_ptr<PhotoCalib const>>("PHOTOCALIB"s)

Standard key for looking up the photometric calibration.

Definition at line 93 of file ExposureInfo.h.

◆ KEY_PSF

typehandling::Key< std::string, std::shared_ptr< detection::Psf const > > const lsst::afw::image::ExposureInfo::KEY_PSF
static
Initial value:
=
typehandling::makeKey<std::shared_ptr<detection::Psf const>>("PSF"s)

Standard key for looking up the point-spread function.

Definition at line 91 of file ExposureInfo.h.

◆ KEY_TRANSMISSION_CURVE

typehandling::Key< std::string, std::shared_ptr< TransmissionCurve const > > const lsst::afw::image::ExposureInfo::KEY_TRANSMISSION_CURVE
static
Initial value:
=
typehandling::makeKey<std::shared_ptr<TransmissionCurve const>>("TRANSMISSION_CURVE"s)

Standard key for looking up the transmission curve.

Definition at line 105 of file ExposureInfo.h.

◆ KEY_VALID_POLYGON

typehandling::Key< std::string, std::shared_ptr< geom::polygon::Polygon const > > const lsst::afw::image::ExposureInfo::KEY_VALID_POLYGON
static
Initial value:
=
typehandling::makeKey<std::shared_ptr<geom::polygon::Polygon const>>("VALID_POLYGON"s)

Standard key for looking up the valid polygon.

Definition at line 98 of file ExposureInfo.h.

◆ KEY_WCS

typehandling::Key< std::string, std::shared_ptr< geom::SkyWcs const > > const lsst::afw::image::ExposureInfo::KEY_WCS
static
Initial value:
=
typehandling::makeKey<std::shared_ptr<geom::SkyWcs const>>("SKYWCS"s)

Standard key for looking up the Wcs.

Definition at line 89 of file ExposureInfo.h.


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