lsst.meas.algorithms
21.0.0-8-g19111d86+d6551531e4
|
Go to the documentation of this file.
20 namespace algorithms {
23 KernelPsf::doComputeKernelImage(
geom::Point2D const& position, afw::image::Color
const& color)
const {
25 _kernel->
computeImage(*im,
true, position.getX(), position.getY());
29 geom::Box2I KernelPsf::doComputeBBox(
geom::Point2D const& position, afw::image::Color
const& color)
const {
34 :
ImagePsf(!kernel.isSpatiallyVarying()),
35 _kernel(kernel.
clone()),
44 return std::make_shared<KernelPsf>(*_kernel->resized(width, height), _averagePosition);
60 KernelPsfPersistenceHelper::KernelPsfPersistenceHelper()
62 kernel(
schema.addField<int>(
"kernel",
"archive ID of nested kernel object")),
64 schema,
"averagePosition",
"average position of stars used to make the PSF",
"pixel")) {}
76 record->set(
keys.kernel, handle.put(_kernel));
77 record->set(
keys.averagePosition, _averagePosition);
78 handle.saveCatalog(catalog);
bool isPersistable() const noexcept override
Whether this object is persistable; just delegates to the kernel.
lsst::geom::Box2I getBBox() const
lsst::geom::Extent2I const getDimensions() const
A PersistableFactory for KernelPsf and its subclasses.
afw::table::Schema schema
boost::shared_ptr< afw::detection::Psf > clone() const override
Polymorphic deep copy.
boost::shared_ptr< afw::detection::Psf > resized(int width, int height) const override
Return a clone with specified kernel dimensions.
afw::table::PointKey< double > averagePosition
double computeImage(lsst::afw::image::Image< Pixel > &image, bool doNormalize, double x=0.0, double y=0.0) const
static KernelPsfPersistenceHelper const & get()
Point< double, 2 > Point2D
geom::Point2D getAveragePosition() const override
Return average position of stars; used as default position.
void write(OutputArchiveHandle &handle) const override
std::string getPersistenceName() const override
Utilities for persisting KernelPsf and subclasses thereof.
image::Image< Pixel > Image
static std::shared_ptr< T > dynamicCast(std::shared_ptr< Persistable > const &ptr)
KernelPsf(afw::math::Kernel const &kernel, geom::Point2D const &averagePosition=geom::Point2D())
Construct a KernelPsf with a clone of the given kernel.
A read-only singleton struct containing the schema and key used in persistence for KernelPsf.
std::shared_ptr< BaseRecord > addNew()
io::OutputArchiveHandle OutputArchiveHandle
std::string getPythonModule() const override
An intermediate base class for Psfs that use an image representation.