LSSTApplications
19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
25 #ifndef LSST_AFW_IMAGE_ExposureInfo_h_INCLUDED
26 #define LSST_AFW_IMAGE_ExposureInfo_h_INCLUDED
40 namespace cameraGeom {
64 class TransmissionCurve;
237 if (
object !=
nullptr) {
238 _setComponent(
key,
object);
254 return _components->contains(
key);
269 return _components->at(
key);
286 return _components->erase(
key);
335 template <
typename ImageT,
typename MaskT,
typename VarianceT>
351 struct FitsWriteData {
406 void _finishWriteFits(
fits::Fits& fitsfile, FitsWriteData
const&
data)
const;
414 if (_components->contains(
key)) {
415 _components->erase(
key);
416 }
else if (_components->contains(
key.getId())) {
418 buffer <<
"Map has a key that conflicts with " <<
key;
422 bool success = _components->insert(
key,
object);
426 "Insertion failed for unknown reasons. There may be something in the logs.");
430 LSST_EXCEPT(pex::exceptions::RuntimeError,
"Insertion raised an exception."));
445 #endif // !LSST_AFW_IMAGE_ExposureInfo_h_INCLUDED
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
void setVisitInfo(std::shared_ptr< image::VisitInfo const > const visitInfo)
Set the exposure's visit info.
bool hasVisitInfo() const
Does this exposure have visit info?
void setWcs(std::shared_ptr< geom::SkyWcs const > wcs)
Set the WCS of the exposure.
bool hasValidPolygon() const
Does this exposure have a valid Polygon.
static typehandling::Key< std::string, std::shared_ptr< TransmissionCurve const > > const KEY_TRANSMISSION_CURVE
Standard key for looking up the transmission curve.
A class to contain the data, WCS, and other information needed to describe an image of the sky.
table::Key< table::Array< std::uint8_t > > wcs
void setTransmissionCurve(std::shared_ptr< TransmissionCurve const > tc)
Set the exposure's transmission curve.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Key< int > transmissionCurve
std::shared_ptr< ApCorrMap const > getApCorrMap() const
Return the exposure's aperture correction map (null pointer if !hasApCorrMap())
static typehandling::Key< std::string, std::shared_ptr< CoaddInputs const > > const KEY_COADD_INPUTS
Standard key for looking up coadd provenance catalogs.
Holds an integer identifier for an LSST filter.
std::shared_ptr< PhotoCalib const > getPhotoCalib() const
Return the exposure's photometric calibration.
std::shared_ptr< daf::base::PropertySet > getMetadata() const
Return flexible metadata.
bool hasPsf() const
Does this exposure have a Psf?
std::shared_ptr< detection::Psf const > getPsf() const
Return the exposure's point-spread function.
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.
static typehandling::Key< std::string, std::shared_ptr< geom::SkyWcs const > > const KEY_WCS
Standard key for looking up the Wcs.
std::shared_ptr< TransmissionCurve const > getTransmissionCurve() const
Return the exposure's transmission curve.
void setFilter(Filter const &filter)
Set the exposure's filter.
bool hasDetector() const
Does this exposure have Detector information?
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.
std::shared_ptr< geom::SkyWcs const > getWcs() const
Return the WCS of the exposure.
static int getFitsSerializationVersion()
Get the version of FITS serialization that this ExposureInfo understands.
void setCoaddInputs(std::shared_ptr< CoaddInputs const > coaddInputs)
Set the exposure's coadd provenance catalogs.
Filter getFilter() const
Return the exposure's filter.
std::shared_ptr< cameraGeom::Detector const > getDetector() const
Return the exposure's Detector information.
bool removeComponent(typehandling::Key< std::string, T > const &key)
Clear a generic component from the ExposureInfo.
void setPsf(std::shared_ptr< detection::Psf const > psf)
Set the exposure's point-spread function.
A collection of all the things that make an Exposure different from a MaskedImage.
T throw_with_nested(T... args)
ItemVariant const * other
std::shared_ptr< T > getComponent(typehandling::Key< std::string, std::shared_ptr< T >> const &key) const
Retrieve a generic component from the ExposureInfo.
static std::string const & getFitsSerializationVersionName()
Get the version of FITS serialization version info name.
void initApCorrMap()
Set the exposure's aperture correction map to a new, empty map.
A multi-catalog archive object used to save table::io::Persistable objects.
static typehandling::Key< std::string, std::shared_ptr< geom::polygon::Polygon const > > const KEY_VALID_POLYGON
Standard key for looking up the valid polygon.
A base class for image defects.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
static typehandling::Key< std::string, std::shared_ptr< cameraGeom::Detector const > > const KEY_DETECTOR
Standard key for looking up the detector information.
Key for type-safe lookup in a GenericMap.
A base class for objects that can be persisted via afw::table::io Archive classes.
static typehandling::Key< std::string, std::shared_ptr< detection::Psf const > > const KEY_PSF
Standard key for looking up the point-spread function.
void setMetadata(std::shared_ptr< daf::base::PropertySet > metadata)
Set the flexible metadata.
bool hasTransmissionCurve() const
Does this exposure have a transmission curve?
bool hasCoaddInputs() const
Does this exposure have coadd provenance catalogs?
bool hasPhotoCalib() const
Does this exposure have a photometric calibration?
bool hasComponent(typehandling::Key< std::string, T > const &key) const
Test whether a generic component is defined.
void setDetector(std::shared_ptr< cameraGeom::Detector const > detector)
Set the exposure's Detector information.
table::Key< int > detector
void setValidPolygon(std::shared_ptr< geom::polygon::Polygon const > polygon)
Set the exposure's valid Polygon.
Reports attempts to access elements outside a valid range of indices.
void setPhotoCalib(std::shared_ptr< PhotoCalib const > photoCalib)
Set the Exposure's PhotoCalib object.
static typehandling::Key< std::string, std::shared_ptr< ApCorrMap const > > const KEY_AP_CORR_MAP
Standard key for looking up the aperture correction map.
static typehandling::Key< std::string, std::shared_ptr< PhotoCalib const > > const KEY_PHOTO_CALIB
Standard key for looking up the photometric calibration.
Reports errors from accepting an object of an unexpected or inappropriate type.
std::shared_ptr< CoaddInputs const > getCoaddInputs() const
Return a pair of catalogs that record the inputs, if this Exposure is a coadd (otherwise null).
bool hasApCorrMap() const
Return true if the exposure has an aperture correction map.
ExposureInfo & operator=(ExposureInfo const &other)
Assignment; shares all components except the filter.
void setApCorrMap(std::shared_ptr< ApCorrMap const > apCorrMap)
Set the exposure's aperture correction map (null pointer if !hasApCorrMap())
bool hasWcs() const
Does this exposure have a Wcs?
Reports errors that are due to events beyond the control of the program.
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.