23 #ifndef LSST_AFW_DETECTION_Psf_h_INCLUDED 24 #define LSST_AFW_DETECTION_Psf_h_INCLUDED 94 virtual ~Psf() =
default;
255 unsigned int warpBuffer = 5);
264 explicit Psf(
bool isFixed =
false);
279 virtual double doComputeApertureFlux(
double radius,
geom::Point2D const& position,
300 #endif // !LSST_AFW_DETECTION_Psf_h_INCLUDED An ellipse core with quadrupole moments as parameters.
ImageOwnerEnum
Enum passed to computeImage and computeKernelImage to determine image ownership.
double computePeak(geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
Return the peak value of the PSF image.
image::Color getAverageColor() const
Return the average Color of the stars used to construct the Psf.
An integer coordinate rectangle.
A base class for objects that can be persisted via afw::table::io Archive classes.
virtual std::shared_ptr< Psf > clone() const =0
Polymorphic deep-copy.
A base class for image defects.
Point< double, 2 > Point2D
math::Kernel::Pixel Pixel
Pixel type of Image returned by computeImage.
virtual geom::Point2D getAveragePosition() const
Return the average position of the stars used to construct the Psf.
double computeApertureFlux(double radius, geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
Compute the "flux" of the Psf model within a circular aperture of the given radius.
virtual std::shared_ptr< Psf > resized(int width, int height) const =0
Return clone with specified kernel dimensions.
geom::ellipses::Quadrupole computeShape(geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
Compute the ellipse corresponding to the second moments of the Psf.
Psf & operator=(Psf const &)=delete
#define LSST_PERSIST_FORMATTER(formatter...)
std::shared_ptr< Image > computeImage(geom::Point2D position=makeNullPoint(), image::Color color=image::Color(), ImageOwnerEnum owner=COPY) const
Return an Image of the PSF, in a form that can be compared directly with star images.
An internal image will be returned without copying.
geom::Box2I computeBBox(geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
Return the bounding box of the image returned by computeKernelImage()
std::shared_ptr< Image > computeKernelImage(geom::Point2D position=makeNullPoint(), image::Color color=image::Color(), ImageOwnerEnum owner=COPY) const
Return an Image of the PSF, in a form suitable for convolution.
Describe the colour of a source.
A polymorphic base class for representing an image's Point Spread Function.
A CRTP facade class for subclasses of Persistable.
image::Image< Pixel > Image
Image type returned by computeImage.
The image will be copied before returning; caller will own it.
static std::shared_ptr< Image > recenterKernelImage(std::shared_ptr< Image > im, geom::Point2D const &position, std::string const &warpAlgorithm="lanczos5", unsigned int warpBuffer=5)
Helper function for Psf::doComputeImage(): converts a kernel image (centered at (0,0) when xy0 is taken into account) to an image centered at position when xy0 is taken into account.
std::shared_ptr< math::Kernel const > getLocalKernel(geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
Return a FixedKernel corresponding to the Psf image at the given point.