Class MultiShapeletBasis¶
Defined in File MultiShapeletBasis.h
Class Documentation¶
-
class
MultiShapeletBasis
¶ A basis formed from a linear combination of shapelet bases that differ only in radius.
A MultiShapeletBasis can have many “components” (shapelet bases with different orders and radii), which are mapped via matrices into one or more “elements”. It’s common for a basis to have only one or two elements, representing a galaxy model that is a linear combination of one or two radial profiles. It’s also common for most components to be zeroth order (Gaussians), as higher- order shapelet terms don’t provide much of an advantage when approximating axisymmetric functions.
MultiShapeletBasis itself provides the interface to define these multi-Gaussian approximations and combine and refine them, and delegates the work of defining them to MultiShapeletFunction (via the makeFunction() method) and the MultiShapeletMatrixBuilder class. MultiShapeletFunction is a more user-friendly and versatile approach, intended for debugging and testing, while the MultiShapletMatrixBuilder approach is intended for performance-critical evaluation of PSF-convolved MultiShapeletBasis objects.
Unnamed Group
-
Iterator
begin
() const¶ Iterator over the components (distinct shapelet bases) of the MultiShapeletBasis.
Public Types
-
typedef MultiShapeletBasisComponent
Component
¶
-
typedef ComponentVector::const_iterator
Iterator
¶
Public Functions
-
MultiShapeletBasis
(int size)¶ Construct a MultiShapeletBasis with the given number of elements (i.e. free amplitudes).
-
int
getSize
() const¶ Return the number of elements (i.e. free amplitudes) in the MultiShapeletBasis.
-
int
getComponentCount
() const¶ Return the number of components (distinct shapelet bases) in the MultiShapeletBasis.
-
void
addComponent
(double radius, int order, ndarray::Array<double const, 2, 2> const &matrix)¶ Add a new component (shapelet basis) to the MultiShapeletBasis.
Should usually only be called by MultiShapeletBasis::addComponent.
Note that matrix elements follow the amplitude convention defined by
ShapeletFunction; values are proportional to flux, not surface brightness.- Parameters
[in] radius
: Radius of the shapelet expansion defined by this component.[in] order
: Order of the shapelet expansion.[in] matrix
: Matrix whose elements [i,j] map MultiShapeletBasis elements j to shapelet terms i; must have dimensions [computeSize(order), basis.getSize()], where “basis” is the MultiShapeletBasis this component is attached to. Will be deep-copied by the constructor.
-
void
scale
(double factor)¶ Multiply the radius of all basis elements by the given factor.
-
void
normalize
()¶ Rescale all matrices so each element has unit flux.
-
void
merge
(MultiShapeletBasis const &other)¶ Combine the given basis with this (in place), by appending its elements.
-
MultiShapeletFunction
makeFunction
(afw::geom::ellipses::Ellipse const &ellipse, ndarray::Array<double const, 1, 1> const &coefficients) const¶ Create a MultiShapeletFunction from the basis.
- Parameters
[in] ellipse
: Shapelet basis ellipse that will define the MultiShapeletFunction (will be scaled by the radius of each component).[in] coefficients
: Coefficients of the basis elements.
-
Iterator