LSST Applications g0265f82a02+0e5473021a,g02d81e74bb+0dd8ce4237,g1470d8bcf6+3ea6592b6f,g2079a07aa2+86d27d4dc4,g2305ad1205+5ca4c0b359,g295015adf3+d10818ec9d,g2a9a014e59+6f9be1b9cd,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g3ddfee87b4+703ba97ebf,g487adcacf7+4fa16da234,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+ffa42b374e,g5a732f18d5+53520f316c,g64a986408d+0dd8ce4237,g858d7b2824+0dd8ce4237,g8a8a8dda67+585e252eca,g99cad8db69+d39438377f,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+f1d96605c8,gb0e22166c9+60f28cb32d,gb6a65358fc+0e5473021a,gba4ed39666+c2a2e4ac27,gbb8dafda3b+e5339d463f,gc120e1dc64+da31e9920e,gc28159a63d+0e5473021a,gcf0d15dbbd+703ba97ebf,gdaeeff99f8+f9a426f77a,ge6526c86ff+889fc9d533,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gf18bd8381d+7268b93478,gff1a9f87cc+0dd8ce4237,w.2024.16
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Private Member Functions | List of all members
lsst::afw::math::PixelAreaBoundedField Class Reference

A BoundedField that evaluate the pixel area of a SkyWcs in angular units. More...

#include <PixelAreaBoundedField.h>

Inheritance diagram for lsst::afw::math::PixelAreaBoundedField:
lsst::afw::math::BoundedField lsst::afw::table::io::PersistableFacade< BoundedField > lsst::afw::table::io::Persistable

Public Member Functions

 PixelAreaBoundedField (lsst::geom::Box2I const &bbox, std::shared_ptr< geom::SkyWcs const > skyWcs, lsst::geom::AngleUnit const &unit=lsst::geom::radians, double scaling=1.0)
 Create a PixelAreaBoundedField from a SkyWcs.
 
 ~PixelAreaBoundedField () override=default
 
 PixelAreaBoundedField (PixelAreaBoundedField const &)=default
 
 PixelAreaBoundedField (PixelAreaBoundedField &&)=default
 
PixelAreaBoundedFieldoperator= (PixelAreaBoundedField const &)=delete
 
PixelAreaBoundedFieldoperator= (PixelAreaBoundedField &&)=delete
 
double evaluate (lsst::geom::Point2D const &position) const override
 Evaluate the field at the given point.
 
ndarray::Array< double, 1, 1 > evaluate (ndarray::Array< double const, 1 > const &x, ndarray::Array< double const, 1 > const &y) const override
 Evaluate the field at multiple arbitrary points.
 
bool isPersistable () const noexcept override
 PixelAreaBoundedField is persistable if and only if the nested SkyWcs is.
 
std::shared_ptr< BoundedFieldoperator* (double const scale) const override
 Return a scaled BoundedField.
 
bool operator== (BoundedField const &rhs) const override
 BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal.
 
double evaluate (double x, double y) const
 Evaluate the field at the given point.
 
virtual double integrate () const
 Compute the integral of this function over its bounding-box.
 
virtual double mean () const
 Compute the mean of this function over its bounding-box.
 
lsst::geom::Box2I getBBox () const
 Return the bounding box that defines the region where the field is valid.
 
template<typename T >
void fillImage (image::Image< T > &image, bool overlapOnly=false, int xStep=1, int yStep=1) const
 Assign the field to an image, overwriting values already present.
 
template<typename T >
void addToImage (image::Image< T > &image, double scaleBy=1.0, bool overlapOnly=false, int xStep=1, int yStep=1) const
 Add the field or a constant multiple of it to an image in-place.
 
template<typename T >
void multiplyImage (image::Image< T > &image, bool overlapOnly=false, int xStep=1, int yStep=1) const
 Multiply an image by the field in-place.
 
template<typename T >
void divideImage (image::Image< T > &image, bool overlapOnly=false, int xStep=1, int yStep=1) const
 Divide an image by the field in-place.
 
std::shared_ptr< BoundedFieldoperator/ (double scale) const
 
bool operator!= (BoundedField const &rhs) const
 BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal.
 
void writeFits (std::string const &fileName, std::string const &mode="w") const
 Write the object to a regular FITS file.
 
void writeFits (fits::MemFileManager &manager, std::string const &mode="w") const
 Write the object to a FITS image in memory.
 
void writeFits (fits::Fits &fitsfile) const
 Write the object to an already-open FITS object.
 

Static Public Member Functions

static std::shared_ptr< BoundedFieldreadFits (fits::Fits &fitsfile)
 Read an object from an already open FITS object.
 
static std::shared_ptr< BoundedFieldreadFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU)
 Read an object from a regular FITS file.
 
static std::shared_ptr< BoundedFieldreadFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
 Read an object from a FITS file in memory.
 
static std::shared_ptr< BoundedFielddynamicCast (std::shared_ptr< Persistable > const &ptr)
 Dynamically cast a shared_ptr.
 

Protected Types

using OutputArchiveHandle = io::OutputArchiveHandle
 

Protected Member Functions

std::string getPersistenceName () const override
 Return the unique name used to persist this object and look up its factory.
 
std::string getPythonModule () const override
 Return the fully-qualified Python module that should be imported to guarantee that its factory is registered.
 
void write (OutputArchiveHandle &handle) const override
 Write the object to one or more catalogs.
 

Private Member Functions

std::string toString () const override
 

Detailed Description

A BoundedField that evaluate the pixel area of a SkyWcs in angular units.

Typically used to move an image or source flux between surface brightness and fluence.

Definition at line 47 of file PixelAreaBoundedField.h.

Member Typedef Documentation

◆ OutputArchiveHandle

using lsst::afw::table::io::Persistable::OutputArchiveHandle = io::OutputArchiveHandle
protectedinherited

Definition at line 108 of file Persistable.h.

Constructor & Destructor Documentation

◆ PixelAreaBoundedField() [1/3]

lsst::afw::math::PixelAreaBoundedField::PixelAreaBoundedField ( lsst::geom::Box2I const & bbox,
std::shared_ptr< geom::SkyWcs const > skyWcs,
lsst::geom::AngleUnit const & unit = lsst::geom::radians,
double scaling = 1.0 )

Create a PixelAreaBoundedField from a SkyWcs.

Parameters
[in]bboxPixel bounding box over which the WCS is valid.
[in]skyWcsWCS that maps pixels to and from sky coordinates.
[in]unitAngular unit that is used (squared) for the fields values.
[in]scalingFactor all field values should be scaled by.
Exceptions
pex::exception::InvalidParameterErrorThrown if skyWcs is null.

Definition at line 46 of file PixelAreaBoundedField.cc.

52 _skyWcs(skyWcs),
53 _scaling(scaling)
54{
55 if (_skyWcs == nullptr) {
56 throw LSST_EXCEPT(
57 pex::exceptions::InvalidParameterError,
58 "SkyWcs passed to PixelAreaBoundedField is null."
59 );
60 }
61 _scaling /= std::pow((1.0*unit).asRadians(), 2);
62}
AmpInfoBoxKey bbox
Definition Amplifier.cc:117
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition Exception.h:48
table::Key< double > scaling
BoundedField(BoundedField const &)=default
T pow(T... args)

◆ ~PixelAreaBoundedField()

lsst::afw::math::PixelAreaBoundedField::~PixelAreaBoundedField ( )
overridedefault

◆ PixelAreaBoundedField() [2/3]

lsst::afw::math::PixelAreaBoundedField::PixelAreaBoundedField ( PixelAreaBoundedField const & )
default

◆ PixelAreaBoundedField() [3/3]

lsst::afw::math::PixelAreaBoundedField::PixelAreaBoundedField ( PixelAreaBoundedField && )
default

Member Function Documentation

◆ addToImage()

template<typename T >
template void lsst::afw::math::BoundedField::addToImage ( image::Image< T > & image,
double scaleBy = 1.0,
bool overlapOnly = false,
int xStep = 1,
int yStep = 1 ) const
inherited

Add the field or a constant multiple of it to an image in-place.

Parameters
[out]imageImage to add to.
[in]scaleByMultiply the field by this before adding it to the image.
[in]overlapOnlyIf true, only modify the region in the intersection of image.getBBox(image::PARENT) and this->getBBox().
[in]xStepDistance between grid points in X to evaluate; values between grid points will be linearly interpolated.
[in]yStepDistance between grid points in Y to evaluate; values between grid points will be linearly interpolated.
Exceptions
pex::exceptions::RuntimeErrorif the bounding boxes do not overlap and overlapOnly=false.

Definition at line 264 of file BoundedField.cc.

265 {
266 applyToImage(*this, img, ScaledAdd(scaleBy), overlapOnly, xStep, yStep);
267}
double scaleBy

◆ divideImage()

template<typename T >
template void lsst::afw::math::BoundedField::divideImage ( image::Image< T > & image,
bool overlapOnly = false,
int xStep = 1,
int yStep = 1 ) const
inherited

Divide an image by the field in-place.

Parameters
[out]imageImage to fill.
[in]overlapOnlyIf true, only modify the region in the intersection of image.getBBox(image::PARENT) and this->getBBox().
[in]xStepDistance between grid points in X to evaluate; values between grid points will be linearly interpolated.
[in]yStepDistance between grid points in Y to evaluate; values between grid points will be linearly interpolated.
Exceptions
pex::exceptions::RuntimeErrorif the bounding boxes do not overlap and overlapOnly=false.

Definition at line 275 of file BoundedField.cc.

275 {
276 applyToImage(*this, img, Divide(), overlapOnly, xStep, yStep);
277}

◆ dynamicCast()

Dynamically cast a shared_ptr.

Dynamically cast a shared pointer and raise on failure.

You must provide an explicit template instantiation in the .cc file for each class that inherits from PersistableFacade. Designed to work around RTTI issues on macOS with hidden symbols;

Exceptions
lsst::pex::exceptions::LogicErrorif the cast fails

param[in] ptr The pointer to be cast.

Returns
The cast pointer.
Exceptions
lsst::pex::exceptions::TypeErrorIf the dynamic cast fails.

Definition at line 218 of file Persistable.cc.

◆ evaluate() [1/3]

double lsst::afw::math::BoundedField::evaluate ( double x,
double y ) const
inlineinherited

Evaluate the field at the given point.

This delegates to the evaluate() method that takes lsst::geom::Point2D.

There is no bounds-checking on the given position; this is the responsibility of the user, who can almost always do it more efficiently.

Definition at line 75 of file BoundedField.h.

75{ return evaluate(lsst::geom::Point2D(x, y)); }
int y
Definition SpanSet.cc:48
virtual double evaluate(lsst::geom::Point2D const &position) const =0
Evaluate the field at the given point.

◆ evaluate() [2/3]

double lsst::afw::math::PixelAreaBoundedField::evaluate ( lsst::geom::Point2D const & position) const
overridevirtual

Evaluate the field at the given point.

This is the only abstract method to be implemented by subclasses.

Subclasses should not provide bounds checking on the given position; this is the responsibility of the user, who can almost always do it more efficiently.

Implements lsst::afw::math::BoundedField.

Definition at line 64 of file PixelAreaBoundedField.cc.

64 {
65 return std::pow(_skyWcs->getPixelScale(position).asRadians(), 2) * _scaling;
66}

◆ evaluate() [3/3]

ndarray::Array< double, 1, 1 > lsst::afw::math::PixelAreaBoundedField::evaluate ( ndarray::Array< double const, 1 > const & x,
ndarray::Array< double const, 1 > const & y ) const
overridevirtual

Evaluate the field at multiple arbitrary points.

Parameters
[in]xarray of x coordinates, same shape as y
[in]yarray of y coordinates, same shape as x
Returns
an array of output values, same shape as x and y

There is no bounds-checking on the given positions; this is the responsibility of the user, who can almost always do it more efficiently.

Reimplemented from lsst::afw::math::BoundedField.

Definition at line 68 of file PixelAreaBoundedField.cc.

71 {
72 if (x.getShape() != y.getShape()) {
73 throw LSST_EXCEPT(
74 pex::exceptions::InvalidParameterError,
75 (boost::format("Inconsistent shapes in evaluate; %s != %s.") % x.getShape() % y.getShape()).str()
76 );
77 }
78 // Compute _skyWcs->pixelToSky at all of the given points in a single
79 // vectorized call, along with points one pixel away in x and y.
80 double constexpr side = 1.0;
81 std::size_t const n = x.size();
83 pixPoints.reserve(n*3);
84 for (std::size_t i = 0; i < n; ++i) {
85 pixPoints.emplace_back(x[i], y[i]);
86 pixPoints.emplace_back(x[i] + side, y[i]);
87 pixPoints.emplace_back(x[i], y[i] + side);
88 }
89 auto skyPoints = _skyWcs->pixelToSky(pixPoints);
90 // Work in 3-space to avoid RA wrapping and pole issues.
91 ndarray::Array<double, 1, 1> z = ndarray::allocate(x.getShape());
92 for (std::size_t i = 0; i < n; ++i) {
93 std::size_t j = i*3;
94 auto skyLL = skyPoints[j].getVector();
95 auto skyDx = skyPoints[j + 1].getVector() - skyLL;
96 auto skyDy = skyPoints[j + 2].getVector() - skyLL;
97 double skyAreaSq = skyDx.cross(skyDy).getSquaredNorm();
98 z[i] = _scaling * std::sqrt(skyAreaSq) / (side*side);
99 }
100 return z;
101}
double z
Definition Match.cc:44
T emplace_back(T... args)
T reserve(T... args)
T sqrt(T... args)

◆ fillImage()

template<typename T >
template void lsst::afw::math::BoundedField::fillImage ( image::Image< T > & image,
bool overlapOnly = false,
int xStep = 1,
int yStep = 1 ) const
inherited

Assign the field to an image, overwriting values already present.

Parameters
[out]imageImage to fill.
[in]overlapOnlyIf true, only modify the region in the intersection of image.getBBox(image::PARENT) and this->getBBox().
[in]xStepDistance between grid points in X to evaluate; values between grid points will be linearly interpolated.
[in]yStepDistance between grid points in Y to evaluate; values between grid points will be linearly interpolated.
Exceptions
pex::exceptions::RuntimeErrorif the bounding boxes do not overlap and overlapOnly=false.

Definition at line 259 of file BoundedField.cc.

259 {
260 applyToImage(*this, img, Assign(), overlapOnly, xStep, yStep);
261}

◆ getBBox()

lsst::geom::Box2I lsst::afw::math::BoundedField::getBBox ( ) const
inlineinherited

Return the bounding box that defines the region where the field is valid.

Because this is an integer bounding box, its minimum and maximum positions are the centers of the pixels where the field is valid, but the field can be assumed to be valid to the edges of those pixels, which is the boundary you'd get by converting the returned lsst::geom::Box2I into a lsst::geom::Box2D.

Definition at line 112 of file BoundedField.h.

112{ return _bbox; }

◆ getPersistenceName()

std::string lsst::afw::math::PixelAreaBoundedField::getPersistenceName ( ) const
overrideprotectedvirtual

Return the unique name used to persist this object and look up its factory.

Must be less than ArchiveIndexSchema::MAX_NAME_LENGTH characters.

Reimplemented from lsst::afw::table::io::Persistable.

Definition at line 179 of file PixelAreaBoundedField.cc.

179 {
180 return getPixelAreaBoundedFieldPersistenceName();
181}

◆ getPythonModule()

std::string lsst::afw::math::PixelAreaBoundedField::getPythonModule ( ) const
overrideprotectedvirtual

Return the fully-qualified Python module that should be imported to guarantee that its factory is registered.

Must be less than ArchiveIndexSchema::MAX_MODULE_LENGTH characters.

Will be ignored if empty.

Reimplemented from lsst::afw::table::io::Persistable.

Definition at line 183 of file PixelAreaBoundedField.cc.

183{ return "lsst.afw.math"; }

◆ integrate()

double lsst::afw::math::BoundedField::integrate ( ) const
virtualinherited

Compute the integral of this function over its bounding-box.

Returns
The value of the integral.

Reimplemented in lsst::afw::math::ChebyshevBoundedField.

Definition at line 49 of file BoundedField.cc.

49{ throw LSST_EXCEPT(pex::exceptions::LogicError, "Not Implemented"); }

◆ isPersistable()

bool lsst::afw::math::PixelAreaBoundedField::isPersistable ( ) const
overridevirtualnoexcept

PixelAreaBoundedField is persistable if and only if the nested SkyWcs is.

Reimplemented from lsst::afw::table::io::Persistable.

Definition at line 103 of file PixelAreaBoundedField.cc.

103 {
104 return _skyWcs->isPersistable();
105}

◆ mean()

double lsst::afw::math::BoundedField::mean ( ) const
virtualinherited

Compute the mean of this function over its bounding-box.

Returns
The value of the mean.

Reimplemented in lsst::afw::math::ChebyshevBoundedField.

Definition at line 51 of file BoundedField.cc.

51{ throw LSST_EXCEPT(pex::exceptions::LogicError, "Not Implemented"); }

◆ multiplyImage()

template<typename T >
template void lsst::afw::math::BoundedField::multiplyImage ( image::Image< T > & image,
bool overlapOnly = false,
int xStep = 1,
int yStep = 1 ) const
inherited

Multiply an image by the field in-place.

Parameters
[out]imageImage to fill.
[in]overlapOnlyIf true, only modify the region in the intersection of image.getBBox(image::PARENT) and this->getBBox().
[in]xStepDistance between grid points in X to evaluate; values between grid points will be linearly interpolated.
[in]yStepDistance between grid points in Y to evaluate; values between grid points will be linearly interpolated.
Exceptions
pex::exceptions::RuntimeErrorif the bounding boxes do not overlap and overlapOnly=false.

Definition at line 270 of file BoundedField.cc.

270 {
271 applyToImage(*this, img, Multiply(), overlapOnly, xStep, yStep);
272}

◆ operator!=()

bool lsst::afw::math::BoundedField::operator!= ( BoundedField const & rhs) const
inlineinherited

BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal.

Definition at line 195 of file BoundedField.h.

195{ return !(*this == rhs); };

◆ operator*()

std::shared_ptr< BoundedField > lsst::afw::math::PixelAreaBoundedField::operator* ( double const scale) const
overridevirtual

Return a scaled BoundedField.

Parameters
[in]scaleScaling factor

Implements lsst::afw::math::BoundedField.

Definition at line 107 of file PixelAreaBoundedField.cc.

107 {
108 return std::make_shared<PixelAreaBoundedField>(getBBox(), _skyWcs, lsst::geom::radians, _scaling*scale);
109}
lsst::geom::Box2I getBBox() const
Return the bounding box that defines the region where the field is valid.
AngleUnit constexpr radians
constant with units of radians
Definition Angle.h:109

◆ operator/()

std::shared_ptr< BoundedField > lsst::afw::math::BoundedField::operator/ ( double scale) const
inlineinherited

Definition at line 190 of file BoundedField.h.

190{ return (*this) * (1.0 / scale); }
scale(algorithm, min, max=None, frame=None)
Definition ds9.py:108

◆ operator=() [1/2]

PixelAreaBoundedField & lsst::afw::math::PixelAreaBoundedField::operator= ( PixelAreaBoundedField && )
delete

◆ operator=() [2/2]

PixelAreaBoundedField & lsst::afw::math::PixelAreaBoundedField::operator= ( PixelAreaBoundedField const & )
delete

◆ operator==()

bool lsst::afw::math::PixelAreaBoundedField::operator== ( BoundedField const & rhs) const
overridevirtual

BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal.

Implements lsst::afw::math::BoundedField.

Definition at line 111 of file PixelAreaBoundedField.cc.

111 {
112 auto rhsCasted = dynamic_cast<PixelAreaBoundedField const *>(&rhs);
113 if (!rhsCasted) return false;
114
115 return getBBox() == rhsCasted->getBBox() && *_skyWcs == *rhsCasted->_skyWcs &&
116 _scaling == rhsCasted->_scaling;
117}
PixelAreaBoundedField(lsst::geom::Box2I const &bbox, std::shared_ptr< geom::SkyWcs const > skyWcs, lsst::geom::AngleUnit const &unit=lsst::geom::radians, double scaling=1.0)
Create a PixelAreaBoundedField from a SkyWcs.

◆ readFits() [1/3]

static std::shared_ptr< BoundedField > lsst::afw::table::io::PersistableFacade< BoundedField >::readFits ( fits::Fits & fitsfile)
inlinestaticinherited

Read an object from an already open FITS object.

Parameters
[in]fitsfileFITS object to read from, already positioned at the desired HDU.

Definition at line 183 of file Persistable.h.

◆ readFits() [2/3]

static std::shared_ptr< BoundedField > lsst::afw::table::io::PersistableFacade< BoundedField >::readFits ( fits::MemFileManager & manager,
int hdu = fits::DEFAULT_HDU )
inlinestaticinherited

Read an object from a FITS file in memory.

Parameters
[in]managerManager for the memory to read from.
[in]hduHDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty.

Definition at line 205 of file Persistable.h.

◆ readFits() [3/3]

static std::shared_ptr< BoundedField > lsst::afw::table::io::PersistableFacade< BoundedField >::readFits ( std::string const & fileName,
int hdu = fits::DEFAULT_HDU )
inlinestaticinherited

Read an object from a regular FITS file.

Parameters
[in]fileNameName of the file to read.
[in]hduHDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty.

Definition at line 194 of file Persistable.h.

◆ toString()

std::string lsst::afw::math::PixelAreaBoundedField::toString ( ) const
overrideprivatevirtual

Implements lsst::afw::math::BoundedField.

Definition at line 119 of file PixelAreaBoundedField.cc.

119 {
121 os << "PixelAreaBoundedField(" << (*_skyWcs) << ", scaling=" << _scaling << ")";
122 return os.str();
123}
std::ostream * os
Definition Schema.cc:557

◆ write()

void lsst::afw::math::PixelAreaBoundedField::write ( OutputArchiveHandle & handle) const
overrideprotectedvirtual

Write the object to one or more catalogs.

The handle object passed to this function provides an interface for adding new catalogs and adding nested objects to the same archive (while checking for duplicates). See OutputArchiveHandle for more information.

Reimplemented from lsst::afw::table::io::Persistable.

Definition at line 185 of file PixelAreaBoundedField.cc.

185 {
186 auto const & keys = PersistenceHelper::get();
187 table::BaseCatalog catalog = handle.makeCatalog(keys.schema);
188 std::shared_ptr<table::BaseRecord> record = catalog.addNew();
189 record->set(keys.bbox, getBBox());
190 record->set(keys.wcs, handle.put(_skyWcs));
191 record->set(keys.scaling, _scaling);
192 handle.saveCatalog(catalog);
193}
CatalogT< BaseRecord > BaseCatalog
Definition fwd.h:72

◆ writeFits() [1/3]

void lsst::afw::table::io::Persistable::writeFits ( fits::Fits & fitsfile) const
inherited

Write the object to an already-open FITS object.

Parameters
[in]fitsfileOpen FITS object to write to.

Definition at line 18 of file Persistable.cc.

18 {
19 OutputArchive archive;
20 archive.put(this);
21 archive.writeFits(fitsfile);
22}

◆ writeFits() [2/3]

void lsst::afw::table::io::Persistable::writeFits ( fits::MemFileManager & manager,
std::string const & mode = "w" ) const
inherited

Write the object to a FITS image in memory.

Parameters
[in]managerName of the file to write to.
[in]modeIf "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file.

Definition at line 29 of file Persistable.cc.

29 {
30 fits::Fits fitsfile(manager, mode, fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK);
31 writeFits(fitsfile);
32}
void writeFits(std::string const &fileName, std::string const &mode="w") const
Write the object to a regular FITS file.

◆ writeFits() [3/3]

void lsst::afw::table::io::Persistable::writeFits ( std::string const & fileName,
std::string const & mode = "w" ) const
inherited

Write the object to a regular FITS file.

Parameters
[in]fileNameName of the file to write to.
[in]modeIf "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file.

Definition at line 24 of file Persistable.cc.

24 {
25 fits::Fits fitsfile(fileName, mode, fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK);
26 writeFits(fitsfile);
27}

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