25 #ifndef LSST_AFW_MATH_SHAPELETS_SHAPELETFUNCTION_H 26 #define LSST_AFW_MATH_SHAPELETS_SHAPELETFUNCTION_H 38 namespace lsst {
namespace shapelet {
40 class ShapeletFunctionEvaluator;
93 _basisType = basisType;
103 ndarray::Array<double const,1,1>
const getCoefficients()
const {
return _coefficients; }
137 ndarray::Array<double,1,1>
const & coefficients
148 ndarray::Array<double const,1,1>
const & coefficients
165 ndarray::Array<double,1,1> _coefficients;
190 return _normalization * _h.sumEvaluation(_coefficients, _transform(point));
195 return _normalization * _h.sumEvaluation(_coefficients, _transform(point));
199 ndarray::Array<double,1,1> operator()(
200 ndarray::Array<double const,1>
const &
x,
201 ndarray::Array<double const,1>
const &
y 206 ndarray::Array<double,2,1>
const & array,
217 return _h.sumIntegration(_coefficients);
233 void _computeRawMoments(
double & q0, Eigen::Vector2d & q1, Eigen::Matrix2d & q2)
const;
235 double _normalization;
236 ndarray::Array<double const,1,1> _coefficients;
247 #endif // !defined(LSST_AFW_MATH_SHAPELETS_SHAPELETFUNCTION_H) void setEllipse(afw::geom::ellipses::Ellipse const &ellipse)
Set the ellipse.
lsst::geom::Point2D const & getCenter() const
Return the center point.
void shiftInPlace(geom::Extent2D const &offset)
Shift the shapelet function by shifting the basis ellipse.
std::shared_ptr< ShapeletFunctionEvaluator > Ptr
void changeBasisType(BasisTypeEnum basisType)
Change the basis type and convert coefficients in-place correspondingly.
A class to evaluate HERMITE shapelet-related quantities.
ndarray::Array< double, 1, 1 > const getCoefficients()
Return the coefficient vector.
ItemVariant const * other
int getOrder() const
Return the maximum order (inclusive), either or .
afw::geom::ellipses::Ellipse const & getEllipse() const
Get the ellipse (const).
Evaluates a MultiShapeletFunction.
double integrate() const
Compute the definite integral or integral moments.
A base class for image defects.
std::shared_ptr< ShapeletFunctionEvaluator const > ConstPtr
Evaluates a ShapeletFunction.
BasisTypeEnum getBasisType() const
Return the basis type (HERMITE or LAGUERRE).
afw::geom::ellipses::Ellipse & getEllipse()
Get the ellipse (non-const).
ndarray::Array< double const, 1, 1 > const getCoefficients() const
Return the coefficient vector (const).
An ellipse defined by an arbitrary BaseCore and a center point.
void normalize(double value=1.0)
Normalize the integral of the shapelet function to the given value.
double operator()(geom::Extent2D const &point) const
Evaluate at the given point.
std::shared_ptr< ShapeletFunction const > ConstPtr
Evaluator evaluate() const
Construct a helper object that can efficiently evaluate the function.
std::shared_ptr< ShapeletFunction > Ptr
lsst::geom::Point2I getXY0() const
Return the image's origin.
static void convertCoefficientVector(ndarray::Array< double, 1 > const &array, BasisTypeEnum input, BasisTypeEnum output, int order)
Convert a coefficient vector between basis types in-place.
ShapeletFunctionEvaluator Evaluator
double operator()(geom::Point2D const &point) const
Evaluate at the given point.
void addToImage(boost::shared_ptr< afw::image::Image< double > > image, std::vector< boost::shared_ptr< afw::image::Image< double > >> const &imgVector, std::vector< double > const &weightVector)
static double const FLUX_FACTOR
void addToImage(afw::image::Image< double > &image) const
Evaluate the function on the given image.
Constants, typedefs, and general-purpose functions for shapelets library.
ShapeletFunction()
Default constructor to appease SWIG (used by std::list). Not for use by users.
ShapeletFunction convolve(ShapeletFunction const &other) const
Convolve the shapelet function.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
double operator()(double x, double y) const
Evaluate at the given point.
void transformInPlace(geom::AffineTransform const &transform)
Transform the shapelet function by transforming the basis ellipse.
A 2-d function defined by an expansion onto a Gauss-Laguerre or Gauss-Hermite basis.
Transformer transform(lsst::geom::AffineTransform const &transform)
A class to represent a 2-dimensional array of pixels.
ndarray::Array< double const, 2, 2 > coefficients
ShapeletFunction & operator=(ShapeletFunction const &other)
Assignment (deep).