25 #ifndef LSST_AFW_IMAGE_EXPOSURE_H
26 #define LSST_AFW_IMAGE_EXPOSURE_H
84 explicit Exposure(
unsigned int width,
unsigned int height,
133 ImageOrigin origin =
PARENT,
bool conformMasks =
false,
bool allowUnsafe =
false);
147 ImageOrigin origin =
PARENT,
bool conformMasks =
false,
bool allowUnsafe =
false);
161 ImageOrigin origin =
PARENT,
bool conformMasks =
false,
bool allowUnsafe =
false);
182 bool const deep =
false);
188 template <
typename OtherPixelT>
195 "Exposure's converting copy constructor must make a deep copy");
236 return _info->getDetector();
240 [[deprecated(
"Replaced with getFilterLabel. Will be removed after v22.")]]
Filter getFilter()
const {
241 return _info->getFilter();
280 return _maskedImage.
getBBox(origin);
308 [[deprecated(
"Replaced with setFilterLabel. Will be removed after v22.")]]
void setFilter(
315 _info->setFilterLabel(filterLabel);
330 bool hasPsf()
const {
return _info->hasPsf(); }
333 bool hasWcs()
const {
return _info->hasWcs(); }
461 template <
typename ImagePixelT,
typename MaskPixelT,
typename VariancePixelT>
table::Key< int > detector
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
afw::table::PointKey< int > dimensions
std::shared_ptr< RecordT > src
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...
Lifetime-management for memory that goes into FITS memory files.
A class to contain the data, WCS, and other information needed to describe an image of the sky.
MaskedImageT getMaskedImage()
Return the MaskedImage.
void setFilterLabel(std::shared_ptr< FilterLabel const > filterLabel)
Set the Exposure's filter information.
Filter getFilter() const
Return the Exposure's filter.
void setPsf(std::shared_ptr< lsst::afw::detection::Psf const > psf)
Set the Exposure's Psf.
bool hasWcs() const
Does this Exposure have a Wcs?
Exposure getCutout(lsst::geom::SpherePoint const ¢er, lsst::geom::Extent2I const &size) const
Return an Exposure that is a small cutout of the original.
int getHeight() const
Return the Exposure's height.
Exposure(Exposure< OtherPixelT, MaskT, VarianceT > const &rhs, const bool deep)
generalised copy constructor; defined here in the header so that the compiler can instantiate N(N-1)/...
void setDetector(std::shared_ptr< lsst::afw::cameraGeom::Detector const > detector)
Set the Exposure's Detector information.
void writeFits(std::string const &fileName) const
Write an Exposure to a regular multi-extension FITS file.
void setFilter(Filter const &filter)
Set the Exposure's filter.
virtual ~Exposure()
Destructor.
MaskedImageT getMaskedImage() const
Return the MaskedImage.
void setPhotoCalib(std::shared_ptr< PhotoCalib const > photoCalib)
Set the Exposure's PhotoCalib object.
int getWidth() const
Return the Exposure's width.
int getY0() const
Return the Exposure's row-origin.
Exposure subset(lsst::geom::Box2I const &bbox, ImageOrigin origin=PARENT) const
Return a subimage corresponding to the given box.
void setInfo(std::shared_ptr< ExposureInfo > exposureInfo)
Set the ExposureInfo that aggregates all the non-image components.
std::shared_ptr< geom::SkyWcs const > getWcs() const
Exposure(unsigned int width, unsigned int height, std::shared_ptr< geom::SkyWcs const > wcs=std::shared_ptr< geom::SkyWcs const >())
Construct an Exposure with a blank MaskedImage of specified size (default 0x0) and a SkyWcs (which ma...
void setMetadata(std::shared_ptr< lsst::daf::base::PropertySet > metadata)
int getX0() const
Return the Exposure's column-origin.
Exposure operator[](lsst::geom::Box2I const &bbox) const
Return a subimage corresponding to the given box (interpreted as PARENT coordinates).
lsst::geom::Extent2I getDimensions() const
Return the Exposure's size.
bool hasPsf() const
Does this Exposure have a Psf?
static Exposure readFits(fits::MemFileManager &manager)
Read an Exposure from a FITS RAM file.
void setWcs(std::shared_ptr< geom::SkyWcs > wcs)
std::shared_ptr< FilterLabel const > getFilterLabel() const
Return the Exposure's filter information.
Exposure & operator=(Exposure &&)
Exposure & operator=(Exposure const &)
std::shared_ptr< ExposureInfo > getInfo()
Get the ExposureInfo that aggregates all the non-image components. Never null.
std::shared_ptr< PhotoCalib const > getPhotoCalib() const
Return the Exposure's PhotoCalib object.
lsst::geom::Point2I getXY0() const
Return the Exposure's origin.
void setXY0(lsst::geom::Point2I const &origin)
Set the Exposure's origin (including correcting the Wcs)
std::shared_ptr< lsst::afw::cameraGeom::Detector const > getDetector() const
Return the Exposure's Detector information.
static Exposure readFits(std::string const &filename)
Read an Exposure from a regular FITS file.
void setMaskedImage(MaskedImageT &maskedImage)
Set the MaskedImage of the Exposure.
MaskedImage< ImageT, MaskT, VarianceT > MaskedImageT
std::shared_ptr< ExposureInfo const > getInfo() const
Get the ExposureInfo that aggregates all the non-image components. Never null.
std::shared_ptr< lsst::afw::detection::Psf const > getPsf() const
Return the Exposure's Psf object.
std::shared_ptr< lsst::daf::base::PropertySet > getMetadata() const
Return flexible metadata.
lsst::geom::Box2I getBBox(ImageOrigin const origin=PARENT) const
A collection of all the things that make an Exposure different from a MaskedImage.
A class to manipulate images, masks, and variance as a single object.
int getX0() const
Return the image's column-origin.
lsst::geom::Box2I getBBox(ImageOrigin const origin=PARENT) const
int getHeight() const
Return the number of rows in the image.
int getY0() const
Return the image's row-origin.
lsst::geom::Extent2I getDimensions() const
lsst::geom::Point2I getXY0() const
Return the image's origin.
int getWidth() const
Return the number of columns in the image.
An integer coordinate rectangle.
Point in an unspecified spherical coordinate system.
Reports invalid arguments.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
float VariancePixel
default type for MaskedImage variance images
std::int32_t MaskPixel
default type for Masks and MaskedImage Masks
std::shared_ptr< Exposure< ImagePixelT, MaskPixelT, VariancePixelT > > makeExposure(MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > &mimage, std::shared_ptr< geom::SkyWcs const > wcs=std::shared_ptr< geom::SkyWcs const >())
A function to return an Exposure of the correct type (cf.
A base class for image defects.
Options for writing an image to FITS.