29 namespace lsst {
namespace afw {
namespace math {
34 afw::
table::PointKey<int>::addFields(
35 schema,
"dimensions",
"dimensions of a Kernel's images",
"pixels"
39 afw::
table::PointKey<int>::addFields(
schema,
"center",
"center point in a Kernel image",
"pixels")
42 if (nSpatialFunctions > 0) {
44 "spatialfunctions",
"archive IDs for the Kernel's spatial functions", nSpatialFunctions
66 record->set(center, kernel.getCtr());
67 if (spatialFunctions.isValid()) {
68 writeSpatialFunctions(handle, *record, kernel._spatialFunctionList);
70 handle.saveCatalog(catalog);
80 for (std::size_t n = 0; n < spatialFunctionList.size(); ++n) {
81 array[n] = handle.
put(spatialFunctionList[n]);
90 std::vector<PTR(Kernel::SpatialFunction)> spatialFunctionList(array.
getSize<0>());
91 for (std::size_t n = 0; n < spatialFunctionList.size(); ++n) {
95 return spatialFunctionList;
PersistenceHelper(int nSpatialFunctions)
Defines the fields and offsets for a table.
Declare the Kernel class and subclasses.
int put(Persistable const *obj, bool permissive=false)
Save a nested Persistable to the same archive.
An object passed to Persistable::write to allow it to persist itself.
A custom container class for records, based on std::vector.
afw::table::Schema schema
Include files required for standard LSST Exception handling.
Key< T > addField(Field< T > const &field, bool doReplace=false)
Add a new field to the Schema, and return the associated Key.
int getSize() const
Return the size of a specific dimension.
std::map< Citizen const *, CitizenInfo > table
afw::table::PointKey< int > dimensions
afw::table::Key< afw::table::Array< int > > spatialFunctions
std::vector< SpatialFunctionPtr > readSpatialFunctions(afw::table::io::InputArchive const &archive, afw::table::BaseRecord const &record) const
afw::table::Schema schema
Tag types used to declare specialized field types.
#define LSST_ARCHIVE_ASSERT(EXPR)
An assertion macro used to validate the structure of an InputArchive.
Base class for all records.
boost::shared_ptr< RecordT > addNew()
Create a new record, add it to the end of the catalog, and return a pointer to it.
void writeSpatialFunctions(afw::table::io::OutputArchiveHandle &handle, afw::table::BaseRecord &record, std::vector< SpatialFunctionPtr > const &spatialFunctionList) const
virtual void write(OutputArchiveHandle &handle) const
Write the object to one or more catalogs.
Kernels are used for convolution with MaskedImages and (eventually) Images.