27 #include "boost/format.hpp"
30 #include "boost/algorithm/string/trim.hpp"
43 namespace afwGeom = lsst::afw::geom;
45 namespace afwDetection = lsst::afw::detection;
46 namespace cameraGeom = lsst::afw::cameraGeom;
83 template<
typename ImageT,
typename MaskT,
typename VarianceT>
89 lsst::daf::base::Citizen(typeid(this)),
90 _maskedImage(width, height),
97 template<
typename ImageT,
typename MaskT,
typename VarianceT>
102 lsst::daf::base::Citizen(typeid(this)),
103 _maskedImage(dimensions),
110 template<
typename ImageT,
typename MaskT,
typename VarianceT>
115 lsst::daf::base::Citizen(typeid(this)),
122 template<
typename ImageT,
typename MaskT,
typename VarianceT>
127 lsst::daf::base::Citizen(typeid(this)),
128 _maskedImage(maskedImage),
136 template<
typename ImageT,
typename MaskT,
typename VarianceT>
141 lsst::daf::base::Citizen(typeid(this)),
142 _maskedImage(maskedImage),
148 template<
typename ImageT,
typename MaskT,
typename VarianceT>
153 lsst::daf::base::Citizen(typeid(this)),
154 _maskedImage(src.getMaskedImage(), deep),
163 template<
typename ImageT,
typename MaskT,
typename VarianceT>
170 lsst::daf::base::Citizen(typeid(this)),
171 _maskedImage(src.getMaskedImage(), bbox, origin, deep),
175 template<
typename ImageT,
typename MaskT,
typename VarianceT>
180 lsst::daf::base::Citizen(typeid(this)),
185 _readFits(fitsfile, bbox, origin, conformMasks);
188 template<
typename ImageT,
typename MaskT,
typename VarianceT>
193 lsst::daf::base::Citizen(typeid(this)),
198 _readFits(fitsfile, bbox, origin, conformMasks);
201 template<
typename ImageT,
typename MaskT,
typename VarianceT>
206 lsst::daf::base::Citizen(typeid(this))
208 _readFits(fitsfile, bbox, origin, conformMasks);
211 template<
typename ImageT,
typename MaskT,
typename VarianceT>
218 _maskedImage =
MaskedImageT(fitsfile, metadata, bbox, origin, conformMasks,
false, imageMetadata);
219 _info->_readFits(fitsfile, metadata, imageMetadata);
225 template<
typename ImageT,
typename MaskT,
typename VarianceT>
232 template<
typename ImageT,
typename MaskT,
typename VarianceT>
234 _maskedImage = maskedImage;
237 template<
typename ImageT,
typename MaskT,
typename VarianceT>
241 _info->getWcs()->shiftReferencePixel(origin.getX() - old.getX(), origin.getY() - old.getY());
242 _maskedImage.setXY0(origin);
248 template<
typename ImageT,
typename MaskT,
typename VarianceT>
254 template<
typename ImageT,
typename MaskT,
typename VarianceT>
260 template<
typename ImageT,
typename MaskT,
typename VarianceT>
263 _maskedImage.writeFits(
267 _info->_finishWriteFits(fitsfile, data);
virtual ~Exposure()
Destructor.
boost::shared_ptr< daf::base::PropertyList > imageMetadata
Class for storing ordered metadata with comments.
Include files required for standard LSST Exception handling.
A class to contain the data, WCS, and other information needed to describe an image of the sky...
Interface for PropertyList class.
void setXY0(geom::Point2I const &origin)
Set the Exposure's origin (including correcting the Wcs)
void writeFits(std::string const &fileName) const
Write an Exposure to a regular multi-extension FITS file.
Implementation of the WCS standard for a any projection.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
void _readFits(fits::Fits &fitsfile, geom::Box2I const &bbox, ImageOrigin origin, bool conformMasks)
An integer coordinate rectangle.
table::Key< table::Array< Kernel::Pixel > > image
afw::table::PointKey< int > dimensions
A struct passed back and forth between Exposure and ExposureInfo when writing FITS files...
void ImageT ImageT int float saturatedPixelValue int const width
Lifetime-management for memory that goes into FITS memory files.
void setMaskedImage(MaskedImageT &maskedImage)
Set the MaskedImage of the Exposure.
boost::shared_ptr< daf::base::PropertyList > maskMetadata
Exposure(unsigned int width, unsigned int height, boost::shared_ptr< Wcs const > wcs=boost::shared_ptr< Wcs const >())
Exposure Class Implementation for LSST: a templated framework class for creating an Exposure from a M...
Classes to support calibration (e.g.
void ImageT ImageT int float saturatedPixelValue int const height
Utilities for working with FITS files.
Class for storing generic metadata.
Interface for PropertySet class.
#define CONST_PTR(...)
A shared pointer to a const object.
boost::shared_ptr< daf::base::PropertyList > metadata
A collection of all the things that make an Exposure different from a MaskedImage.
boost::shared_ptr< daf::base::PropertyList > varianceMetadata