LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
36 "dimensions of a Kernel's images",
"pixel")),
37 center(
afw::table::PointKey<int>::addFields(
schema,
"center",
"center point in a Kernel image",
39 if (nSpatialFunctions > 0) {
41 "spatialfunctions",
"archive IDs for the Kernel's spatial functions", nSpatialFunctions);
58 record->set(center, kernel.
getCtr());
59 if (spatialFunctions.isValid()) {
69 ndarray::Array<int, 1, 1> array = record[spatialFunctions];
70 for (
std::size_t n = 0; n < spatialFunctionList.size(); ++n) {
71 array[n] = handle.
put(spatialFunctionList[n]);
77 ndarray::Array<int const, 1, 1> array = record[spatialFunctions];
83 return spatialFunctionList;
Key< T > addField(Field< T > const &field, bool doReplace=false)
Add a new field to the Schema, and return the associated Key.
lsst::geom::Extent2I const getDimensions() const
Return the Kernel's dimensions (width, height)
std::vector< SpatialFunctionPtr > readSpatialFunctions(afw::table::io::InputArchive const &archive, afw::table::BaseRecord const &record) const
An object passed to Persistable::write to allow it to persist itself.
void saveCatalog(BaseCatalog const &catalog)
Save a catalog in the archive.
Defines the fields and offsets for a table.
PersistenceHelper(int nSpatialFunctions)
lsst::geom::Point2I getCtr() const
Return index of kernel's center.
std::shared_ptr< afw::table::BaseRecord > write(afw::table::io::OutputArchiveHandle &handle, Kernel const &kernel) const
void writeSpatialFunctions(afw::table::io::OutputArchiveHandle &handle, afw::table::BaseRecord &record, std::vector< SpatialFunctionPtr > const &spatialFunctionList) const
BaseCatalog makeCatalog(Schema const &schema)
Return a new, empty catalog with the given schema.
#define LSST_ARCHIVE_ASSERT(EXPR)
An assertion macro used to validate the structure of an InputArchive.
Base class for all records.
Tag types used to declare specialized field types.
afw::table::PointKey< int > dimensions
A base class for image defects.
std::vector< SpatialFunctionPtr > _spatialFunctionList
afw::table::Schema schema
Kernels are used for convolution with MaskedImages and (eventually) Images.
afw::table::Key< afw::table::Array< int > > spatialFunctions
int put(Persistable const *obj, bool permissive=false)
Save an object to the archive and return a unique ID that can be used to retrieve it from an InputArc...
std::shared_ptr< RecordT > addNew()
Create a new record, add it to the end of the catalog, and return a pointer to it.