LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
32 : position(position_), color(color_) {}
35 return position ==
other.position;
72 Psf::Psf(
bool isFixed,
std::size_t capacity) : _isFixed(isFixed) {
73 _imageCache = std::make_unique<PsfCache>(capacity);
74 _kernelImageCache = std::make_unique<PsfCache>(capacity);
82 : _isFixed(
other._isFixed),
83 _imageCache(
std::move(
other._imageCache)),
84 _kernelImageCache(
std::move(
other._kernelImageCache)) {}
89 unsigned int warpBuffer) {
94 if (irX.second != 0.0 || irY.second != 0.0) {
131 return doComputeBBox(position, color);
140 return std::make_shared<math::FixedKernel>(*
image);
153 return doComputeApertureFlux(
radius, position, color);
159 return doComputeShape(position, color);
173 _imageCache->reserve(capacity);
174 _kernelImageCache->reserve(capacity);
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
lsst::geom::Point2D const position
double computeApertureFlux(double radius, lsst::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.
std::shared_ptr< Image > computeImage(lsst::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.
@ INTERNAL
An internal image will be returned without copying.
int positionToIndex(double pos)
Convert image position to nearest integer index.
static std::shared_ptr< Image > recenterKernelImage(std::shared_ptr< Image > im, lsst::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,...
std::shared_ptr< math::Kernel const > getLocalKernel(lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
Return a FixedKernel corresponding to the Psf image at the given point.
friend std::ostream & operator<<(std::ostream &os, PsfCacheKey const &key)
double computePeak(lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
Return the peak value of the PSF image.
void setCacheCapacity(std::size_t capacity)
Set the capacity of the caches.
bool isIndeterminate() const noexcept
Whether the color is the special value that indicates that it is unspecified.
Point< double, 2 > Point2D
std::size_t operator()(lsst::afw::detection::detail::PsfCacheKey const &key) const noexcept
PsfCacheKey(lsst::geom::Point2D const &position_, image::Color color_=image::Color())
bool operator==(PsfCacheKey const &other) const
ItemVariant const * other
@ COPY
The image will be copied before returning; caller will own it.
A base class for image defects.
An ellipse core with quadrupole moments as parameters.
int getX0() const
Return the image's column-origin.
image::Color getAverageColor() const
Return the average Color of the stars used to construct the Psf.
ImageOwnerEnum
Enum passed to computeImage and computeKernelImage to determine image ownership.
std::size_t getCacheCapacity() const
Return the capacity of the caches.
static std::shared_ptr< T > dynamicCast(std::shared_ptr< Persistable > const &ptr)
Dynamically cast a shared_ptr.
std::shared_ptr< ImageT > offsetImage(ImageT const &image, float dx, float dy, std::string const &algorithmName="lanczos5", unsigned int buffer=0)
Return an image offset by (dx, dy) using the specified algorithm.
An integer coordinate rectangle.
void setXY0(lsst::geom::Point2I const origin)
Set the ImageBase's origin.
int getY0() const
Return the image's row-origin.
A polymorphic base class for representing an image's Point Spread Function.
virtual lsst::geom::Point2D getAveragePosition() const
Return the average position of the stars used to construct the Psf.
lsst::geom::Box2I computeBBox(lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
Return the bounding box of the image returned by computeKernelImage()
geom::ellipses::Quadrupole computeShape(lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
Compute the ellipse corresponding to the second moments of the Psf.
std::shared_ptr< Image > computeKernelImage(lsst::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.