LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
A Psf defined by a Kernel.
More...
#include <KernelPsf.h>
|
| KernelPsf (afw::math::Kernel const &kernel, geom::Point2D const &averagePosition=geom::Point2D()) |
| Construct a KernelPsf with a clone of the given kernel. More...
|
|
boost::shared_ptr< afw::math::Kernel const > | getKernel () const |
| Return the Kernel used to define this Psf. More...
|
|
geom::Point2D | getAveragePosition () const override |
| Return average position of stars; used as default position. More...
|
|
boost::shared_ptr< afw::detection::Psf > | clone () const override |
| Polymorphic deep copy. More...
|
|
boost::shared_ptr< afw::detection::Psf > | resized (int width, int height) const override |
| Return a clone with specified kernel dimensions. More...
|
|
bool | isPersistable () const noexcept override |
| Whether this object is persistable; just delegates to the kernel. More...
|
|
std::shared_ptr< typehandling::Storable > | cloneStorable () const override final |
| Polymorphic deep-copy. More...
|
|
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. More...
|
|
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. More...
|
|
double | computePeak (lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const |
| Return the peak value of the PSF image. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
image::Color | getAverageColor () const |
| Return the average Color of the stars used to construct the Psf. More...
|
|
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() More...
|
|
std::size_t | getCacheCapacity () const |
| Return the capacity of the caches. More...
|
|
void | setCacheCapacity (std::size_t capacity) |
| Set the capacity of the caches. More...
|
|
virtual std::string | toString () const |
| Create a string representation of this object (optional operation). More...
|
|
virtual std::size_t | hash_value () const |
| Return a hash of this object (optional operation). More...
|
|
virtual bool | equals (Storable const &other) const noexcept |
| Compare this object to another Storable. More...
|
|
void | writeFits (std::string const &fileName, std::string const &mode="w") const |
| Write the object to a regular FITS file. More...
|
|
void | writeFits (fits::MemFileManager &manager, std::string const &mode="w") const |
| Write the object to a FITS image in memory. More...
|
|
void | writeFits (fits::Fits &fitsfile) const |
| Write the object to an already-open FITS object. More...
|
|
|
static std::shared_ptr< KernelPsf > | readFits (fits::Fits &fitsfile) |
| Read an object from an already open FITS object. More...
|
|
static std::shared_ptr< KernelPsf > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
| Read an object from a regular FITS file. More...
|
|
static std::shared_ptr< KernelPsf > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
| Read an object from a FITS file in memory. More...
|
|
static std::shared_ptr< KernelPsf > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
| Dynamically cast a shared_ptr. More...
|
|
static std::shared_ptr< ImagePsf > | readFits (fits::Fits &fitsfile) |
| Read an object from an already open FITS object. More...
|
|
static std::shared_ptr< ImagePsf > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
| Read an object from a regular FITS file. More...
|
|
static std::shared_ptr< ImagePsf > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
| Read an object from a FITS file in memory. More...
|
|
static std::shared_ptr< Psf > | readFits (fits::Fits &fitsfile) |
| Read an object from an already open FITS object. More...
|
|
static std::shared_ptr< Psf > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
| Read an object from a regular FITS file. More...
|
|
static std::shared_ptr< Psf > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
| Read an object from a FITS file in memory. More...
|
|
static std::shared_ptr< ImagePsf > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
| Dynamically cast a shared_ptr. More...
|
|
static std::shared_ptr< Psf > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
| Dynamically cast a shared_ptr. More...
|
|
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,0) when xy0 is taken into account) to an image centered at position when xy0 is taken into account. More...
|
|
|
template<class T > |
static bool | singleClassEquals (T const &lhs, Storable const &rhs) |
| Test if a Storable is of a particular class and equal to another object. More...
|
|
A Psf defined by a Kernel.
Definition at line 36 of file KernelPsf.h.
◆ Image
Image type returned by computeImage.
Definition at line 83 of file Psf.h.
◆ OutputArchiveHandle
◆ Pixel
Pixel type of Image returned by computeImage.
Definition at line 82 of file Psf.h.
◆ ImageOwnerEnum
Enum passed to computeImage and computeKernelImage to determine image ownership.
Enumerator |
---|
COPY | The image will be copied before returning; caller will own it.
|
INTERNAL | An internal image will be returned without copying.
The caller must not modify it, and it may be invalidated the next time a Psf member function is called with different color and/or position.
|
Definition at line 86 of file Psf.h.
◆ KernelPsf() [1/2]
Construct a KernelPsf with a clone of the given kernel.
We clone the Kernel in the public constructor to ensure the Psf is immutable after construction (we don't want someone with another copy of the Kernel to be able to modify the one held by the Psf).
Derived classes may use the protected constructor, which takes a shared_ptr to Kernel and does not copy it.
Definition at line 33 of file KernelPsf.cc.
34 :
ImagePsf(!kernel.isSpatiallyVarying()),
35 _kernel(kernel.clone()),
◆ KernelPsf() [2/2]
Construct a KernelPsf with the given kernel; it should not be modified afterwards.
Definition at line 38 of file KernelPsf.cc.
◆ clone()
◆ cloneStorable()
std::shared_ptr<typehandling::Storable> lsst::afw::detection::Psf::cloneStorable |
( |
| ) |
const |
|
inlinefinaloverridevirtualinherited |
◆ computeApertureFlux()
Compute the "flux" of the Psf model within a circular aperture of the given radius.
- Parameters
-
[in] | radius | Radius of the aperture to measure. |
[in] | position | Position to evaluate the PSF at; defaults to getAveragePosition(). |
[in] | color | Color of the source for which to evaluate the PSF; defaults to getAverageColor(). |
The flux is relative to a Psf image that has been normalized to unit integral, and the radius is in pixels.
Definition at line 150 of file Psf.cc.
153 return doComputeApertureFlux(
radius, position, color);
◆ computeBBox()
Return the bounding box of the image returned by computeKernelImage()
Definition at line 128 of file Psf.cc.
131 return doComputeBBox(position, color);
◆ computeImage()
Return an Image of the PSF, in a form that can be compared directly with star images.
The specified position is a floating point number, and the resulting image will have a Psf centered on that point when the returned image's xy0 is taken into account.
The returned image is normalized to sum to unity.
- Parameters
-
[in] | position | Position to evaluate the PSF at; defaults to getAveragePosition(). |
[in] | color | Color of the source for which to evaluate the PSF; defaults to getAverageColor(). |
[in] | owner | Whether to copy the return value or return an internal image that must be handled with care (see ImageOwnerEnum). |
The Psf class caches the most recent return value of computeImage, so repeated calls with the same arguments will be highly optimized.
- Note
- The real work is done in the virtual private member function Psf::doComputeImage; computeImage only handles caching and default arguments.
Definition at line 102 of file Psf.cc.
107 detail::PsfCacheKey(position, color),
108 [
this](detail::PsfCacheKey
const &
key) {
return doComputeImage(
key.position,
key.color); });
◆ computeKernelImage()
Return an Image of the PSF, in a form suitable for convolution.
While the position need not be an integer, the center of the PSF image returned by computeKernelImage will in the center of the center pixel of the image, which will be (0,0) when the Image's xy0 is taken into account; this is the same behavior as Kernel::computeImage().
The returned image is normalized to sum to unity.
- Parameters
-
[in] | position | Position to evaluate the PSF at; defaults to getAveragePosition(). |
[in] | color | Color of the source for which to evaluate the PSF; defaults to getAverageColor(). |
[in] | owner | Whether to copy the return value or return an internal image that must be handled with care (see ImageOwnerEnum). |
The Psf class caches the most recent return value of computeKernelImage, so repeated calls with the same arguments will be highly optimized.
- Note
- The real work is done in the virtual private member function Psf::doComputeKernelImage; computeKernelImage only handles caching and default arguments.
Definition at line 115 of file Psf.cc.
120 detail::PsfCacheKey(position, color),
121 [
this](detail::PsfCacheKey
const &
key) {
return doComputeKernelImage(
key.position,
key.color); });
◆ computePeak()
Return the peak value of the PSF image.
- Parameters
-
This calls computeKernelImage internally, but because this will usually be cached, it shouldn't be expensive (but be careful not to accidentally call it with no arguments when you actually want to call it with the same arguments just used to call computeImage or computeKernelImage).
Definition at line 143 of file Psf.cc.
◆ computeShape()
Compute the ellipse corresponding to the second moments of the Psf.
- Parameters
-
The algorithm used to compute the moments is up to the derived class, and hence this method should not be used when a particular algorithm or weight function is required.
Definition at line 156 of file Psf.cc.
159 return doComputeShape(position, color);
◆ doComputeApertureFlux()
double lsst::meas::algorithms::ImagePsf::doComputeApertureFlux |
( |
double |
radius, |
|
|
geom::Point2D const & |
position, |
|
|
afw::image::Color const & |
color |
|
) |
| const |
|
protectedvirtualinherited |
◆ doComputeShape()
|
protectedvirtualinherited |
◆ dynamicCast() [1/3]
Dynamically cast a shared_ptr.
Dynamically cast a shared pointer and raise on failure.
You must provide an explicit template instantiation in the .cc file for each class that inherits from PersistableFacade. Designed to work around RTTI issues on macOS with hidden symbols;
- Exceptions
-
param[in] ptr The pointer to be cast.
- Returns
- The cast pointer.
- Exceptions
-
Definition at line 218 of file Persistable.cc.
19 auto result = std::dynamic_pointer_cast<T>(
ptr);
21 throw LSST_EXCEPT(pex::exceptions::TypeError,
"Dynamic pointer cast failed");
◆ dynamicCast() [2/3]
Dynamically cast a shared_ptr.
Dynamically cast a shared pointer and raise on failure.
You must provide an explicit template instantiation in the .cc file for each class that inherits from PersistableFacade. Designed to work around RTTI issues on macOS with hidden symbols;
- Exceptions
-
param[in] ptr The pointer to be cast.
- Returns
- The cast pointer.
- Exceptions
-
Definition at line 218 of file Persistable.cc.
19 auto result = std::dynamic_pointer_cast<T>(
ptr);
21 throw LSST_EXCEPT(pex::exceptions::TypeError,
"Dynamic pointer cast failed");
◆ dynamicCast() [3/3]
Dynamically cast a shared_ptr.
Dynamically cast a shared pointer and raise on failure.
You must provide an explicit template instantiation in the .cc file for each class that inherits from PersistableFacade. Designed to work around RTTI issues on macOS with hidden symbols;
- Exceptions
-
param[in] ptr The pointer to be cast.
- Returns
- The cast pointer.
- Exceptions
-
Definition at line 218 of file Persistable.cc.
19 auto result = std::dynamic_pointer_cast<T>(
ptr);
21 throw LSST_EXCEPT(pex::exceptions::TypeError,
"Dynamic pointer cast failed");
◆ equals()
bool lsst::afw::typehandling::Storable::equals |
( |
Storable const & |
other | ) |
const |
|
virtualnoexceptinherited |
◆ getAverageColor()
image::Color lsst::afw::detection::Psf::getAverageColor |
( |
| ) |
const |
|
inlineinherited |
Return the average Color of the stars used to construct the Psf.
This is also the Color used to return an image if you don't specify a Color.
Definition at line 233 of file Psf.h.
◆ getAveragePosition()
geom::Point2D lsst::meas::algorithms::KernelPsf::getAveragePosition |
( |
| ) |
const |
|
overridevirtual |
◆ getCacheCapacity()
std::size_t lsst::afw::detection::Psf::getCacheCapacity |
( |
| ) |
const |
|
inherited |
Return the capacity of the caches.
Both the image and kernel image caches have the same capacity.
Definition at line 170 of file Psf.cc.
170 {
return _kernelImageCache->capacity(); }
◆ getKernel()
boost::shared_ptr< afw::math::Kernel const > lsst::meas::algorithms::KernelPsf::getKernel |
( |
| ) |
const |
|
inline |
Return the Kernel used to define this Psf.
Definition at line 52 of file KernelPsf.h.
◆ getLocalKernel()
Return a FixedKernel corresponding to the Psf image at the given point.
This is implemented by calling computeKernelImage, and is simply provided for convenience.
Definition at line 134 of file Psf.cc.
140 return std::make_shared<math::FixedKernel>(*
image);
◆ getPersistenceName()
std::string lsst::meas::algorithms::KernelPsf::getPersistenceName |
( |
| ) |
const |
|
overrideprotectedvirtual |
◆ getPythonModule()
std::string lsst::meas::algorithms::KernelPsf::getPythonModule |
( |
| ) |
const |
|
overrideprotectedvirtual |
Return the fully-qualified Python module that should be imported to guarantee that its factory is registered.
Must be less than ArchiveIndexSchema::MAX_MODULE_LENGTH characters.
Will be ignored if empty.
Reimplemented from lsst::afw::table::io::Persistable.
Definition at line 70 of file KernelPsf.cc.
70 {
return "lsst.meas.algorithms"; }
◆ hash_value()
std::size_t lsst::afw::typehandling::Storable::hash_value |
( |
| ) |
const |
|
virtualinherited |
◆ isPersistable()
bool lsst::meas::algorithms::KernelPsf::isPersistable |
( |
| ) |
const |
|
overridevirtualnoexcept |
◆ readFits() [1/9]
Read an object from an already open FITS object.
- Parameters
-
[in] | fitsfile | FITS object to read from, already positioned at the desired HDU. |
Definition at line 183 of file Persistable.h.
184 return dynamicCast(Persistable::_readFits(fitsfile));
◆ readFits() [2/9]
Read an object from an already open FITS object.
- Parameters
-
[in] | fitsfile | FITS object to read from, already positioned at the desired HDU. |
Definition at line 183 of file Persistable.h.
184 return dynamicCast(Persistable::_readFits(fitsfile));
◆ readFits() [3/9]
Read an object from an already open FITS object.
- Parameters
-
[in] | fitsfile | FITS object to read from, already positioned at the desired HDU. |
Definition at line 183 of file Persistable.h.
184 return dynamicCast(Persistable::_readFits(fitsfile));
◆ readFits() [4/9]
Read an object from a FITS file in memory.
- Parameters
-
[in] | manager | Manager for the memory to read from. |
[in] | hdu | HDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty. |
Definition at line 205 of file Persistable.h.
206 return dynamicCast(Persistable::_readFits(manager, hdu));
◆ readFits() [5/9]
Read an object from a FITS file in memory.
- Parameters
-
[in] | manager | Manager for the memory to read from. |
[in] | hdu | HDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty. |
Definition at line 205 of file Persistable.h.
206 return dynamicCast(Persistable::_readFits(manager, hdu));
◆ readFits() [6/9]
Read an object from a FITS file in memory.
- Parameters
-
[in] | manager | Manager for the memory to read from. |
[in] | hdu | HDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty. |
Definition at line 205 of file Persistable.h.
206 return dynamicCast(Persistable::_readFits(manager, hdu));
◆ readFits() [7/9]
Read an object from a regular FITS file.
- Parameters
-
[in] | fileName | Name of the file to read. |
[in] | hdu | HDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty. |
Definition at line 194 of file Persistable.h.
195 return dynamicCast(Persistable::_readFits(fileName, hdu));
◆ readFits() [8/9]
Read an object from a regular FITS file.
- Parameters
-
[in] | fileName | Name of the file to read. |
[in] | hdu | HDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty. |
Definition at line 194 of file Persistable.h.
195 return dynamicCast(Persistable::_readFits(fileName, hdu));
◆ readFits() [9/9]
Read an object from a regular FITS file.
- Parameters
-
[in] | fileName | Name of the file to read. |
[in] | hdu | HDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty. |
Definition at line 194 of file Persistable.h.
195 return dynamicCast(Persistable::_readFits(fileName, hdu));
◆ recenterKernelImage()
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.
warpAlgorithm
is passed to afw::math::makeWarpingKernel() and can be "nearest", "bilinear", or "lanczosN"
warpBuffer
zero-pads the image before recentering. Recommended value is 1 for bilinear, N for lanczosN (note that it would be cleaner to infer this value from the warping algorithm but this would require mild API changes; same issue occurs in e.g. afw::math::offsetImage()).
The point with integer coordinates (0,0)
in the source image (with xy0 taken into account) corresponds to the point position
in the destination image. If position
is not integer-valued then we will need to fractionally shift the image using interpolation.
Note: if fractional recentering is performed, then a new image will be allocated and returned. If not, then the original image will be returned (after setting XY0).
Definition at line 86 of file Psf.cc.
94 if (irX.second != 0.0 || irY.second != 0.0) {
◆ resized()
boost::shared_ptr< afw::detection::Psf > lsst::meas::algorithms::KernelPsf::resized |
( |
int |
width, |
|
|
int |
height |
|
) |
| const |
|
overridevirtual |
◆ setCacheCapacity()
void lsst::afw::detection::Psf::setCacheCapacity |
( |
std::size_t |
capacity | ) |
|
|
inherited |
Set the capacity of the caches.
Both the image and kernel image caches will be set to this capacity.
Definition at line 172 of file Psf.cc.
173 _imageCache->reserve(capacity);
174 _kernelImageCache->reserve(capacity);
◆ singleClassEquals()
template<class T >
static bool lsst::afw::typehandling::Storable::singleClassEquals |
( |
T const & |
lhs, |
|
|
Storable const & |
rhs |
|
) |
| |
|
inlinestaticprotectedinherited |
Test if a Storable is of a particular class and equal to another object.
This method template simplifies implementations of equals that delegate to operator==
without supporting cross-class comparisons.
- Template Parameters
-
T | The class expected of the two objects to be compared. |
- Parameters
-
lhs,rhs | The objects to compare. Note that rhs need not be a T , while lhs must be. |
- Returns
true
if rhs
is a T
and lhs == rhs
; false
otherwise.
- Exception Safety\n Provides the same level of exception safety as operator==.
- Most implementations of
operator==
do not throw.
- Note
- This method template calls
operator==
with both arguments of compile-time type T const&
. Its use is not recommended if there would be any ambiguity as to which operator==
gets picked by overload resolution.
This method template is typically called from equals as:
bool MyType::equals(Storable const& other) const noexcept {
return singleClassEquals(*this, other);
}
Definition at line 151 of file Storable.h.
152 auto typedRhs =
dynamic_cast<T const*
>(&rhs);
153 if (typedRhs !=
nullptr) {
154 return lhs == *typedRhs;
◆ toString()
std::string lsst::afw::typehandling::Storable::toString |
( |
| ) |
const |
|
virtualinherited |
◆ write()
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.
Reimplemented from lsst::afw::table::io::Persistable.
Reimplemented in lsst::meas::algorithms::SingleGaussianPsf.
Definition at line 72 of file KernelPsf.cc.
75 PTR(afw::table::BaseRecord) record = catalog.addNew();
76 record->set(
keys.kernel, handle.put(_kernel));
77 record->set(
keys.averagePosition, _averagePosition);
78 handle.saveCatalog(catalog);
◆ writeFits() [1/3]
void lsst::afw::table::io::Persistable::writeFits |
( |
fits::Fits & |
fitsfile | ) |
const |
|
inherited |
Write the object to an already-open FITS object.
- Parameters
-
[in] | fitsfile | Open FITS object to write to. |
Definition at line 18 of file Persistable.cc.
19 OutputArchive archive;
21 archive.writeFits(fitsfile);
◆ writeFits() [2/3]
Write the object to a FITS image in memory.
- Parameters
-
[in] | manager | Name of the file to write to. |
[in] | mode | If "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file. |
Definition at line 29 of file Persistable.cc.
◆ writeFits() [3/3]
void lsst::afw::table::io::Persistable::writeFits |
( |
std::string const & |
fileName, |
|
|
std::string const & |
mode = "w" |
|
) |
| const |
|
inherited |
Write the object to a regular FITS file.
- Parameters
-
[in] | fileName | Name of the file to write to. |
[in] | mode | If "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file. |
Definition at line 24 of file Persistable.cc.
◆ KernelPsfFactory
template<typename T , typename K >
◆ operator<<()
Output operator for Storable.
- Parameters
-
os | the desired output stream |
storable | the object to print |
- Returns
- a reference to
os
- Exceptions
-
UnsupportedOperationException | Thrown if storable does not have an implementation of Storable::toString. |
Definition at line 174 of file Storable.h.
175 return os << storable.toString();
The documentation for this class was generated from the following files:
- /j/snowflake/release/lsstsw/stack/1a1d771/Linux64/meas_algorithms/20.0.0/include/lsst/meas/algorithms/KernelPsf.h
- /j/snowflake/release/lsstsw/stack/1a1d771/Linux64/meas_algorithms/20.0.0/src/KernelPsf.cc
ImagePsf(bool isFixed=false)
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
void writeFits(std::string const &fileName, std::string const &mode="w") const
Write the object to a regular FITS file.
@ INTERNAL
An internal image will be returned without copying.
int positionToIndex(double pos)
Convert image position to nearest integer index.
virtual std::shared_ptr< Psf > clone() const =0
Polymorphic deep-copy.
afw::table::PointKey< double > averagePosition
bool isIndeterminate() const noexcept
Whether the color is the special value that indicates that it is unspecified.
static KernelPsfPersistenceHelper const & get()
static Result computeAdaptiveMoments(ImageT const &image, geom::Point2D const &position, bool negative=false, Control const &ctrl=Control())
Compute the adaptive Gaussian-weighted moments of an image.
image::Image< Pixel > Image
Image type returned by computeImage.
ItemVariant const * other
@ COPY
The image will be copied before returning; caller will own it.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
static Result computeSincFlux(afw::image::Image< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
Compute the instFlux (and optionally, uncertanties) within an aperture using Sinc photometry.
int getX0() const
Return the image's column-origin.
CatalogT< BaseRecord > BaseCatalog
image::Color getAverageColor() const
Return the average Color of the stars used to construct the Psf.
static std::shared_ptr< KernelPsf > 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.
Shape const getShape() const
Return an afw::geom::ellipses object corresponding to xx, yy, xy.
void setXY0(lsst::geom::Point2I const origin)
Set the ImageBase's origin.
int getY0() const
Return the image's row-origin.
virtual lsst::geom::Point2D getAveragePosition() const
Return the average position of the stars used to construct 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.