File ShapeletFunction.h¶
-
namespace
lsst
Class for a simple mapping implementing a generic AstrometryTransform.
Remove all non-astronomical counts from the Chunk Exposure’s pixels.
Forward declarations for lsst::utils::Cache
For details on the Cache class, see the Cache.h file.
It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.
A base class for image defects
Numeric constants used by the Integrate.h integrator routines.
Compute Image Statistics
- Note
Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.
- Note
The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.
-
namespace
shapelet
-
class
ShapeletFunction
- #include <ShapeletFunction.h>
A 2-d function defined by an expansion onto a Gauss-Laguerre or Gauss-Hermite basis.
The coefficients are in units of flux, not surface brightness; increasing the area of the basis ellipse while leaving the coefficients unchanged will decrease the surface brightness by the ratio of the areas of the new and old ellipses. This convention is necessary to ensure that convolution with a delta function is sane. Because the BasisEvaluator class does not deal with ellipses, it is necessary to divide its output by R^2 to get the same result as a ShapeletFunctionEvaluator whose ellipse has determinant radius of R.
The coefficient normalization is not identical to that of a Gaussian, however; a zeroth-order ShapeletFunction with its only coefficient value set to 1 has a flux of 2.0 * pi^(1/2). This value is defined as ShapeletFunction::FLUX_FACTOR. Of course, to get the flux of a more complex shapelet expansion you have to use ShapeletFunctionEvaluator::integrate().
Note that the units of the coefficients would have to be radius for basis functions with the same ellipse to be orthonormal, but this orthonormality isn’t very useful, because the basis functions aren’t even orthogonal in the more common case that the ellipses differ. However, basis functions defined on the unit circle are still orthonormal.
Public Types
-
typedef std::shared_ptr<ShapeletFunction>
Ptr
-
typedef std::shared_ptr<ShapeletFunction const>
ConstPtr
-
typedef ShapeletFunctionEvaluator
Evaluator
Public Functions
-
int
getOrder
() const Return the maximum order (inclusive), either \(n_x + n_y\) or \(p + q\).
-
BasisTypeEnum
getBasisType
() const Return the basis type (HERMITE or LAGUERRE).
-
void
changeBasisType
(BasisTypeEnum basisType) Change the basis type and convert coefficients in-place correspondingly.
-
void
normalize
(double value = 1.0) Normalize the integral of the shapelet function to the given value.
-
ndarray::Array<double, 1, 1> const
getCoefficients
() Return the coefficient vector.
-
ndarray::Array<double const, 1, 1> const
getCoefficients
() const Return the coefficient vector (const).
-
ShapeletFunction
convolve
(ShapeletFunction const &other) const Convolve the shapelet function.
-
ShapeletFunctionEvaluator
evaluate
() const Construct a helper object that can efficiently evaluate the function.
-
void
shiftInPlace
(geom::Extent2D const &offset) Shift the shapelet function by shifting the basis ellipse.
-
void
transformInPlace
(geom::AffineTransform const &transform) Transform the shapelet function by transforming the basis ellipse.
-
ShapeletFunction
(int order, BasisTypeEnum basisType) Construct a function with a unit-circle ellipse and set all coefficients to zero.
-
ShapeletFunction
(int order, BasisTypeEnum basisType, ndarray::Array<double, 1, 1> const &coefficients) Construct a function with a unit-circle ellipse and a deep-copied coefficient vector.
-
ShapeletFunction
(int order, BasisTypeEnum basisType, double radius, geom::Point2D const ¢er = geom::Point2D()) Construct a function with a circular ellipse and set all coefficients to zero.
-
ShapeletFunction
(int order, BasisTypeEnum basisType, double radius, geom::Point2D const ¢er, ndarray::Array<double, 1, 1> const &coefficients) Construct a function with a circular ellipse and a deep-copied coefficient vector.
-
ShapeletFunction
(int order, BasisTypeEnum basisType, afw::geom::ellipses::Ellipse const &ellipse) Construct a function and set all coefficients to zero.
-
ShapeletFunction
(int order, BasisTypeEnum basisType, afw::geom::ellipses::Ellipse const &ellipse, ndarray::Array<double const, 1, 1> const &coefficients) Construct a function with a deep-copied coefficient vector.
-
ShapeletFunction
(ShapeletFunction const &other) Copy constructor (deep).
-
ShapeletFunction &
operator=
(ShapeletFunction const &other) Assignment (deep).
-
ShapeletFunction
() Default constructor to appease SWIG (used by std::list). Not for use by users.
Public Static Attributes
-
double const
FLUX_FACTOR
-
typedef std::shared_ptr<ShapeletFunction>
-
class
ShapeletFunctionEvaluator
- #include <ShapeletFunction.h>
Evaluates a ShapeletFunction.
This is distinct from ShapeletFunction to allow the evaluator to construct temporaries and allocate workspace that will be reused when evaluating at multiple points.
A ShapeletFunctionEvaluator is invalidated whenever the ShapeletFunction it was constructed from is modified.
Public Types
-
typedef std::shared_ptr<ShapeletFunctionEvaluator>
Ptr
-
typedef std::shared_ptr<ShapeletFunctionEvaluator const>
ConstPtr
Public Functions
-
double
operator()
(double x, double y) const Evaluate at the given point.
-
double
operator()
(geom::Point2D const &point) const Evaluate at the given point.
-
double
operator()
(geom::Extent2D const &point) const Evaluate at the given point.
-
ndarray::Array<double, 1, 1>
operator()
(ndarray::Array<double const, 1> const &x, ndarray::Array<double const, 1> const &y) const Evaluate at the given points, returning a newly-allocated array.
-
void
addToImage
(ndarray::Array<double, 2, 1> const &array, geom::Point2I const &xy0 = geom::Point2I()) const Add the function to the given image-like array.
-
double
integrate
() const Compute the definite integral or integral moments.
-
afw::geom::ellipses::Ellipse
computeMoments
() const Return the unweighted dipole and quadrupole moments of the function as an ellipse.
-
void
update
(ShapeletFunction const &function) Update the evaluator from the given function.
-
ShapeletFunctionEvaluator
(ShapeletFunction const &function) Construct an evaluator for the given function.
Private Functions
-
void
_computeRawMoments
(double &q0, Eigen::Vector2d &q1, Eigen::Matrix2d &q2) const¶
Private Members
-
double
_normalization
¶
-
ndarray::Array<double const, 1, 1>
_coefficients
¶
-
geom::AffineTransform
_transform
¶
Friends
-
friend
lsst::shapelet::MultiShapeletFunctionEvaluator
-
typedef std::shared_ptr<ShapeletFunctionEvaluator>
-
class