|
| | GaussianPsf (int width, int height, double sigma) |
| | Constructor for a GaussianPsf. More...
|
| |
| | GaussianPsf (lsst::geom::Extent2I const &dimensions, double sigma) |
| | Constructor for a GaussianPsf. More...
|
| |
| | ~GaussianPsf () override |
| |
| | GaussianPsf (GaussianPsf const &) |
| |
| | GaussianPsf (GaussianPsf &&) |
| |
| GaussianPsf & | operator= (GaussianPsf const &)=delete |
| |
| GaussianPsf & | operator= (GaussianPsf &&)=delete |
| |
| std::shared_ptr< afw::detection::Psf > | clone () const override |
| | Polymorphic deep copy; should usually be unnecessary because Psfs are immutable. More...
|
| |
| std::shared_ptr< afw::detection::Psf > | resized (int width, int height) const override |
| | Return a clone with specified kernel dimensions. More...
|
| |
| lsst::geom::Extent2I | getDimensions () const |
| | Return the dimensions of the images returned by computeImage() More...
|
| |
| double | getSigma () const |
| | Return the radius of the Gaussian. More...
|
| |
| bool | isPersistable () const noexcept override |
| | Whether the Psf is persistable; always true. 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...
|
| |
| virtual lsst::geom::Point2D | getAveragePosition () const |
| | Return the average position 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...
|
| |
| std::string | repr () const |
| |
| void | markPersistent (void) |
| |
| memId | getId () const |
| |
| 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< GaussianPsf > | readFits (fits::Fits &fitsfile) |
| | Read an object from an already open FITS object. More...
|
| |
| static std::shared_ptr< GaussianPsf > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
| | Read an object from a regular FITS file. More...
|
| |
| static std::shared_ptr< GaussianPsf > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
| | Read an object from a FITS file in memory. More...
|
| |
| static std::shared_ptr< GaussianPsf > | 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...
|
| |
| static bool | hasBeenCorrupted () |
| |
| static memId | getNextMemId () |
| |
| static int | init () |
| |
| static int | census (int, memId startingMemId=0) |
| |
| static void | census (std::ostream &stream, memId startingMemId=0) |
| |
| static const std::vector< const Citizen *> * | census () |
| |
| static int | census (int, memId startingMemId=0) |
| |
| static void | census (std::ostream &stream, memId startingMemId=0) |
| |
| static const std::vector< const Citizen *> * | census () |
| |
| static memId | setNewCallbackId (memId id) |
| |
| static memId | setNewCallbackId (memId id) |
| |
| static memId | setDeleteCallbackId (memId id) |
| |
| static memId | setDeleteCallbackId (memId id) |
| |
| static memNewCallback | setNewCallback (memNewCallback func) |
| |
| static memCallback | setDeleteCallback (memCallback func) |
| |
| static memCallback | setCorruptionCallback (memCallback func) |
| |
| 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< Psf > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
| | Dynamically cast a shared_ptr. More...
|
| |
A circularly symmetric Gaussian Psf class with no spatial variation, intended mostly for testing purposes.
This class is essentially an alternate implementation of meas::algorithms::SingleGaussianPsf; While SingleGaussianPsf inherits from ImagePsf and KernelPsf, and hence delegates to those various operations relating to the PSF model image (e.g. computeShape()), GaussianPsf computes these analytically.
Definition at line 42 of file GaussianPsf.h.
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 103 of file Psf.cc.
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 116 of file Psf.cc.
| bool lsst::afw::typehandling::Storable::equals |
( |
Storable const & |
other | ) |
const |
|
virtualnoexceptinherited |
Compare this object to another Storable.
Subclasses that implement equality comparison must override this method to give results consistent with operator== for all inputs that are accepted by both.
- Returns
- This implementation returns whether the two objects are the same.
- Warning
- This method compares an object to any type of Storable, although cross-class comparisons should usually return
false. If cross-class comparisons are valid, implementers should take care that they are symmetric and will give the same result no matter what the compile-time types of the left- and right-hand sides are.
- See also
- singleClassEquals
Reimplemented in lsst::afw::image::PhotoCalib, lsst::afw::geom::SkyWcs, lsst::afw::geom::polygon::Polygon, lsst::afw::image::Filter, and lsst::afw::image::VisitInfo.
Definition at line 48 of file Storable.cc.
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 87 of file Psf.cc.
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
- 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 136 of file Storable.h.