24 #ifndef LSST_AFW_IMAGE_ExposureInfo_h_INCLUDED 25 #define LSST_AFW_IMAGE_ExposureInfo_h_INCLUDED 39 namespace cameraGeom {
63 class TransmissionCurve;
116 bool hasDetector()
const;
131 bool hasPhotoCalib()
const;
140 [[deprecated(
"Replaced with hasPhotoCalib (will be removed in 18.0)")]]
bool hasCalib()
const {
141 return hasPhotoCalib();
147 return getPhotoCalib();
151 [[deprecated(
"Replaced with setPhotoCalib (will be removed in 18.0)")]]
void setCalib(
153 setPhotoCalib(photoCalib);
172 bool hasValidPolygon()
const;
181 bool hasApCorrMap()
const;
195 void initApCorrMap();
198 bool hasCoaddInputs()
const;
216 bool hasTransmissionCurve()
const;
255 if (
object !=
nullptr) {
256 _setStorableComponent(
key,
object);
258 removeComponent(
key);
272 return _components->contains(key);
287 return _components->at(
key);
304 return _components->erase(key);
308 static int getFitsSerializationVersion();
311 static std::string const& getFitsSerializationVersionName();
353 template <
typename ImageT,
typename MaskT,
typename VarianceT>
369 struct FitsWriteData {
424 void _finishWriteFits(
fits::Fits& fitsfile, FitsWriteData
const&
data)
const;
439 if (_components->contains(key)) {
440 _components->erase(key);
441 }
else if (_components->contains(key.
getId())) {
443 buffer <<
"Map has a key that conflicts with " <<
key;
447 bool success = _components->insert(key,
object);
451 "Insertion failed for unknown reasons. There may be something in the logs.");
473 #endif // !LSST_AFW_IMAGE_ExposureInfo_h_INCLUDED 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< TransmissionCurve const > > const KEY_TRANSMISSION_CURVE
Standard key for looking up the transmission curve.
void setMetadata(std::shared_ptr< daf::base::PropertySet > metadata)
Set the flexible metadata.
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< geom::polygon::Polygon const > > const KEY_VALID_POLYGON
Standard key for looking up the valid polygon.
void setCalib(std::shared_ptr< PhotoCalib const > photoCalib)
Set the Exposure's PhotoCalib object.
A class to contain the data, WCS, and other information needed to describe an image of the sky...
void setVisitInfo(std::shared_ptr< image::VisitInfo const > const visitInfo)
Set the exposure's visit info.
table::Key< int > detector
bool hasCalib() const
Does this exposure have a photometric calibration?
std::shared_ptr< image::VisitInfo const > getVisitInfo() const
Return the exposure's visit info.
bool removeComponent(typehandling::Key< std::string, T > const &key)
Clear a generic component from the ExposureInfo.
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.
ItemVariant const * other
static typehandling::Key< std::string, std::shared_ptr< geom::SkyWcs const > > const KEY_WCS
Standard key for looking up the Wcs.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
std::shared_ptr< PhotoCalib const > getCalib() const
Return the exposure's photometric calibration.
A base class for objects that can be persisted via afw::table::io Archive classes.
A multi-catalog archive object used to save table::io::Persistable objects.
Key for type-safe lookup in a GenericMap.
bool hasVisitInfo() const
Does this exposure have visit info?
table::Key< table::Array< std::uint8_t > > wcs
A base class for image defects.
T throw_with_nested(T... args)
void setFilter(Filter const &filter)
Set the exposure's filter.
static typehandling::Key< std::string, std::shared_ptr< PhotoCalib const > > const KEY_PHOTO_CALIB
Standard key for looking up the photometric calibration.
static typehandling::Key< std::string, std::shared_ptr< ApCorrMap const > > const KEY_AP_CORR_MAP
Standard key for looking up the aperture correction map.
Holds an integer identifier for an LSST filter.
std::shared_ptr< daf::base::PropertySet > getMetadata() const
Return flexible metadata.
#define LSST_EXCEPT(type,...)
static typehandling::Key< std::string, std::shared_ptr< detection::Psf const > > const KEY_PSF
Standard key for looking up the point-spread function.
bool hasComponent(typehandling::Key< std::string, T > const &key) const
Test whether a generic component is defined.
constexpr K const & getId() const noexcept
Return the identifier of this field.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
A collection of all the things that make an Exposure different from a MaskedImage.
Filter getFilter() const
Return 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.