File MultiShapeletBasis.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 MultiShapeletBasis
#include <MultiShapeletBasis.h>

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.

Iterator end() const

Public Types

typedef MultiShapeletBasisComponent Component
typedef std::vector<Component> ComponentVector
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.

Private Members

int _size
ComponentVector _components
class MultiShapeletBasisComponent
#include <MultiShapeletBasis.h>

Simple struct that represents one shapelet expansion in a MultiShapeletBasis.

A MultiShapeletBasis is formed by the linear combination of several shapelet bases with different radii and common ellipticity; this represents a single shapelet basis within the MultiShapeletBasis.

Note

This really ought to be an inner class, and should generally be referred to via the MultiShapeletBasis::Component typedef, but Swig doesn’t handle inner classes.

Public Functions

MultiShapeletBasisComponent(double radius, int order, ndarray::Array<double const, 2, 2> const &matrix)

Main constructor for MultiShapeletBasisComponent.

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.

double getRadius() const

Return the radius of this shapelet expansion.

int getOrder() const

Order of this shapelet expansion.

ndarray::Array<double const, 2, 2> getMatrix() const

Matrix whose elements [i,j] map MultiShapeletBasis elements j to shapelet terms i.

Private Members

double _radius
int _order
ndarray::Array<double const, 2, 2> _matrix

Friends

friend lsst::shapelet::MultiShapeletBasis