LSST Applications
21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
|
A collection of all the things that make an Exposure different from a MaskedImage. More...
#include <ExposureInfo.h>
Public Member Functions | |
bool | hasId () const noexcept |
Does this Exposure have an exposure id? More... | |
table::RecordId | getId () const |
Return the exposure ID. More... | |
void | setId (table::RecordId id) |
Set the exposure ID. More... | |
void | clearId () noexcept |
Unset the exposure ID, if any. More... | |
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::PropertySet > | getMetadata () 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... | |
ExposureInfo & | operator= (ExposureInfo const &other) |
Assignment; shares all components. More... | |
ExposureInfo & | operator= (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 |
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 89 of file ExposureInfo.h.
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 207 of file ExposureInfo.cc.
lsst::afw::image::ExposureInfo::ExposureInfo | ( | ExposureInfo const & | other | ) |
Copy constructor; shares all components.
Definition at line 234 of file ExposureInfo.cc.
lsst::afw::image::ExposureInfo::ExposureInfo | ( | ExposureInfo && | other | ) |
Definition at line 237 of file ExposureInfo.cc.
lsst::afw::image::ExposureInfo::ExposureInfo | ( | ExposureInfo const & | other, |
bool | copyMetadata | ||
) |
Copy constructor; shares everything except possibly the metadata.
Definition at line 239 of file ExposureInfo.cc.
|
default |
|
noexcept |
Unset the exposure ID, if any.
Definition at line 158 of file ExposureInfo.cc.
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.
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.
|
inline |
Retrieve a generic component from the ExposureInfo.
key | a strongly typed identifier for the component |
Definition at line 336 of file ExposureInfo.h.
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.
Filter lsst::afw::image::ExposureInfo::getFilter | ( | ) | const |
Return the exposure's filter.
Definition at line 164 of file ExposureInfo.cc.
std::shared_ptr< FilterLabel const > lsst::afw::image::ExposureInfo::getFilterLabel | ( | ) | const |
Return the exposure's filter information.
Definition at line 179 of file ExposureInfo.cc.
|
static |
Get the version of FITS serialization that this ExposureInfo understands.
Definition at line 184 of file ExposureInfo.cc.
|
static |
Get the version of FITS serialization version info name.
Definition at line 193 of file ExposureInfo.cc.
table::RecordId lsst::afw::image::ExposureInfo::getId | ( | ) | const |
Return the exposure ID.
Exposure IDs are unique per single-detector image, not per on-sky shutter opening.
lsst::pex::exceptions::NotFoundError | Thrown if the exposure does not have an ID. |
Definition at line 133 of file ExposureInfo.cc.
|
inline |
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.
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.
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.
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.
|
inline |
Return the exposure's visit info.
Definition at line 251 of file ExposureInfo.h.
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.
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.
bool lsst::afw::image::ExposureInfo::hasCoaddInputs | ( | ) | const |
|
inline |
Test whether a generic component is defined.
key | a strongly typed identifier for the component |
true
if there is a component with key
, false
otherwiseDefinition at line 322 of file ExposureInfo.h.
bool lsst::afw::image::ExposureInfo::hasDetector | ( | ) | const |
bool lsst::afw::image::ExposureInfo::hasFilterLabel | ( | ) | const |
|
noexcept |
Does this Exposure have an exposure id?
Exposure IDs are unique per single-detector image, not per on-sky shutter opening. Some Exposures, such as coadds, do not have an ID.
Definition at line 131 of file ExposureInfo.cc.
bool lsst::afw::image::ExposureInfo::hasPhotoCalib | ( | ) | const |
bool lsst::afw::image::ExposureInfo::hasPsf | ( | ) | const |
bool lsst::afw::image::ExposureInfo::hasTransmissionCurve | ( | ) | const |
bool lsst::afw::image::ExposureInfo::hasValidPolygon | ( | ) | const |
|
inline |
Does this exposure have visit info?
Definition at line 254 of file ExposureInfo.h.
bool lsst::afw::image::ExposureInfo::hasWcs | ( | ) | const |
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 261 of file ExposureInfo.cc.
ExposureInfo & lsst::afw::image::ExposureInfo::operator= | ( | ExposureInfo && | other | ) |
Definition at line 259 of file ExposureInfo.cc.
ExposureInfo & lsst::afw::image::ExposureInfo::operator= | ( | ExposureInfo const & | other | ) |
Assignment; shares all components.
Definition at line 248 of file ExposureInfo.cc.
|
inline |
Clear a generic component from the ExposureInfo.
key | a strongly typed identifier for the component. Only components of a compatible type are removed. |
true
if a component was removed, false
otherwise.Definition at line 354 of file ExposureInfo.h.
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.
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.
|
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.
T | a subclass of typehandling::Storable |
key | a strongly typed identifier for the component |
object | the object to add. |
pex::exceptions::TypeError | Thrown if a component of a different type is present under the requested name. |
pex::exceptions::RuntimeError | Thrown if the insertion failed for implementation-dependent reasons. |
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 302 of file ExposureInfo.h.
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.
void lsst::afw::image::ExposureInfo::setFilter | ( | Filter const & | filter | ) |
Set the exposure's filter.
filter | The filter to set. If this is the default filter ("_unknown_"), it is interpreted as "no filter". |
Definition at line 174 of file ExposureInfo.cc.
void lsst::afw::image::ExposureInfo::setFilterLabel | ( | std::shared_ptr< FilterLabel const > | filterLabel | ) |
Set the exposure's filter information.
Definition at line 180 of file ExposureInfo.cc.
void lsst::afw::image::ExposureInfo::setId | ( | table::RecordId | id | ) |
Set the exposure ID.
Exposure IDs are unique per single-detector image, not per on-sky shutter opening.
id | The new exposure ID to set. |
Definition at line 141 of file ExposureInfo.cc.
|
inline |
Set the flexible metadata.
Definition at line 204 of file ExposureInfo.h.
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.
void lsst::afw::image::ExposureInfo::setPsf | ( | std::shared_ptr< detection::Psf const > | psf | ) |
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.
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.
|
inline |
void lsst::afw::image::ExposureInfo::setWcs | ( | std::shared_ptr< geom::SkyWcs const > | wcs | ) |
|
friend |
Definition at line 405 of file ExposureInfo.h.
|
static |
Standard key for looking up the aperture correction map.
Definition at line 105 of file ExposureInfo.h.
|
static |
Standard key for looking up coadd provenance catalogs.
Definition at line 103 of file ExposureInfo.h.
|
static |
Standard key for looking up the detector information.
Definition at line 98 of file ExposureInfo.h.
|
static |
Standard key for looking up filter information.
Definition at line 110 of file ExposureInfo.h.
|
static |
Standard key for looking up the photometric calibration.
Definition at line 96 of file ExposureInfo.h.
|
static |
Standard key for looking up the point-spread function.
Definition at line 94 of file ExposureInfo.h.
|
static |
Standard key for looking up the transmission curve.
Definition at line 108 of file ExposureInfo.h.
|
static |
Standard key for looking up the valid polygon.
Definition at line 101 of file ExposureInfo.h.
|
static |
Standard key for looking up the Wcs.
Definition at line 92 of file ExposureInfo.h.