24 #ifndef LSST_AFW_IMAGE_ExposureInfo_h_INCLUDED
25 #define LSST_AFW_IMAGE_ExposureInfo_h_INCLUDED
27 #include "lsst/base.h"
28 #include "lsst/daf/base.h"
38 namespace cameraGeom {
89 bool hasWcs()
const {
return static_cast<bool>(_wcs); }
92 std::shared_ptr<Wcs>
getWcs() {
return _wcs; }
95 std::shared_ptr<Wcs const>
getWcs()
const {
return _wcs; }
98 void setWcs(std::shared_ptr<Wcs const> wcs) { _wcs = _cloneWcs(wcs); }
104 std::shared_ptr<cameraGeom::Detector const>
getDetector()
const {
return _detector; }
107 void setDetector(std::shared_ptr<cameraGeom::Detector const> detector) { _detector = detector; }
116 bool hasCalib()
const {
return static_cast<bool>(_calib); }
119 std::shared_ptr<Calib>
getCalib() {
return _calib; }
122 std::shared_ptr<Calib const>
getCalib()
const {
return _calib; }
125 void setCalib(std::shared_ptr<Calib const> calib) { _calib = _cloneCalib(calib); }
128 std::shared_ptr<daf::base::PropertySet>
getMetadata()
const {
return _metadata; }
131 void setMetadata(std::shared_ptr<daf::base::PropertySet> metadata) { _metadata = metadata; }
134 bool hasPsf()
const {
return static_cast<bool>(_psf); }
137 std::shared_ptr<detection::Psf>
getPsf()
const {
return _psf; }
140 void setPsf(std::shared_ptr<detection::Psf const> psf) {
150 std::shared_ptr<geom::polygon::Polygon const>
getValidPolygon()
const {
return _validPolygon; }
153 void setValidPolygon(std::shared_ptr<geom::polygon::Polygon const> polygon) { _validPolygon = polygon; }
162 std::shared_ptr<ApCorrMap const>
getApCorrMap()
const {
return _apCorrMap; }
165 void setApCorrMap(std::shared_ptr<ApCorrMap> apCorrMap) { _apCorrMap = apCorrMap; }
179 void setCoaddInputs(std::shared_ptr<CoaddInputs> coaddInputs) { _coaddInputs = coaddInputs; }
185 std::shared_ptr<image::VisitInfo const>
getVisitInfo()
const {
return _visitInfo; }
191 void setVisitInfo(std::shared_ptr<image::VisitInfo const>
const visitInfo) { _visitInfo = visitInfo; }
201 std::shared_ptr<Wcs const>
const& wcs = std::shared_ptr<Wcs const>(),
202 std::shared_ptr<detection::Psf const>
const& psf = std::shared_ptr<detection::Psf const>(),
203 std::shared_ptr<Calib const>
const& calib = std::shared_ptr<Calib const>(),
204 std::shared_ptr<cameraGeom::Detector const>
const& detector =
205 std::shared_ptr<cameraGeom::Detector const>(),
206 std::shared_ptr<geom::polygon::Polygon const>
const& polygon =
207 std::shared_ptr<geom::polygon::Polygon const>(),
208 Filter const& filter =
Filter(), std::shared_ptr<daf::base::PropertySet>
const& metadata =
209 std::shared_ptr<daf::base::PropertySet>(),
210 std::shared_ptr<CoaddInputs>
const& coaddInputs = std::shared_ptr<CoaddInputs>(),
211 std::shared_ptr<ApCorrMap>
const& apCorrMap = std::shared_ptr<ApCorrMap>(),
212 std::shared_ptr<image::VisitInfo const>
const& visitInfo =
213 std::shared_ptr<image::VisitInfo const>());
228 template <
typename ImageT,
typename MaskT,
typename VarianceT>
244 struct FitsWriteData {
245 std::shared_ptr<daf::base::PropertyList> metadata;
246 std::shared_ptr<daf::base::PropertyList> imageMetadata;
247 std::shared_ptr<daf::base::PropertyList> maskMetadata;
248 std::shared_ptr<daf::base::PropertyList> varianceMetadata;
275 void _finishWriteFits(
fits::Fits& fitsfile, FitsWriteData
const& data)
const;
284 void _readFits(
fits::Fits& fitsfile, std::shared_ptr<daf::base::PropertySet> metadata,
285 std::shared_ptr<daf::base::PropertySet> imageMetadata);
287 static std::shared_ptr<Calib> _cloneCalib(std::shared_ptr<Calib const> calib);
288 static std::shared_ptr<Wcs> _cloneWcs(std::shared_ptr<Wcs const> wcs);
289 static std::shared_ptr<ApCorrMap> _cloneApCorrMap(std::shared_ptr<ApCorrMap const> apCorrMap);
291 std::shared_ptr<Wcs> _wcs;
292 std::shared_ptr<detection::Psf> _psf;
293 std::shared_ptr<Calib> _calib;
294 std::shared_ptr<cameraGeom::Detector const> _detector;
295 std::shared_ptr<geom::polygon::Polygon const> _validPolygon;
297 std::shared_ptr<daf::base::PropertySet> _metadata;
298 std::shared_ptr<CoaddInputs> _coaddInputs;
299 std::shared_ptr<ApCorrMap> _apCorrMap;
300 std::shared_ptr<image::VisitInfo const> _visitInfo;
306 #endif // !LSST_AFW_IMAGE_ExposureInfo_h_INCLUDED
void setMetadata(std::shared_ptr< daf::base::PropertySet > metadata)
Set the flexible metadata.
std::shared_ptr< Wcs > getWcs()
Return the coordinate system of the exposure.
std::shared_ptr< detection::Psf > getPsf() const
Return the exposure's point-spread function.
A class to contain the data, WCS, and other information needed to describe an image of the sky...
bool hasCalib() const
Does this exposure have a Calib?
void setWcs(std::shared_ptr< Wcs const > wcs)
Set the coordinate system of the exposure.
std::shared_ptr< ApCorrMap > getApCorrMap()
Return the exposure's aperture correction map (null pointer if !hasApCorrMap())
bool hasValidPolygon() const
Does this exposure have a valid Polygon.
void setCalib(std::shared_ptr< Calib const > calib)
Set the Exposure's Calib object.
void setCoaddInputs(std::shared_ptr< CoaddInputs > coaddInputs)
Set the exposure's coadd provenance catalogs.
bool hasCoaddInputs() const
Does this exposure have coadd provenance catalogs?
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
std::shared_ptr< Wcs const > getWcs() const
Return the coordinate system of the exposure.
ExposureInfo(std::shared_ptr< Wcs const > const &wcs=std::shared_ptr< Wcs const >(), std::shared_ptr< detection::Psf const > const &psf=std::shared_ptr< detection::Psf const >(), std::shared_ptr< Calib const > const &calib=std::shared_ptr< Calib 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 >())
Construct an ExposureInfo from its various components.
bool hasVisitInfo() const
Does this exposure have visit info?
A multi-catalog archive object used to save table::io::Persistable objects.
ExposureInfo & operator=(ExposureInfo const &other)
Assignment; deep-copies all components except the metadata.
void setVisitInfo(std::shared_ptr< image::VisitInfo const > const visitInfo)
Set the exposure's visit info.
std::shared_ptr< daf::base::PropertySet > getMetadata() const
Return flexible metadata.
std::shared_ptr< ApCorrMap const > getApCorrMap() const
Return the exposure's aperture correction map (null pointer if !hasApCorrMap())
void setValidPolygon(std::shared_ptr< geom::polygon::Polygon const > polygon)
Set the exposure's valid Polygon.
void initApCorrMap()
Set the exposure's aperture correction map to a new, empty map.
std::shared_ptr< Calib const > getCalib() const
Return the exposure's photometric calibration.
void setFilter(Filter const &filter)
Set the exposure's filter.
void setDetector(std::shared_ptr< cameraGeom::Detector const > detector)
Set the exposure's Detector information.
std::shared_ptr< cameraGeom::Detector const > getDetector() const
Return the exposure's Detector information.
Holds an integer identifier for an LSST filter.
Filter getFilter() const
Return the exposure's filter.
bool hasPsf() const
Does this exposure have a Psf?
std::shared_ptr< Calib > getCalib()
Return the exposure's photometric calibration.
bool hasWcs() const
Does this exposure have a Wcs?
void setApCorrMap(std::shared_ptr< ApCorrMap > apCorrMap)
Set the exposure's aperture correction map (null pointer if !hasApCorrMap())
void setPsf(std::shared_ptr< detection::Psf const > psf)
Set the exposure's point-spread function.
bool hasApCorrMap() const
Return true if the exposure has an aperture correction map.
A collection of all the things that make an Exposure different from a MaskedImage.
A polymorphic base class for representing an image's Point Spread Function.
std::shared_ptr< geom::polygon::Polygon const > getValidPolygon() const
Return the valid Polygon.
std::shared_ptr< image::VisitInfo const > getVisitInfo() const
Return the exposure's visit info.
bool hasDetector() const
Does this exposure have Detector information?
std::shared_ptr< CoaddInputs > getCoaddInputs() const
Return a pair of catalogs that record the inputs, if this Exposure is a coadd (otherwise null)...