25 #ifndef LSST_AFW_IMAGE_EXPOSURE_H 26 #define LSST_AFW_IMAGE_EXPOSURE_H 84 explicit Exposure(
unsigned int width,
unsigned int height,
109 explicit Exposure(MaskedImageT& maskedImage,
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");
216 return Exposure(*
this, bbox, origin,
false);
236 return _info->getDetector();
274 return _maskedImage.
getBBox(origin);
293 _info->setDetector(detector);
310 bool hasPsf()
const {
return _info->hasPsf(); }
313 bool hasWcs()
const {
return _info->hasWcs(); }
434 MaskedImageT _maskedImage;
441 template <
typename ImagePixelT,
typename MaskPixelT,
typename VariancePixelT>
454 #endif // LSST_AFW_IMAGE_EXPOSURE_H int getWidth() const
Return the Exposure's width.
void setFilter(Filter const &filter)
Set the Exposure's filter.
virtual ~Exposure()
Destructor.
std::shared_ptr< PhotoCalib const > getPhotoCalib() const
Return the Exposure's PhotoCalib object.
void setInfo(std::shared_ptr< ExposureInfo > exposureInfo)
Set the ExposureInfo that aggregates all the non-image components.
int getHeight() const
Return the Exposure's height.
int getY0() const
Return the Exposure's row-origin.
void setXY0(lsst::geom::Point2I const &origin)
Set the Exposure's origin (including correcting the Wcs)
A class to contain the data, WCS, and other information needed to describe an image of the sky...
Options for writing an image to FITS.
Exposure operator[](lsst::geom::Box2I const &bbox) const
Return a subimage corresponding to the given box (interpreted as PARENT coordinates).
void setWcs(std::shared_ptr< geom::SkyWcs > wcs)
std::shared_ptr< ExposureInfo > getInfo()
Get the ExposureInfo that aggregates all the non-image components. Never null.
void setMetadata(std::shared_ptr< lsst::daf::base::PropertySet > metadata)
lsst::geom::Point2I getXY0() const
Return the Exposure's origin.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
MaskedImage< ImageT, MaskT, VarianceT > MaskedImageT
lsst::geom::Point2I getXY0() const
Return the image's origin.
lsst::geom::Box2I getBBox(ImageOrigin const origin=PARENT) const
bool hasWcs() const
Does this Exposure have a Wcs?
Exposure subset(lsst::geom::Box2I const &bbox, ImageOrigin origin=PARENT) const
Return a subimage corresponding to the given box.
std::shared_ptr< ExposureInfo const > getInfo() const
Get the ExposureInfo that aggregates all the non-image components. Never null.
static Exposure readFits(fits::MemFileManager &manager)
Read an Exposure from a FITS RAM file.
table::Key< table::Array< std::uint8_t > > wcs
lsst::geom::Extent2I getDimensions() const
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.
afw::table::PointKey< int > dimensions
int getHeight() const
Return the number of rows in the image.
MaskedImageT getMaskedImage() const
Return the MaskedImage.
A base class for image defects.
MaskedImageT getMaskedImage()
Return the MaskedImage.
int getX0() const
Return the Exposure's column-origin.
int getX0() const
Return the image's column-origin.
std::shared_ptr< RecordT > src
Lifetime-management for memory that goes into FITS memory files.
std::shared_ptr< lsst::daf::base::PropertySet > getMetadata() const
Return flexible metadata.
Exposure getCutout(lsst::geom::SpherePoint const ¢er, lsst::geom::Extent2I const &size) const
Return an Exposure that is a small cutout of the original.
void setMaskedImage(MaskedImageT &maskedImage)
Set the MaskedImage of the Exposure.
bool hasPsf() const
Does this Exposure have a Psf?
void setPhotoCalib(std::shared_ptr< PhotoCalib const > photoCalib)
Set the Exposure's PhotoCalib object.
table::Key< int > detector
std::int32_t MaskPixel
default type for Masks and MaskedImage Masks
Holds an integer identifier for an LSST filter.
int getY0() const
Return the image's row-origin.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
static Exposure readFits(std::string const &filename)
Read an Exposure from a regular FITS file.
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)/...
Filter getFilter() const
Return the Exposure's filter.
Point in an unspecified spherical coordinate system.
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 setDetector(std::shared_ptr< lsst::afw::cameraGeom::Detector const > detector)
Set the Exposure's Detector information.
Reports invalid arguments.
std::shared_ptr< geom::SkyWcs const > getWcs() const
int getWidth() const
Return the number of columns in the image.
lsst::geom::Extent2I getDimensions() const
Return the Exposure's size.
std::shared_ptr< lsst::afw::detection::Psf const > getPsf() const
Return the Exposure's Psf object.
void writeFits(std::string const &fileName) const
Write an Exposure to a regular multi-extension FITS file.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
void setPsf(std::shared_ptr< lsst::afw::detection::Psf const > psf)
Set the Exposure's Psf.
A collection of all the things that make an Exposure different from a MaskedImage.
float VariancePixel
default type for MaskedImage variance images
lsst::geom::Box2I getBBox(ImageOrigin const origin=PARENT) const
An integer coordinate rectangle.
std::shared_ptr< lsst::afw::cameraGeom::Detector const > getDetector() const
Return the Exposure's Detector information.
Exposure & operator=(Exposure const &)