Class FixedKernel

Inheritance Relationships

Base Types

Class Documentation

class FixedKernel : public lsst::afw::table::io::PersistableFacade<FixedKernel>, public lsst::afw::math::Kernel

A kernel created from an Image

It has no adjustable parameters and so cannot be spatially varying.

Public Functions

FixedKernel()

Construct an empty FixedKernel of size 0x0

FixedKernel(lsst::afw::image::Image<Pixel> const &image)

Parameters
  • image: image for kernel

Construct a FixedKernel from an image

FixedKernel(lsst::afw::math::Kernel const &kernel, lsst::geom::Point2D const &pos)

Parameters
  • kernel: Kernel to convert to Fixed

  • pos: desired position

Construct a FixedKernel from a generic Kernel

FixedKernel(const FixedKernel&)
FixedKernel(FixedKernel&&)
FixedKernel &operator=(const FixedKernel&)
FixedKernel &operator=(FixedKernel&&)
~FixedKernel()
std::shared_ptr<Kernel> clone() const

Return a pointer to a deep copy of this kernel

This kernel exists instead of a copy constructor so one can obtain a copy of an actual kernel instead of a useless copy of the base class.

Every kernel subclass must override this method.

Return

a pointer to a deep copy of the kernel

std::shared_ptr<Kernel> resized(int width, int height) const

Return a pointer to a clone with specified kernel dimensions

Must be implemented by derived classes.

Return

a pointer to a clone with new dimensions.

Parameters
  • width: Number of columns in pixels

  • height: Number of rows in pixels

std::string toString(std::string const &prefix = "") const

Return a string representation of the kernel

virtual Pixel getSum() const
bool isPersistable() const

Return true if this particular object can be persisted using afw::table::io.

Protected Functions

double doComputeImage(lsst::afw::image::Image<Pixel> &image, bool doNormalize) const

Low-level version of computeImage

Before this is called the image dimensions are checked, the image’s xy0 is set and the kernel’s parameters are set. This routine sets the pixels, including normalization if requested.

Return

The kernel sum

Parameters
  • image: image whose pixels are to be set (output)

  • doNormalize: normalize the image (so sum is 1)?

std::string getPersistenceName() const

Return the unique name used to persist this object and look up its factory.

Must be less than ArchiveIndexSchema::MAX_NAME_LENGTH characters.

void write(OutputArchiveHandle &handle) const

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.