| LSSTApplications
    20.0.0
    LSSTDataManagementBasePackage | 
 
 
 
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());
 
   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);
 
  
bool isPersistable() const noexcept override
Whether this object is persistable; just delegates to the kernel.
lsst::geom::Box2I getBBox() const
return parent bounding box, with XY0 = -center
lsst::geom::Extent2I const getDimensions() const
Return the Kernel's dimensions (width, height)
An object passed to Persistable::write to allow it to persist itself.
void saveCatalog(BaseCatalog const &catalog)
Save a catalog in the archive.
A PersistableFactory for KernelPsf and its subclasses.
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
Compute an image (pixellized representation of the kernel) in place.
static KernelPsfPersistenceHelper const  & get()
geom::Point2D getAveragePosition() const override
Return average position of stars; used as default position.
void write(OutputArchiveHandle &handle) const override
Write the object to one or more catalogs.
BaseCatalog makeCatalog(Schema const &schema)
Return a new, empty catalog with the given schema.
std::string getPersistenceName() const override
Return the unique name used to persist this object and look up its factory.
image::Image< Pixel > Image
Image type returned by computeImage.
Base class for all records.
A base class for image defects.
KernelPsf(afw::math::Kernel const &kernel, geom::Point2D const &averagePosition=geom::Point2D())
Construct a KernelPsf with a clone of the given kernel.
static std::shared_ptr< T > dynamicCast(std::shared_ptr< Persistable > const &ptr)
Dynamically cast a shared_ptr.
An integer coordinate rectangle.
A read-only singleton struct containing the schema and key used in persistence for KernelPsf.
Kernels are used for convolution with MaskedImages and (eventually) Images.
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...
A polymorphic base class for representing an image's Point Spread Function.
std::shared_ptr< RecordT > addNew()
Create a new record, add it to the end of the catalog, and return a pointer to it.
std::string getPythonModule() const override
Return the fully-qualified Python module that should be imported to guarantee that its factory is reg...
An intermediate base class for Psfs that use an image representation.