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