LSST Applications g0265f82a02+0e5473021a,g02d81e74bb+bd2ed33bd6,g1470d8bcf6+de7501a2e0,g14a832a312+ff425fae3c,g2079a07aa2+86d27d4dc4,g2305ad1205+91a32aca49,g295015adf3+762506a1ad,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g3ddfee87b4+c34e8be1fa,g487adcacf7+5fae3daba8,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+ea1711114f,g5a732f18d5+53520f316c,g64a986408d+bd2ed33bd6,g858d7b2824+bd2ed33bd6,g8a8a8dda67+585e252eca,g99cad8db69+016a06b37a,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+ef4e3a5875,gb0e22166c9+60f28cb32d,gb6a65358fc+0e5473021a,gba4ed39666+c2a2e4ac27,gbb8dafda3b+09e12c87ab,gc120e1dc64+bc2e06c061,gc28159a63d+0e5473021a,gcf0d15dbbd+c34e8be1fa,gdaeeff99f8+f9a426f77a,ge6526c86ff+508d0e0a30,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gf18bd8381d+8d59551888,gf1cff7945b+bd2ed33bd6,w.2024.16
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
lsst::shapelet::ShapeletFunction Class Reference

A 2-d function defined by an expansion onto a Gauss-Laguerre or Gauss-Hermite basis. More...

#include <ShapeletFunction.h>

Public Types

typedef std::shared_ptr< ShapeletFunctionPtr
 
typedef std::shared_ptr< ShapeletFunction const > ConstPtr
 
typedef ShapeletFunctionEvaluator Evaluator
 

Public Member Functions

int getOrder () const
 Return the maximum order (inclusive), either \(n_x + n_y\) or \(p + q\).
 
afw::geom::ellipses::Ellipse const & getEllipse () const
 Get the ellipse (const).
 
afw::geom::ellipses::EllipsegetEllipse ()
 Get the ellipse (non-const).
 
void setEllipse (afw::geom::ellipses::Ellipse const &ellipse)
 Set the ellipse.
 
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.
 
Evaluator 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 &center=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 &center, 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).
 
ShapeletFunctionoperator= (ShapeletFunction const &other)
 Assignment (deep).
 
 ShapeletFunction ()
 Default constructor to appease SWIG (used by std::list). Not for use by users.
 

Static Public Attributes

static double const FLUX_FACTOR
 

Detailed Description

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.

Definition at line 65 of file ShapeletFunction.h.

Member Typedef Documentation

◆ ConstPtr

Definition at line 69 of file ShapeletFunction.h.

◆ Evaluator

Definition at line 71 of file ShapeletFunction.h.

◆ Ptr

Definition at line 68 of file ShapeletFunction.h.

Constructor & Destructor Documentation

◆ ShapeletFunction() [1/8]

lsst::shapelet::ShapeletFunction::ShapeletFunction ( int order,
BasisTypeEnum basisType )

Construct a function with a unit-circle ellipse and set all coefficients to zero.

◆ ShapeletFunction() [2/8]

lsst::shapelet::ShapeletFunction::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() [3/8]

lsst::shapelet::ShapeletFunction::ShapeletFunction ( int order,
BasisTypeEnum basisType,
double radius,
geom::Point2D const & center = geom::Point2D() )

Construct a function with a circular ellipse and set all coefficients to zero.

◆ ShapeletFunction() [4/8]

lsst::shapelet::ShapeletFunction::ShapeletFunction ( int order,
BasisTypeEnum basisType,
double radius,
geom::Point2D const & center,
ndarray::Array< double, 1, 1 > const & coefficients )

Construct a function with a circular ellipse and a deep-copied coefficient vector.

◆ ShapeletFunction() [5/8]

lsst::shapelet::ShapeletFunction::ShapeletFunction ( int order,
BasisTypeEnum basisType,
afw::geom::ellipses::Ellipse const & ellipse )

Construct a function and set all coefficients to zero.

◆ ShapeletFunction() [6/8]

lsst::shapelet::ShapeletFunction::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() [7/8]

lsst::shapelet::ShapeletFunction::ShapeletFunction ( ShapeletFunction const & other)

Copy constructor (deep).

◆ ShapeletFunction() [8/8]

lsst::shapelet::ShapeletFunction::ShapeletFunction ( )

Default constructor to appease SWIG (used by std::list). Not for use by users.

Member Function Documentation

◆ changeBasisType()

void lsst::shapelet::ShapeletFunction::changeBasisType ( BasisTypeEnum basisType)
inline

Change the basis type and convert coefficients in-place correspondingly.

Definition at line 91 of file ShapeletFunction.h.

91 {
92 ConversionMatrix::convertCoefficientVector(_coefficients, _basisType, basisType, _order);
93 _basisType = basisType;
94 }
static void convertCoefficientVector(ndarray::Array< double, 1 > const &array, BasisTypeEnum input, BasisTypeEnum output, int order)
Convert a coefficient vector between basis types in-place.

◆ convolve()

ShapeletFunction lsst::shapelet::ShapeletFunction::convolve ( ShapeletFunction const & other) const

Convolve the shapelet function.

◆ evaluate()

ShapeletFunctionEvaluator lsst::shapelet::ShapeletFunction::evaluate ( ) const
inline

Construct a helper object that can efficiently evaluate the function.

Definition at line 241 of file ShapeletFunction.h.

241 {
242 return ShapeletFunctionEvaluator(*this);
243}

◆ getBasisType()

BasisTypeEnum lsst::shapelet::ShapeletFunction::getBasisType ( ) const
inline

Return the basis type (HERMITE or LAGUERRE).

Definition at line 88 of file ShapeletFunction.h.

88{ return _basisType; }

◆ getCoefficients() [1/2]

ndarray::Array< double, 1, 1 > const lsst::shapelet::ShapeletFunction::getCoefficients ( )
inline

Return the coefficient vector.

Definition at line 100 of file ShapeletFunction.h.

100{ return _coefficients; }

◆ getCoefficients() [2/2]

ndarray::Array< double const, 1, 1 > const lsst::shapelet::ShapeletFunction::getCoefficients ( ) const
inline

Return the coefficient vector (const).

Definition at line 103 of file ShapeletFunction.h.

103{ return _coefficients; }

◆ getEllipse() [1/2]

afw::geom::ellipses::Ellipse & lsst::shapelet::ShapeletFunction::getEllipse ( )
inline

Get the ellipse (non-const).

Definition at line 82 of file ShapeletFunction.h.

82{ return _ellipse; }

◆ getEllipse() [2/2]

afw::geom::ellipses::Ellipse const & lsst::shapelet::ShapeletFunction::getEllipse ( ) const
inline

Get the ellipse (const).

Definition at line 79 of file ShapeletFunction.h.

79{ return _ellipse; }

◆ getOrder()

int lsst::shapelet::ShapeletFunction::getOrder ( ) const
inline

Return the maximum order (inclusive), either \(n_x + n_y\) or \(p + q\).

Definition at line 76 of file ShapeletFunction.h.

76{ return _order; }

◆ normalize()

void lsst::shapelet::ShapeletFunction::normalize ( double value = 1.0)

Normalize the integral of the shapelet function to the given value.

◆ operator=()

ShapeletFunction & lsst::shapelet::ShapeletFunction::operator= ( ShapeletFunction const & other)

Assignment (deep).

◆ setEllipse()

void lsst::shapelet::ShapeletFunction::setEllipse ( afw::geom::ellipses::Ellipse const & ellipse)
inline

Set the ellipse.

Definition at line 85 of file ShapeletFunction.h.

85{ _ellipse = ellipse; }

◆ shiftInPlace()

void lsst::shapelet::ShapeletFunction::shiftInPlace ( geom::Extent2D const & offset)
inline

Shift the shapelet function by shifting the basis ellipse.

Definition at line 112 of file ShapeletFunction.h.

112 {
113 _ellipse.getCenter() += offset;
114 }
lsst::geom::Point2D const & getCenter() const
Return the center point.
Definition Ellipse.h:62

◆ transformInPlace()

void lsst::shapelet::ShapeletFunction::transformInPlace ( geom::AffineTransform const & transform)
inline

Transform the shapelet function by transforming the basis ellipse.

Definition at line 117 of file ShapeletFunction.h.

117 {
118 _ellipse.transform(transform).inPlace();
119 }
void inPlace()
Transform the ellipse in-place.
Transformer transform(lsst::geom::AffineTransform const &transform)

Member Data Documentation

◆ FLUX_FACTOR

double const lsst::shapelet::ShapeletFunction::FLUX_FACTOR
static

Definition at line 73 of file ShapeletFunction.h.


The documentation for this class was generated from the following file: