LSST Applications g063fba187b+cac8b7c890,g0f08755f38+6aee506743,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+b4475c5878,g1dcb35cd9c+8f9bc1652e,g20f6ffc8e0+6aee506743,g217e2c1bcf+73dee94bd0,g28da252d5a+1f19c529b9,g2bbee38e9b+3f2625acfc,g2bc492864f+3f2625acfc,g3156d2b45e+6e55a43351,g32e5bea42b+1bb94961c2,g347aa1857d+3f2625acfc,g35bb328faa+a8ce1bb630,g3a166c0a6a+3f2625acfc,g3e281a1b8c+c5dd892a6c,g3e8969e208+a8ce1bb630,g414038480c+5927e1bc1e,g41af890bb2+8a9e676b2a,g7af13505b9+809c143d88,g80478fca09+6ef8b1810f,g82479be7b0+f568feb641,g858d7b2824+6aee506743,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+2903d499ea,gb58c049af0+d64f4d3760,gc28159a63d+3f2625acfc,gcab2d0539d+b12535109e,gcf0d15dbbd+46a3f46ba9,gda6a2b7d83+46a3f46ba9,gdaeeff99f8+1711a396fd,ge79ae78c31+3f2625acfc,gef2f8181fd+0a71e47438,gf0baf85859+c1f95f4921,gfa517265be+6aee506743,gfa999e8aa5+17cd334064,w.2024.51
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT > Class Template Reference

A class to contain the data, WCS, and other information needed to describe an image of the sky. More...

#include <Exposure.h>

Public Types

using MaskedImageT = MaskedImage<ImageT, MaskT, VarianceT>
 

Public Member Functions

 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 may be default constructed)
 
 Exposure (lsst::geom::Extent2I const &dimensions=lsst::geom::Extent2I(), 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 may be default constructed)
 
 Exposure (lsst::geom::Box2I const &bbox, 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.
 
 Exposure (MaskedImageT &maskedImage, std::shared_ptr< geom::SkyWcs const > wcs=std::shared_ptr< geom::SkyWcs const >())
 Construct an Exposure from a MaskedImage and an optional SkyWcs.
 
 Exposure (MaskedImageT &maskedImage, std::shared_ptr< ExposureInfo > info)
 Construct an Exposure from a MaskedImage and an ExposureInfo.
 
 Exposure (std::string const &fileName, lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false, bool allowUnsafe=false)
 Construct an Exposure by reading a regular FITS file.
 
 Exposure (fits::MemFileManager &manager, lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false, bool allowUnsafe=false)
 Construct an Exposure by reading a FITS image in memory.
 
 Exposure (fits::Fits &fitsfile, lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false, bool allowUnsafe=false)
 Construct an Exposure from an already-open FITS object.
 
 Exposure (Exposure const &src, bool const deep=false)
 Copy an Exposure.
 
 Exposure (Exposure &&src)
 
 Exposure (Exposure const &src, lsst::geom::Box2I const &bbox, ImageOrigin const origin=PARENT, bool const deep=false)
 Construct a subExposure given an Exposure and a bounding box.
 
template<typename OtherPixelT >
 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)/2 conversions between N ImageBase types.
 
Exposureoperator= (Exposure const &)
 
Exposureoperator= (Exposure &&)
 
Exposure subset (lsst::geom::Box2I const &bbox, ImageOrigin origin=PARENT) const
 Return a subimage corresponding to the given box.
 
Exposure operator[] (lsst::geom::Box2I const &bbox) const
 Return a subimage corresponding to the given box (interpreted as PARENT coordinates).
 
 ~Exposure ()
 Destructor.
 
MaskedImageT getMaskedImage ()
 Return the MaskedImage.
 
MaskedImageT getMaskedImage () const
 Return the MaskedImage.
 
std::shared_ptr< geom::SkyWcs const > getWcs () const
 
std::shared_ptr< ApCorrMap const > getApCorrMap () const
 
std::shared_ptr< lsst::afw::cameraGeom::Detector const > getDetector () const
 Return the Exposure's Detector information.
 
std::shared_ptr< FilterLabel const > getFilter () const
 Return the Exposure's filter information.
 
std::shared_ptr< lsst::daf::base::PropertySetgetMetadata () const
 Return flexible metadata.
 
void setMetadata (std::shared_ptr< lsst::daf::base::PropertySet > metadata)
 
int getWidth () const
 Return the Exposure's width.
 
int getHeight () const
 Return the Exposure's height.
 
lsst::geom::Extent2I getDimensions () const
 Return the Exposure's size.
 
int getX0 () const
 Return the Exposure's column-origin.
 
int getY0 () const
 Return the Exposure's row-origin.
 
lsst::geom::Point2I getXY0 () const
 Return the Exposure's origin.
 
lsst::geom::Box2I getBBox (ImageOrigin const origin=PARENT) const
 
void setXY0 (lsst::geom::Point2I const &origin)
 Set the Exposure's origin (including correcting the Wcs)
 
void setMaskedImage (MaskedImageT &maskedImage)
 Set the MaskedImage of the Exposure.
 
void setWcs (std::shared_ptr< geom::SkyWcs > wcs)
 
void setDetector (std::shared_ptr< lsst::afw::cameraGeom::Detector const > detector)
 Set the Exposure's Detector information.
 
void setFilter (std::shared_ptr< FilterLabel const > filterLabel)
 Set the Exposure's filter information.
 
void setPhotoCalib (std::shared_ptr< PhotoCalib const > photoCalib)
 Set the Exposure's PhotoCalib object.
 
std::shared_ptr< PhotoCalib const > getPhotoCalib () const
 Return the Exposure's PhotoCalib object.
 
void setPsf (std::shared_ptr< lsst::afw::detection::Psf const > psf)
 Set the Exposure's Psf.
 
std::shared_ptr< lsst::afw::detection::Psf const > getPsf () const
 Return the Exposure's Psf object.
 
bool hasPsf () const
 Does this Exposure have a Psf?
 
bool hasWcs () const
 Does this Exposure have a Wcs?
 
void setApCorrMap (std::shared_ptr< ApCorrMap const > apCorrMap)
 Set the Exposure's aperture correction map.
 
std::shared_ptr< ExposureInfogetInfo ()
 Get the ExposureInfo that aggregates all the non-image components. Never null.
 
std::shared_ptr< ExposureInfo const > getInfo () const
 Get the ExposureInfo that aggregates all the non-image components. Never null.
 
void setInfo (std::shared_ptr< ExposureInfo > exposureInfo)
 Set the ExposureInfo that aggregates all the non-image components.
 
void writeFits (std::string const &fileName) const
 Write an Exposure to a regular multi-extension FITS file.
 
void writeFits (fits::MemFileManager &manager) const
 Write an Exposure to a multi-extension FITS file in memory.
 
void writeFits (fits::Fits &fitsfile) const
 Write an Exposure to an already-open FITS file object.
 
void writeFits (std::string const &fileName, fits::ImageWriteOptions const &imageOptions, fits::ImageWriteOptions const &maskOptions, fits::ImageWriteOptions const &varianceOptions) const
 Write an Exposure to a regular multi-extension FITS file.
 
void writeFits (fits::MemFileManager &manager, fits::ImageWriteOptions const &imageOptions, fits::ImageWriteOptions const &maskOptions, fits::ImageWriteOptions const &varianceOptions) const
 Write an Exposure to a regular multi-extension FITS file.
 
void writeFits (fits::Fits &fitsfile, fits::ImageWriteOptions const &imageOptions, fits::ImageWriteOptions const &maskOptions, fits::ImageWriteOptions const &varianceOptions) const
 Write an Exposure to a regular multi-extension FITS file.
 
Exposure getCutout (lsst::geom::SpherePoint const &center, lsst::geom::Extent2I const &size) const
 Return an Exposure that is a small cutout of the original.
 
Exposure getCutout (lsst::geom::Point2D const &center, lsst::geom::Extent2I const &size) const
 Return an Exposure that is a small cutout of the original.
 
Exposure getCutout (lsst::geom::Box2I const &box) const
 Return an Exposure that is a small cutout of the original.
 

Static Public Member Functions

static Exposure readFits (std::string const &filename)
 Read an Exposure from a regular FITS file.
 
static Exposure readFits (fits::MemFileManager &manager)
 Read an Exposure from a FITS RAM file.
 

Detailed Description

template<typename ImageT, typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
class lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >

A class to contain the data, WCS, and other information needed to describe an image of the sky.

Exposure Class Implementation for LSST: a templated framework class for creating an Exposure from a MaskedImage and a Wcs.

An Exposure is required to take one afwImage::MaskedImage or a region (col, row) defining the size of a MaskedImage (this can be of size 0,0). An Exposure can (but is not required to) contain an afwImage::SkyWcs.

The template types should optimally be a float, double, unsigned int 16 bit, or unsigned int 32 bit for the image (pixel) type and an unsigned int 32 bit for the mask type. These types have been explicitly instantiated for the Exposure class. All MaskedImage and Wcs constructors are 'const' to allow for views and copying.

An Exposure can get and return its MaskedImage, SkyWcs, and a subExposure. The getSubExposure member takes a BBox region defining the subRegion of the original Exposure to be returned. The member retrieves the MaskedImage corresponding to the subRegion. The MaskedImage class throws an exception for any subRegion extending beyond the original MaskedImage bounding box. This member is not yet fully implemented because it requires the SkyWcs class to return the SkyWcs metadata to the member so the CRPIX values of the SkyWcs can be adjusted to reflect the new subMaskedImage origin. The getSubExposure member will eventually return a subExposure consisting of the subMAskedImage and the SkyWcs object with its corresponding adjusted metadata.

The hasWcs member is used to determine if the Exposure has a SkyWcs. It is not required to have one.

Definition at line 72 of file Exposure.h.

Member Typedef Documentation

◆ MaskedImageT

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
using lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::MaskedImageT = MaskedImage<ImageT, MaskT, VarianceT>

Definition at line 74 of file Exposure.h.

Constructor & Destructor Documentation

◆ Exposure() [1/12]

template<typename ImageT , typename MaskT , typename VarianceT >
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::Exposure ( unsigned int width,
unsigned int height,
std::shared_ptr< geom::SkyWcs const > wcs = std::shared_ptr<geom::SkyWcs const>() )
explicit

Construct an Exposure with a blank MaskedImage of specified size (default 0x0) and a SkyWcs (which may be default constructed)

Parameters
widthnumber of columns
heightnumber of rows
wcsthe SkyWcs

Definition at line 46 of file Exposure.cc.

48 : _maskedImage(width, height), _info(new ExposureInfo(wcs)) {}

◆ Exposure() [2/12]

template<typename ImageT , typename MaskT , typename VarianceT >
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::Exposure ( lsst::geom::Extent2I const & dimensions = lsst::geom::Extent2I(),
std::shared_ptr< geom::SkyWcs const > wcs = std::shared_ptr<geom::SkyWcs const>() )
explicit

Construct an Exposure with a blank MaskedImage of specified size (default 0x0) and a SkyWcs (which may be default constructed)

Parameters
dimensionsdesired image width/height
wcsthe SkyWcs

Definition at line 51 of file Exposure.cc.

53 : _maskedImage(dimensions), _info(new ExposureInfo(wcs)) {}

◆ Exposure() [3/12]

template<typename ImageT , typename MaskT , typename VarianceT >
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::Exposure ( lsst::geom::Box2I const & bbox,
std::shared_ptr< geom::SkyWcs const > wcs = std::shared_ptr<geom::SkyWcs const>() )
explicit

Construct an Exposure with a blank MaskedImage of specified size (default 0x0) and a SkyWcs.

Parameters
bboxdesired image width/height, and origin
wcsthe SkyWcs

Definition at line 56 of file Exposure.cc.

58 : _maskedImage(bbox), _info(new ExposureInfo(wcs)) {}
AmpInfoBoxKey bbox
Definition Amplifier.cc:117

◆ Exposure() [4/12]

template<typename ImageT , typename MaskT , typename VarianceT >
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::Exposure ( MaskedImageT & maskedImage,
std::shared_ptr< geom::SkyWcs const > wcs = std::shared_ptr<geom::SkyWcs const>() )
explicit

Construct an Exposure from a MaskedImage and an optional SkyWcs.

Parameters
maskedImagethe MaskedImage
wcsthe SkyWcs

Definition at line 61 of file Exposure.cc.

63 : _maskedImage(maskedImage), _info(new ExposureInfo(wcs)) {}

◆ Exposure() [5/12]

template<typename ImageT , typename MaskT , typename VarianceT >
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::Exposure ( MaskedImageT & maskedImage,
std::shared_ptr< ExposureInfo > info )
explicit

Construct an Exposure from a MaskedImage and an ExposureInfo.

If the ExposureInfo is an empty pointer then a new empty ExposureInfo is used

Parameters
maskedImagethe MaskedImage
infothe ExposureInfo

Definition at line 66 of file Exposure.cc.

67 : _maskedImage(maskedImage), _info(info ? info : std::make_shared<ExposureInfo>()) {}
T make_shared(T... args)
STL namespace.

◆ Exposure() [6/12]

template<typename ImageT , typename MaskT , typename VarianceT >
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::Exposure ( std::string const & fileName,
lsst::geom::Box2I const & bbox = lsst::geom::Box2I(),
ImageOrigin origin = PARENT,
bool conformMasks = false,
bool allowUnsafe = false )
explicit

Construct an Exposure by reading a regular FITS file.

Parameters
[in]fileNameFile to read.
[in]bboxIf non-empty, read only the pixels within the bounding box.
[in]originCoordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image.
[in]conformMasksIf true, make Mask conform to the mask layout in the file.
[in]allowUnsafePermit reading into the requested pixel type even when on-disk values may overflow or truncate.

Definition at line 83 of file Exposure.cc.

85 : _maskedImage(), _info(new ExposureInfo()) {
86 ExposureFitsReader reader(fileName);
87 *this = reader.read<ImageT, MaskT, VarianceT>(bbox, origin, conformMasks, allowUnsafe);
88}

◆ Exposure() [7/12]

template<typename ImageT , typename MaskT , typename VarianceT >
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::Exposure ( fits::MemFileManager & manager,
lsst::geom::Box2I const & bbox = lsst::geom::Box2I(),
ImageOrigin origin = PARENT,
bool conformMasks = false,
bool allowUnsafe = false )
explicit

Construct an Exposure by reading a FITS image in memory.

Parameters
[in]managerAn object that manages the memory buffer to read.
[in]bboxIf non-empty, read only the pixels within the bounding box.
[in]originCoordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image.
[in]conformMasksIf true, make Mask conform to the mask layout in the file.
[in]allowUnsafePermit reading into the requested pixel type even when on-disk values may overflow or truncate.

Definition at line 91 of file Exposure.cc.

93 : _maskedImage(), _info(new ExposureInfo()) {
94 ExposureFitsReader reader(manager);
95 *this = reader.read<ImageT, MaskT, VarianceT>(bbox, origin, conformMasks, allowUnsafe);
96}

◆ Exposure() [8/12]

template<typename ImageT , typename MaskT , typename VarianceT >
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::Exposure ( fits::Fits & fitsfile,
lsst::geom::Box2I const & bbox = lsst::geom::Box2I(),
ImageOrigin origin = PARENT,
bool conformMasks = false,
bool allowUnsafe = false )
explicit

Construct an Exposure from an already-open FITS object.

Parameters
[in]fitsfileA FITS object to read from. Current HDU is ignored.
[in]bboxIf non-empty, read only the pixels within the bounding box.
[in]originCoordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image.
[in]conformMasksIf true, make Mask conform to the mask layout in the file.
[in]allowUnsafePermit reading into the requested pixel type even when on-disk values may overflow or truncate.

Definition at line 99 of file Exposure.cc.

100 {
101 ExposureFitsReader reader(&fitsFile);
102 *this = reader.read<ImageT, MaskT, VarianceT>(bbox, origin, conformMasks, allowUnsafe);
103}

◆ Exposure() [9/12]

template<typename ImageT , typename MaskT , typename VarianceT >
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::Exposure ( Exposure< ImageT, MaskT, VarianceT > const & src,
bool const deep = false )

Copy an Exposure.

Parameters
srcParent Exposure
deepShould we copy the pixels?

Definition at line 70 of file Exposure.cc.

71 : _maskedImage(src.getMaskedImage(), deep), _info(new ExposureInfo(*src.getInfo(), deep)) {}
std::shared_ptr< RecordT > src
Definition Match.cc:48

◆ Exposure() [10/12]

template<typename ImageT , typename MaskT , typename VarianceT >
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::Exposure ( Exposure< ImageT, MaskT, VarianceT > && src)

Definition at line 74 of file Exposure.cc.

74: Exposure(src) {}
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...
Definition Exposure.cc:46

◆ Exposure() [11/12]

template<typename ImageT , typename MaskT , typename VarianceT >
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::Exposure ( Exposure< ImageT, MaskT, VarianceT > const & src,
lsst::geom::Box2I const & bbox,
ImageOrigin const origin = PARENT,
bool const deep = false )

Construct a subExposure given an Exposure and a bounding box.

Parameters
srcParent Exposure
bboxDesired region in Exposure
originCoordinate system for bbox
deepShould we copy the pixels?
Exceptions
lsst::pex::exceptions::InvalidParameterErrorif the requested subRegion is not fully contained by the original MaskedImage BBox.

Definition at line 77 of file Exposure.cc.

79 : _maskedImage(src.getMaskedImage(), bbox, origin, deep),
80 _info(new ExposureInfo(*src.getInfo(), deep)) {}

◆ Exposure() [12/12]

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
template<typename OtherPixelT >
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::Exposure ( Exposure< OtherPixelT, MaskT, VarianceT > const & rhs,
const bool deep )
inline

generalised copy constructor; defined here in the header so that the compiler can instantiate N(N-1)/2 conversions between N ImageBase types.

We only support converting the Image part

Parameters
rhsInput Exposure
deepMust be true; needed to disambiguate

Definition at line 189 of file Exposure.h.

192 : _maskedImage(rhs.getMaskedImage(), deep), _info(new ExposureInfo(*rhs.getInfo(), deep)) {
193 if (not deep) {
195 "Exposure's converting copy constructor must make a deep copy");
196 }
197 }
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition Exception.h:48
Reports invalid arguments.
Definition Runtime.h:66

◆ ~Exposure()

template<typename ImageT , typename MaskT , typename VarianceT >
lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::~Exposure ( )
default

Destructor.

Member Function Documentation

◆ getApCorrMap()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
std::shared_ptr< ApCorrMap const > lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getApCorrMap ( ) const
inline

Definition at line 234 of file Exposure.h.

234{ return _info->getApCorrMap(); }

◆ getBBox()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
lsst::geom::Box2I lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getBBox ( ImageOrigin const origin = PARENT) const
inline

Definition at line 275 of file Exposure.h.

275 {
276 return _maskedImage.getBBox(origin);
277 }
lsst::geom::Box2I getBBox(ImageOrigin const origin=PARENT) const

◆ getCutout() [1/3]

template<typename ImageT , typename MaskT , typename VarianceT >
Exposure< ImageT, MaskT, VarianceT > lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getCutout ( lsst::geom::Box2I const & box) const

Return an Exposure that is a small cutout of the original.

This is distinguished from subset() by allowing the box to extend off the image, and padding with NaN and mask NO_DATA in that case.

Parameters
boxPixel box to cut from this exposure.
Returns
An Exposure of the requested box to within half a pixel in either dimension. Pixels past the edge of the original exposure will equal math::edgePixel, with their Mask set to NO_DATA.
Exceptions
lsst::pex::exceptions::InvalidParameterErrorThrown if the center of the box falls outside this Exposure.

Definition at line 242 of file Exposure.cc.

243 {
244 return getCutout(box.getCenter(), box.getDimensions());
245}
Exposure getCutout(lsst::geom::SpherePoint const &center, lsst::geom::Extent2I const &size) const
Return an Exposure that is a small cutout of the original.
Definition Exposure.cc:204

◆ getCutout() [2/3]

template<typename ImageT , typename MaskT , typename VarianceT >
Exposure< ImageT, MaskT, VarianceT > lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getCutout ( lsst::geom::Point2D const & center,
lsst::geom::Extent2I const & size ) const

Return an Exposure that is a small cutout of the original.

This is distinguished from subset() by allowing the cutout to extend off the image, and padding with NaN and mask NO_DATA in that case.

Parameters
centerDesired center of cutout in image pixels.
sizeWidth and height (in that order) of cutout in pixels.
Returns
An Exposure of the requested size centered on center to within half a pixel in either dimension. Pixels past the edge of the original exposure will equal math::edgePixel.
Exceptions
lsst::pex::exceptions::InvalidParameterErrorThrown if center falls outside this Exposure or if size is not a valid size.

Definition at line 215 of file Exposure.cc.

216 {
217 if (!lsst::geom::Box2D(getBBox()).contains(center)) {
218 std::stringstream buffer;
219 buffer << "Point " << center << " lies at pixel " << center << ", which lies outside Exposure "
220 << getBBox();
221 throw LSST_EXCEPT(pex::exceptions::InvalidParameterError, buffer.str());
222 }
223 if (size[0] <= 0 || size[1] <= 0) {
224 std::stringstream buffer;
225 buffer << "Cannot create bounding box with dimensions " << size;
226 throw LSST_EXCEPT(pex::exceptions::InvalidParameterError, buffer.str());
227 }
229
230 // cutout must have independent ExposureInfo
231 auto copyInfo = std::make_shared<ExposureInfo>(*getInfo());
232 MaskedImageT blank(bbox); // Can't initialize Exposure with a temporary
233 blank = math::edgePixel<MaskedImageT>(
235 Exposure cutout(blank, copyInfo);
236
237 _copyCommonPixels(cutout, *this);
238 return cutout;
239}
std::shared_ptr< ExposureInfo > getInfo()
Get the ExposureInfo that aggregates all the non-image components. Never null.
Definition Exposure.h:322
MaskedImage< ImageT, MaskT, VarianceT > MaskedImageT
Definition Exposure.h:74
lsst::geom::Box2I getBBox(ImageOrigin const origin=PARENT) const
Definition Exposure.h:275
A floating-point coordinate rectangle geometry.
Definition Box.h:413
An integer coordinate rectangle.
Definition Box.h:55
static Box2I makeCenteredBox(Point2D const &center, Extent const &size)
Create a box centered as closely as possible on a particular point.
Definition Box.cc:97
T str(T... args)
typename ImageT::image_category image_category
Definition ImageBase.h:67

◆ getCutout() [3/3]

template<typename ImageT , typename MaskT , typename VarianceT >
Exposure< ImageT, MaskT, VarianceT > lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getCutout ( lsst::geom::SpherePoint const & center,
lsst::geom::Extent2I const & size ) const

Return an Exposure that is a small cutout of the original.

Parameters
centerDesired center of cutout in RA and Dec.
sizeWidth and height (in that order) of cutout in pixels
Returns
An Exposure of the requested size centered on center to within half a pixel in either dimension. Pixels past the edge of the original exposure will equal math::edgePixel.
Exceptions
lsst::pex::exceptions::LogicErrorThrown if this Exposure does not have a WCS.
lsst::pex::exceptions::InvalidParameterErrorThrown if center falls outside this Exposure or if size is not a valid size.

Definition at line 204 of file Exposure.cc.

205 {
206 if (!hasWcs()) {
207 throw LSST_EXCEPT(pex::exceptions::LogicError, "Cannot look up source position without WCS.");
208 }
209 lsst::geom::Point2D pixelCenter = getWcs()->skyToPixel(center);
210
211 return getCutout(pixelCenter, size);
212}
bool hasWcs() const
Does this Exposure have a Wcs?
Definition Exposure.h:316
std::shared_ptr< geom::SkyWcs const > getWcs() const
Definition Exposure.h:232

◆ getDetector()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
std::shared_ptr< lsst::afw::cameraGeom::Detector const > lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getDetector ( ) const
inline

Return the Exposure's Detector information.

Definition at line 237 of file Exposure.h.

237 {
238 return _info->getDetector();
239 }

◆ getDimensions()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
lsst::geom::Extent2I lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getDimensions ( ) const
inline

Return the Exposure's size.

Definition at line 251 of file Exposure.h.

251{ return _maskedImage.getDimensions(); }
lsst::geom::Extent2I getDimensions() const

◆ getFilter()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
std::shared_ptr< FilterLabel const > lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getFilter ( ) const
inline

Return the Exposure's filter information.

Definition at line 241 of file Exposure.h.

241{ return _info->getFilter(); }

◆ getHeight()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
int lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getHeight ( ) const
inline

Return the Exposure's height.

Definition at line 249 of file Exposure.h.

249{ return _maskedImage.getHeight(); }
int getHeight() const
Return the number of rows in the image.

◆ getInfo() [1/2]

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
std::shared_ptr< ExposureInfo > lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getInfo ( )
inline

Get the ExposureInfo that aggregates all the non-image components. Never null.

Definition at line 322 of file Exposure.h.

322{ return _info; }

◆ getInfo() [2/2]

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
std::shared_ptr< ExposureInfo const > lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getInfo ( ) const
inline

Get the ExposureInfo that aggregates all the non-image components. Never null.

Definition at line 325 of file Exposure.h.

325{ return _info; }

◆ getMaskedImage() [1/2]

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
MaskedImageT lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getMaskedImage ( )
inline

Return the MaskedImage.

Definition at line 228 of file Exposure.h.

228{ return _maskedImage; }

◆ getMaskedImage() [2/2]

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
MaskedImageT lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getMaskedImage ( ) const
inline

Return the MaskedImage.

Definition at line 230 of file Exposure.h.

230{ return _maskedImage; }

◆ getMetadata()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
std::shared_ptr< lsst::daf::base::PropertySet > lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getMetadata ( ) const
inline

Return flexible metadata.

Definition at line 243 of file Exposure.h.

243{ return _info->getMetadata(); }

◆ getPhotoCalib()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
std::shared_ptr< PhotoCalib const > lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getPhotoCalib ( ) const
inline

Return the Exposure's PhotoCalib object.

Definition at line 304 of file Exposure.h.

304{ return _info->getPhotoCalib(); }

◆ getPsf()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
std::shared_ptr< lsst::afw::detection::Psf const > lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getPsf ( ) const
inline

Return the Exposure's Psf object.

Definition at line 310 of file Exposure.h.

310{ return _info->getPsf(); }

◆ getWcs()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
std::shared_ptr< geom::SkyWcs const > lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getWcs ( ) const
inline

Definition at line 232 of file Exposure.h.

232{ return _info->getWcs(); }

◆ getWidth()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
int lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getWidth ( ) const
inline

Return the Exposure's width.

Definition at line 247 of file Exposure.h.

247{ return _maskedImage.getWidth(); }
int getWidth() const
Return the number of columns in the image.

◆ getX0()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
int lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getX0 ( ) const
inline

Return the Exposure's column-origin.

See also
getXY0()

Definition at line 258 of file Exposure.h.

258{ return _maskedImage.getX0(); }
int getX0() const
Return the image's column-origin.

◆ getXY0()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
lsst::geom::Point2I lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getXY0 ( ) const
inline

Return the Exposure's origin.

This will usually be (0, 0) except for images created using the Exposure(fileName, hdu, BBox, mode) ctor or Exposure(Exposure, BBox) cctor The origin can be reset with setXY0

Definition at line 273 of file Exposure.h.

273{ return _maskedImage.getXY0(); }
lsst::geom::Point2I getXY0() const
Return the image's origin.

◆ getY0()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
int lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::getY0 ( ) const
inline

Return the Exposure's row-origin.

See also
getXY0()

Definition at line 264 of file Exposure.h.

264{ return _maskedImage.getY0(); }
int getY0() const
Return the image's row-origin.

◆ hasPsf()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
bool lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::hasPsf ( ) const
inline

Does this Exposure have a Psf?

Definition at line 313 of file Exposure.h.

313{ return _info->hasPsf(); }

◆ hasWcs()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
bool lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::hasWcs ( ) const
inline

Does this Exposure have a Wcs?

Definition at line 316 of file Exposure.h.

316{ return _info->hasWcs(); }

◆ operator=() [1/2]

template<typename ImageT , typename MaskT , typename VarianceT >
Exposure< ImageT, MaskT, VarianceT > & lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::operator= ( Exposure< ImageT, MaskT, VarianceT > && )
default

◆ operator=() [2/2]

template<typename ImageT , typename MaskT , typename VarianceT >
Exposure< ImageT, MaskT, VarianceT > & lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::operator= ( Exposure< ImageT, MaskT, VarianceT > const & )
default

◆ operator[]()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
Exposure lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::operator[] ( lsst::geom::Box2I const & bbox) const
inline

Return a subimage corresponding to the given box (interpreted as PARENT coordinates).

Definition at line 220 of file Exposure.h.

220{ return subset(bbox); }
Exposure subset(lsst::geom::Box2I const &bbox, ImageOrigin origin=PARENT) const
Return a subimage corresponding to the given box.
Definition Exposure.h:215

◆ readFits() [1/2]

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
static Exposure lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::readFits ( fits::MemFileManager & manager)
inlinestatic

Read an Exposure from a FITS RAM file.

Parameters
[in]managerObject that manages the memory to be read.

Definition at line 414 of file Exposure.h.

414 {
415 return Exposure<ImageT, MaskT, VarianceT>(manager);
416 }

◆ readFits() [2/2]

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
static Exposure lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::readFits ( std::string const & filename)
inlinestatic

Read an Exposure from a regular FITS file.

Parameters
[in]filenameName of the file to read.

Definition at line 405 of file Exposure.h.

405 {
406 return Exposure<ImageT, MaskT, VarianceT>(filename);
407 }

◆ setApCorrMap()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::setApCorrMap ( std::shared_ptr< ApCorrMap const > apCorrMap)
inline

Set the Exposure's aperture correction map.

Definition at line 319 of file Exposure.h.

319{ _info->setApCorrMap(apCorrMap); }
Key< int > apCorrMap
Definition Exposure.cc:68

◆ setDetector()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::setDetector ( std::shared_ptr< lsst::afw::cameraGeom::Detector const > detector)
inline

Set the Exposure's Detector information.

Definition at line 294 of file Exposure.h.

294 {
295 _info->setDetector(detector);
296 }

◆ setFilter()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::setFilter ( std::shared_ptr< FilterLabel const > filterLabel)
inline

Set the Exposure's filter information.

Definition at line 299 of file Exposure.h.

299{ _info->setFilter(filterLabel); }

◆ setInfo()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::setInfo ( std::shared_ptr< ExposureInfo > exposureInfo)
inline

Set the ExposureInfo that aggregates all the non-image components.

Definition at line 328 of file Exposure.h.

328{ _info = exposureInfo; }

◆ setMaskedImage()

template<typename ImageT , typename MaskT , typename VarianceT >
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::setMaskedImage ( MaskedImageT & maskedImage)

Set the MaskedImage of the Exposure.

Definition at line 111 of file Exposure.cc.

111 {
112 _maskedImage = maskedImage;
113}

◆ setMetadata()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::setMetadata ( std::shared_ptr< lsst::daf::base::PropertySet > metadata)
inline

Definition at line 244 of file Exposure.h.

244{ _info->setMetadata(metadata); }

◆ setPhotoCalib()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::setPhotoCalib ( std::shared_ptr< PhotoCalib const > photoCalib)
inline

Set the Exposure's PhotoCalib object.

Definition at line 302 of file Exposure.h.

302{ _info->setPhotoCalib(photoCalib); }

◆ setPsf()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::setPsf ( std::shared_ptr< lsst::afw::detection::Psf const > psf)
inline

Set the Exposure's Psf.

Definition at line 307 of file Exposure.h.

307{ _info->setPsf(psf); }
Key< int > psf
Definition Exposure.cc:65

◆ setWcs()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::setWcs ( std::shared_ptr< geom::SkyWcs > wcs)
inline

Definition at line 292 of file Exposure.h.

292{ _info->setWcs(wcs); }

◆ setXY0()

template<typename ImageT , typename MaskT , typename VarianceT >
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::setXY0 ( lsst::geom::Point2I const & origin)

Set the Exposure's origin (including correcting the Wcs)

The origin is usually set by the constructor, so you shouldn't need this function

Note
There are use cases (e.g. memory overlays) that may want to set these values, but don't do so unless you are an Expert.

Definition at line 116 of file Exposure.cc.

116 {
117 lsst::geom::Point2I old(_maskedImage.getXY0());
118 if (_info->hasWcs()) {
119 auto shift = lsst::geom::Extent2D(origin - old);
120 auto newWcs = _info->getWcs()->copyAtShiftedPixelOrigin(shift);
121 _info->setWcs(newWcs);
122 }
123 _maskedImage.setXY0(origin);
124}
void setXY0(int const x0, int const y0)
Set the MaskedImage's origin.
Extent< double, 2 > Extent2D
Definition Extent.h:400

◆ subset()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel, typename VarianceT = lsst::afw::image::VariancePixel>
Exposure lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::subset ( lsst::geom::Box2I const & bbox,
ImageOrigin origin = PARENT ) const
inline

Return a subimage corresponding to the given box.

Parameters
bboxBounding box of the subimage returned.
originOrigin bbox is relative to; PARENT accounts for xy0, LOCAL does not.
Returns
A subimage view into this.

This method is wrapped as getitem in Python.

Note
This method permits mutable views to be obtained from const references to images (just as the copy constructor does). This is an intrinsic flaw in Image's design.

Definition at line 215 of file Exposure.h.

215 {
216 return Exposure(*this, bbox, origin, false);
217 }

◆ writeFits() [1/6]

template<typename ImageT , typename MaskT , typename VarianceT >
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::writeFits ( fits::Fits & fitsfile) const

Write an Exposure to an already-open FITS file object.

Parameters
[in]fitsfileFITS object to write.
See also
writeFits

Definition at line 146 of file Exposure.cc.

146 {
147 writeFits(fitsfile, fits::ImageWriteOptions(*_maskedImage.getImage()),
148 fits::ImageWriteOptions(*_maskedImage.getMask()),
149 fits::ImageWriteOptions(*_maskedImage.getVariance()));
150}
void writeFits(std::string const &fileName) const
Write an Exposure to a regular multi-extension FITS file.
Definition Exposure.cc:134
VariancePtr getVariance() const
Return a (shared_ptr to) the MaskedImage's variance.
MaskPtr getMask() const
Return a (shared_ptr to) the MaskedImage's mask.
ImagePtr getImage() const
Return a (shared_ptr to) the MaskedImage's image.

◆ writeFits() [2/6]

template<typename ImageT , typename MaskT , typename VarianceT >
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::writeFits ( fits::Fits & fitsfile,
fits::ImageWriteOptions const & imageOptions,
fits::ImageWriteOptions const & maskOptions,
fits::ImageWriteOptions const & varianceOptions ) const

Write an Exposure to a regular multi-extension FITS file.

Parameters
[in]fitsfileFITS object to which to write.
[in]imageOptionsOptions controlling writing of image as FITS.
[in]maskOptionsOptions controlling writing of mask as FITS.
[in]varianceOptionsOptions controlling writing of variance as FITS.

Definition at line 171 of file Exposure.cc.

174 {
175 ExposureInfo::FitsWriteData data = _info->_startWriteFits(getXY0());
176 _maskedImage.writeFits(fitsfile, imageOptions, maskOptions, varianceOptions, data.metadata,
177 data.imageMetadata, data.maskMetadata, data.varianceMetadata);
178 _info->_finishWriteFits(fitsfile, data);
179}
char * data
Definition BaseRecord.cc:61
lsst::geom::Point2I getXY0() const
Return the Exposure's origin.
Definition Exposure.h:273
void writeFits(std::string const &fileName, std::shared_ptr< daf::base::PropertySet const > metadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > imageMetadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > maskMetadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > varianceMetadata=std::shared_ptr< daf::base::PropertySet const >()) const
Write a MaskedImage to a regular FITS file.

◆ writeFits() [3/6]

template<typename ImageT , typename MaskT , typename VarianceT >
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::writeFits ( fits::MemFileManager & manager) const

Write an Exposure to a multi-extension FITS file in memory.

Parameters
[in]managerManager for the memory to write to.
See also
writeFits

Definition at line 140 of file Exposure.cc.

140 {
141 fits::Fits fitsfile(manager, "w", fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK);
142 writeFits(fitsfile);
143}

◆ writeFits() [4/6]

template<typename ImageT , typename MaskT , typename VarianceT >
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::writeFits ( fits::MemFileManager & manager,
fits::ImageWriteOptions const & imageOptions,
fits::ImageWriteOptions const & maskOptions,
fits::ImageWriteOptions const & varianceOptions ) const

Write an Exposure to a regular multi-extension FITS file.

Parameters
[in]managerManager for the memory to write to.
[in]imageOptionsOptions controlling writing of image as FITS.
[in]maskOptionsOptions controlling writing of mask as FITS.
[in]varianceOptionsOptions controlling writing of variance as FITS.

Definition at line 162 of file Exposure.cc.

165 {
166 fits::Fits fitsfile(manager, "w", fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK);
167 writeFits(fitsfile, imageOptions, maskOptions, varianceOptions);
168}

◆ writeFits() [5/6]

template<typename ImageT , typename MaskT , typename VarianceT >
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::writeFits ( std::string const & fileName) const

Write an Exposure to a regular multi-extension FITS file.

Parameters
[in]fileNameName of the file to write.

As with MaskedImage persistence, an empty primary HDU will be created and all images planes will be saved to extension HDUs. Most metadata will be saved only to the header of the main image HDU, but the WCS will be saved to the header of the mask and variance as well. If present, the Psf will be written to one or more additional HDUs.

Note that the LSST pixel origin differs from the FITS convention by one, so the values of CRPIX and LTV saved in the file are not the same as those in the C++ objects in memory, but are rather modified so they are interpreted by external tools (like ds9).

Definition at line 134 of file Exposure.cc.

134 {
135 fits::Fits fitsfile(fileName, "w", fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK);
136 writeFits(fitsfile);
137}

◆ writeFits() [6/6]

template<typename ImageT , typename MaskT , typename VarianceT >
void lsst::afw::image::Exposure< ImageT, MaskT, VarianceT >::writeFits ( std::string const & fileName,
fits::ImageWriteOptions const & imageOptions,
fits::ImageWriteOptions const & maskOptions,
fits::ImageWriteOptions const & varianceOptions ) const

Write an Exposure to a regular multi-extension FITS file.

Parameters
[in]fileNameName of the file to write.
[in]imageOptionsOptions controlling writing of image as FITS.
[in]maskOptionsOptions controlling writing of mask as FITS.
[in]varianceOptionsOptions controlling writing of variance as FITS.

Definition at line 153 of file Exposure.cc.

156 {
157 fits::Fits fitsfile(fileName, "w", fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK);
158 writeFits(fitsfile, imageOptions, maskOptions, varianceOptions);
159}

The documentation for this class was generated from the following files: