25 #ifndef LSST_AFW_IMAGE_ExposureInfo_h_INCLUDED
26 #define LSST_AFW_IMAGE_ExposureInfo_h_INCLUDED
41 namespace cameraGeom {
65 class TransmissionCurve;
129 [[deprecated(
"Replaced with getFilterLabel. Will be removed after v22.")]]
Filter getFilter()
const;
138 [[deprecated(
"Replaced with setFilterLabel. Will be removed after v22.")]]
void setFilter(
259 if (
object !=
nullptr) {
260 _setComponent(
key,
object);
276 return _components->contains(
key);
291 return _components->at(
key);
308 return _components->erase(
key);
357 template <
typename ImageT,
typename MaskT,
typename VarianceT>
373 struct FitsWriteData {
428 void _finishWriteFits(
fits::Fits& fitsfile, FitsWriteData
const&
data)
const;
436 if (_components->contains(
key)) {
437 _components->erase(
key);
438 }
else if (_components->contains(
key.getId())) {
440 buffer <<
"Map has a key that conflicts with " <<
key;
444 bool success = _components->insert(
key,
object);
448 "Insertion failed for unknown reasons. There may be something in the logs.");
452 LSST_EXCEPT(pex::exceptions::RuntimeError,
"Insertion raised an exception."));
table::Key< int > detector
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
ItemVariant const * other
table::Key< table::Array< std::uint8_t > > wcs
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
A class to contain the data, WCS, and other information needed to describe an image of the sky.
A collection of all the things that make an Exposure different from a MaskedImage.
bool hasWcs() const
Does this exposure have a Wcs?
std::shared_ptr< ApCorrMap const > getApCorrMap() const
Return the exposure's aperture correction map (null pointer if !hasApCorrMap())
static int getFitsSerializationVersion()
Get the version of FITS serialization that this ExposureInfo understands.
std::shared_ptr< geom::polygon::Polygon const > getValidPolygon() const
Return the valid Polygon.
bool hasCoaddInputs() const
Does this exposure have coadd provenance catalogs?
std::shared_ptr< CoaddInputs const > getCoaddInputs() const
Return a pair of catalogs that record the inputs, if this Exposure is a coadd (otherwise null).
void setFilterLabel(std::shared_ptr< FilterLabel const > filterLabel)
Set the exposure's filter information.
std::shared_ptr< daf::base::PropertySet > getMetadata() const
Return flexible metadata.
static typehandling::Key< std::string, std::shared_ptr< geom::SkyWcs const > > const KEY_WCS
Standard key for looking up the Wcs.
ExposureInfo & operator=(ExposureInfo const &other)
Assignment; shares all components.
void setFilter(Filter const &filter)
Set the exposure's filter.
static typehandling::Key< std::string, std::shared_ptr< cameraGeom::Detector const > > const KEY_DETECTOR
Standard key for looking up the detector information.
bool hasTransmissionCurve() const
Does this exposure have a transmission curve?
std::shared_ptr< detection::Psf const > getPsf() const
Return the exposure's point-spread function.
bool hasPsf() const
Does this exposure have a Psf?
void setVisitInfo(std::shared_ptr< image::VisitInfo const > const visitInfo)
Set the exposure's visit info.
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.
void setValidPolygon(std::shared_ptr< geom::polygon::Polygon const > polygon)
Set the exposure's valid Polygon.
bool hasPhotoCalib() const
Does this exposure have a photometric calibration?
bool hasApCorrMap() const
Return true if the exposure has an aperture correction map.
void setWcs(std::shared_ptr< geom::SkyWcs const > wcs)
Set the WCS of the exposure.
bool hasComponent(typehandling::Key< std::string, T > const &key) const
Test whether a generic component is defined.
std::shared_ptr< image::VisitInfo const > getVisitInfo() const
Return the exposure's visit info.
void setApCorrMap(std::shared_ptr< ApCorrMap const > apCorrMap)
Set the exposure's aperture correction map (null pointer if !hasApCorrMap())
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.
std::shared_ptr< cameraGeom::Detector const > getDetector() const
Return the exposure's Detector information.
void setPhotoCalib(std::shared_ptr< PhotoCalib const > photoCalib)
Set the Exposure's PhotoCalib object.
Filter getFilter() const
Return the exposure's filter.
static typehandling::Key< std::string, std::shared_ptr< geom::polygon::Polygon const > > const KEY_VALID_POLYGON
Standard key for looking up the valid polygon.
bool hasValidPolygon() const
Does this exposure have a valid Polygon.
std::shared_ptr< T > getComponent(typehandling::Key< std::string, std::shared_ptr< T >> const &key) const
Retrieve a generic component from the ExposureInfo.
static typehandling::Key< std::string, std::shared_ptr< PhotoCalib const > > const KEY_PHOTO_CALIB
Standard key for looking up the photometric calibration.
void setCoaddInputs(std::shared_ptr< CoaddInputs const > coaddInputs)
Set the exposure's coadd provenance catalogs.
std::shared_ptr< FilterLabel const > getFilterLabel() const
Return the exposure's filter information.
bool hasFilterLabel() const
Does this exposure have filter information?
void setMetadata(std::shared_ptr< daf::base::PropertySet > metadata)
Set the flexible metadata.
void setDetector(std::shared_ptr< cameraGeom::Detector const > detector)
Set the exposure's Detector information.
std::shared_ptr< TransmissionCurve const > getTransmissionCurve() const
Return the exposure's transmission curve.
bool hasVisitInfo() const
Does this exposure have visit info?
void setPsf(std::shared_ptr< detection::Psf const > psf)
Set the exposure's point-spread function.
static typehandling::Key< std::string, std::shared_ptr< TransmissionCurve const > > const KEY_TRANSMISSION_CURVE
Standard key for looking up the transmission curve.
void initApCorrMap()
Set the exposure's aperture correction map to a new, empty map.
static typehandling::Key< std::string, std::shared_ptr< CoaddInputs const > > const KEY_COADD_INPUTS
Standard key for looking up coadd provenance catalogs.
static typehandling::Key< std::string, std::shared_ptr< detection::Psf const > > const KEY_PSF
Standard key for looking up the point-spread function.
std::shared_ptr< geom::SkyWcs const > getWcs() const
Return the WCS of the exposure.
bool hasDetector() const
Does this exposure have Detector information?
static typehandling::Key< std::string, std::shared_ptr< ApCorrMap const > > const KEY_AP_CORR_MAP
Standard key for looking up the aperture correction map.
std::shared_ptr< PhotoCalib const > getPhotoCalib() const
Return the exposure's photometric calibration.
static std::string const & getFitsSerializationVersionName()
Get the version of FITS serialization version info name.
static typehandling::Key< std::string, std::shared_ptr< FilterLabel const > > const KEY_FILTER
Standard key for looking up filter information.
void setTransmissionCurve(std::shared_ptr< TransmissionCurve const > tc)
Set the exposure's transmission curve.
bool removeComponent(typehandling::Key< std::string, T > const &key)
Clear a generic component from the ExposureInfo.
A multi-catalog archive object used to save table::io::Persistable objects.
A base class for objects that can be persisted via afw::table::io Archive classes.
Key for type-safe lookup in a GenericMap.
Reports attempts to access elements outside a valid range of indices.
Reports errors that are due to events beyond the control of the program.
Reports errors from accepting an object of an unexpected or inappropriate type.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
class[[deprecated("Removed with no replacement (but see lsst::afw::image::TransmissionCurve). Will be " "removed after v22.")]] FilterProperty final
Describe the properties of a Filter (e.g.
A base class for image defects.
Key< int > transmissionCurve
T throw_with_nested(T... args)