lsst::afw::math::ProductBoundedField Class Referencefinal

A BoundedField that lazily multiplies a sequence of other BoundedFields. More...

#include <ProductBoundedField.h>

Inheritance diagram for lsst::afw::math::ProductBoundedField:

## Public Member Functions

ProductBoundedField (std::vector< std::shared_ptr< BoundedField const >> const &factors)
Construct from a sequence of BoundedField factors. More...

ProductBoundedField (ProductBoundedField const &)

ProductBoundedField (ProductBoundedField &&)

ProductBoundedFieldoperator= (ProductBoundedField const &)=delete

ProductBoundedFieldoperator= (ProductBoundedField &&)=delete

~ProductBoundedField () override

double evaluate (lsst::geom::Point2D const &position) const override
Evaluate the field at the given point. More...

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. More...

bool isPersistable () const noexcept override
ProductBoundedField is persistable if and only if all of its factors are. More...

std::shared_ptr< BoundedFieldoperator* (double const scale) const override
Return a scaled BoundedField. More...

bool operator== (BoundedField const &rhs) const override
BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal. More...

virtual double evaluate (lsst::geom::Point2D const &position) const=0
Evaluate the field at the given point. More...

double evaluate (double x, double y) const
Evaluate the field at the given point. More...

virtual ndarray::Array< double, 1, 1 > evaluate (ndarray::Array< double const, 1 > const &x, ndarray::Array< double const, 1 > const &y) const
Evaluate the field at multiple arbitrary points. More...

double evaluate (double x, double y) const
Evaluate the field at the given point. More...

virtual double integrate () const
Compute the integral of this function over its bounding-box. More...

virtual double mean () const
Compute the mean of this function over its bounding-box. More...

lsst::geom::Box2I getBBox () const
Return the bounding box that defines the region where the field is valid. More...

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. More...

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. More...

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. More...

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. More...

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. More...

void writeFits (std::string const &fileName, std::string const &mode="w") const
Write the object to a regular FITS file. More...

void writeFits (fits::MemFileManager &manager, std::string const &mode="w") const
Write the object to a FITS image in memory. More...

void writeFits (fits::Fits &fitsfile) const
Write the object to an already-open FITS object. More...

## Static Public Member Functions

static std::shared_ptr< ProductBoundedFieldreadFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU)
Read an object from a regular FITS file. More...

static std::shared_ptr< ProductBoundedFieldreadFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
Read an object from a FITS file in memory. More...

static std::shared_ptr< ProductBoundedFielddynamicCast (std::shared_ptr< Persistable > const &ptr)
Dynamically cast a shared_ptr. More...

static std::shared_ptr< BoundedFieldreadFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU)
Read an object from a regular FITS file. More...

static std::shared_ptr< BoundedFieldreadFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
Read an object from a FITS file in memory. More...

static std::shared_ptr< BoundedFielddynamicCast (std::shared_ptr< Persistable > const &ptr)
Dynamically cast a shared_ptr. More...

## 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. More...

std::string getPythonModule () const override
Return the fully-qualified Python module that should be imported to guarantee that its factory is registered. More...

void write (OutputArchiveHandle &handle) const override
Write the object to one or more catalogs. More...

## Detailed Description

A BoundedField that lazily multiplies a sequence of other BoundedFields.

Definition at line 36 of file ProductBoundedField.h.

## ◆ OutputArchiveHandle

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

Definition at line 108 of file Persistable.h.

## ◆ ProductBoundedField() [1/3]

 lsst::afw::math::ProductBoundedField::ProductBoundedField ( std::vector< std::shared_ptr< BoundedField const >> const & factors )
explicit

Construct from a sequence of BoundedField factors.

Parameters
 [in] factors BoundedFields to be multiplied together. All bounding boxes must be the same.
Exceptions
 pex::exceptions::LengthError Thrown if factors.size() < 1 pex::exceptions::InvalidParameterError Thrown if the bounding boxes of the factors are inconsistent.

Definition at line 69 of file ProductBoundedField.cc.

69  :
70  BoundedField(checkAndExtractBBox(factors)), _factors(factors)
71 {}
BoundedField(BoundedField const &)=default

## ◆ ProductBoundedField() [2/3]

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

## ◆ ProductBoundedField() [3/3]

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

## ◆ ~ProductBoundedField()

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

## Member Function Documentation

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] image Image to add to. [in] scaleBy Multiply the field by this before adding it to the image. [in] overlapOnly If true, only modify the region in the intersection of image.getBBox(image::PARENT) and this->getBBox(). [in] xStep Distance between grid points in X to evaluate; values between grid points will be linearly interpolated. [in] yStep Distance between grid points in Y to evaluate; values between grid points will be linearly interpolated.
Exceptions
 pex::exceptions::RuntimeError if 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
Definition: BoundedField.cc:76

## ◆ 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] image Image to fill. [in] overlapOnly If true, only modify the region in the intersection of image.getBBox(image::PARENT) and this->getBBox(). [in] xStep Distance between grid points in X to evaluate; values between grid points will be linearly interpolated. [in] yStep Distance between grid points in Y to evaluate; values between grid points will be linearly interpolated.
Exceptions
 pex::exceptions::RuntimeError if 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() [1/2]

 template std::shared_ptr< meas::extensions::psfex::PsfexPsf > lsst::afw::table::io::PersistableFacade< ProductBoundedField >::dynamicCast ( std::shared_ptr< Persistable > const & ptr )
staticinherited

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::LogicError if the cast fails

param[in] ptr The pointer to be cast.

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

Definition at line 218 of file Persistable.cc.

18  {
19  auto result = std::dynamic_pointer_cast<T>(ptr);
20  if (!result) {
21  throw LSST_EXCEPT(pex::exceptions::TypeError, "Dynamic pointer cast failed");
22  }
23  return result;
24 }
py::object result
Definition: _schema.cc:429
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
uint64_t * ptr
Definition: RangeSet.cc:88

## ◆ dynamicCast() [2/2]

 template std::shared_ptr< meas::extensions::psfex::PsfexPsf > lsst::afw::table::io::PersistableFacade< BoundedField >::dynamicCast ( std::shared_ptr< Persistable > const & ptr )
staticinherited

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::LogicError if the cast fails

param[in] ptr The pointer to be cast.

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

Definition at line 218 of file Persistable.cc.

18  {
19  auto result = std::dynamic_pointer_cast<T>(ptr);
20  if (!result) {
21  throw LSST_EXCEPT(pex::exceptions::TypeError, "Dynamic pointer cast failed");
22  }
23  return result;
24 }

## ◆ evaluate() [1/6]

 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)); }
double x
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/6]

 double lsst::afw::math::BoundedField::evaluate
inline

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)); }
virtual double evaluate(lsst::geom::Point2D const &position) const=0
Evaluate the field at the given point.

## ◆ evaluate() [3/6]

 double lsst::afw::math::ProductBoundedField::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 77 of file ProductBoundedField.cc.

77  {
78  double product = 1.0;
79  for (auto const & field : _factors) {
80  product *= field->evaluate(position);
81  }
82  return product;
83 }
table::Key< int > field
Definition: ApCorrMap.cc:77

## ◆ evaluate() [4/6]

 virtual double lsst::afw::math::BoundedField::evaluate

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.

## ◆ evaluate() [5/6]

 ndarray::Array< double, 1, 1 > lsst::afw::math::BoundedField::evaluate

Evaluate the field at multiple arbitrary points.

Parameters
 [in] x array of x coordinates, same shape as y [in] y array 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.

Definition at line 87 of file BoundedField.cc.

41  {
42  ndarray::Array<double, 1, 1> out = ndarray::allocate(x.getSize<0>());
43  for (int i = 0, n = x.getSize<0>(); i < n; ++i) {
44  out[i] = evaluate(x[i], y[i]);
45  }
46  return out;
47 }

## ◆ evaluate() [6/6]

 ndarray::Array< double, 1, 1 > lsst::afw::math::ProductBoundedField::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] x array of x coordinates, same shape as y [in] y array 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 85 of file ProductBoundedField.cc.

88  {
89  if (x.getShape() != y.getShape()) {
90  throw LSST_EXCEPT(
91  pex::exceptions::InvalidParameterError,
92  (boost::format("Inconsistent shapes: %s != %s") % x.getShape() % y.getShape()).str()
93  );
94  }
95  ndarray::Array<double, 1, 1> z = ndarray::allocate(x.getShape());
96  std::fill(z.begin(), z.end(), 1.0);
97  for (auto const & field : _factors) {
98  ndarray::asEigenArray(z) *= ndarray::asEigenArray(field->evaluate(x, y));
99  }
100  return z;
101 }
double z
Definition: Match.cc:44
T fill(T... args)
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
Definition: history.py:174

## ◆ 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] image Image to fill. [in] overlapOnly If true, only modify the region in the intersection of image.getBBox(image::PARENT) and this->getBBox(). [in] xStep Distance between grid points in X to evaluate; values between grid points will be linearly interpolated. [in] yStep Distance between grid points in Y to evaluate; values between grid points will be linearly interpolated.
Exceptions
 pex::exceptions::RuntimeError if 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::ProductBoundedField::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 162 of file ProductBoundedField.cc.

162  {
163  return getProductBoundedFieldPersistenceName();
164 }

## ◆ getPythonModule()

 std::string lsst::afw::math::ProductBoundedField::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 166 of file ProductBoundedField.cc.

166 { 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::ProductBoundedField::isPersistable ( ) const
overridevirtualnoexcept

ProductBoundedField is persistable if and only if all of its factors are.

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

Definition at line 157 of file ProductBoundedField.cc.

157  {
158  return std::all_of(_factors.begin(), _factors.end(),
159  [](auto const & field) { return field->isPersistable(); });
160 }
T all_of(T... args)

## ◆ 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] image Image to fill. [in] overlapOnly If true, only modify the region in the intersection of image.getBBox(image::PARENT) and this->getBBox(). [in] xStep Distance between grid points in X to evaluate; values between grid points will be linearly interpolated. [in] yStep Distance between grid points in Y to evaluate; values between grid points will be linearly interpolated.
Exceptions
 pex::exceptions::RuntimeError if 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::ProductBoundedField::operator* ( double const scale ) const
overridevirtual

Return a scaled BoundedField.

Parameters
 [in] scale Scaling factor

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

Definition at line 180 of file ProductBoundedField.cc.

180  {
182  bool multiplied = false;
183  for (auto & field : factors) {
184  try {
185  field = (*field) * scale;
186  multiplied = true;
187  break;
188  } catch (pex::exceptions::LogicError &) {}
189  }
190  if (!multiplied) {
191  ndarray::Array<double, 2, 2> coefficients = ndarray::allocate(1, 1);
192  coefficients[0][0] = scale;
193  factors.push_back(std::make_shared<ChebyshevBoundedField>(getBBox(), coefficients));
194  }
195  return std::make_shared<ProductBoundedField>(factors);
196 }
ndarray::Array< double const, 2, 2 > coefficients
lsst::geom::Box2I getBBox() const
Return the bounding box that defines the region where the field is valid.
Definition: BoundedField.h:112
def scale(algorithm, min, max=None, frame=None)
Definition: ds9.py:108

## ◆ operator/()

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

Definition at line 190 of file BoundedField.h.

190 { return (*this) * (1.0 / scale); }

## ◆ operator=() [1/2]

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

## ◆ operator=() [2/2]

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

## ◆ operator==()

 bool lsst::afw::math::ProductBoundedField::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 198 of file ProductBoundedField.cc.

198  {
199  auto rhsCasted = dynamic_cast<ProductBoundedField const*>(&rhs);
200  if (!rhsCasted) return false;
201
202  return (getBBox() == rhsCasted->getBBox()) &&
203  std::equal(_factors.begin(), _factors.end(),
204  rhsCasted->_factors.begin(), rhsCasted->_factors.end(),
205  [](auto const & a, auto const & b) { return *a == *b; });
206 }
table::Key< int > b
table::Key< int > a
ProductBoundedField(std::vector< std::shared_ptr< BoundedField const >> const &factors)
Construct from a sequence of BoundedField factors.
T equal(T... args)

inlinestaticinherited

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

Definition at line 183 of file Persistable.h.

183  {
185  }
static std::shared_ptr< BoundedField > dynamicCast(std::shared_ptr< Persistable > const &ptr)
Dynamically cast a shared_ptr.
Definition: Persistable.cc:18

inlinestaticinherited

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

Definition at line 183 of file Persistable.h.

183  {
185  }

 static std::shared_ptr 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] manager Manager for the memory to read from. [in] hdu HDU 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.

205  {
207  }

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

Read an object from a FITS file in memory.

Parameters
 [in] manager Manager for the memory to read from. [in] hdu HDU 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.

205  {
207  }

 static std::shared_ptr 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] fileName Name of the file to read. [in] hdu HDU 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.

194  {
196  }

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

Read an object from a regular FITS file.

Parameters
 [in] fileName Name of the file to read. [in] hdu HDU 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.

194  {
196  }

## ◆ write()

 void lsst::afw::math::ProductBoundedField::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 168 of file ProductBoundedField.cc.

168  {
169  auto const & keys = PersistenceHelper::get();
170  table::BaseCatalog catalog = handle.makeCatalog(keys.schema);
171  catalog.reserve(_factors.size());
172  for (auto const & field : _factors) {
174  }
175  handle.saveCatalog(catalog);
176 }
void reserve(size_type n)
Increase the capacity of the catalog to the given size.
Definition: Catalog.h:433
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] fitsfile Open 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] manager Name of the file to write to. [in] mode If "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.
Definition: Persistable.cc:24

## ◆ 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] fileName Name of the file to write to. [in] mode If "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:
• /j/snowflake/release/lsstsw/stack/lsst-scipipe-0.7.0/Linux64/afw/22.0.1-42-gca6935d93+ba5e5ca3eb/include/lsst/afw/math/ProductBoundedField.h
• /j/snowflake/release/lsstsw/stack/lsst-scipipe-0.7.0/Linux64/afw/22.0.1-42-gca6935d93+ba5e5ca3eb/src/math/ProductBoundedField.cc