LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
23 #ifndef LSST_SHAPELET_MatrixBuilder_h_INCLUDED
24 #define LSST_SHAPELET_MatrixBuilder_h_INCLUDED
32 namespace lsst {
namespace shapelet {
34 class MultiShapeletBasis;
71 ndarray::Array<T const,1,1>
const &
x,
72 ndarray::Array<T const,1,1>
const &
y,
86 ndarray::Array<T const,1,1>
const &
x,
87 ndarray::Array<T const,1,1>
const &
y,
100 ndarray::Array<T const,1,1>
const &
x,
101 ndarray::Array<T const,1,1>
const &
y,
115 ndarray::Array<T const,1,1>
const &
x,
116 ndarray::Array<T const,1,1>
const &
y,
139 ndarray::Array<T,2,-1>
const & output,
151 (*this)(output, ellipse);
187 template <
typename T>
191 typedef Eigen::Map< Eigen::Array<T,Eigen::Dynamic,Eigen::Dynamic> >
Matrix;
192 typedef Eigen::Map< Eigen::Array<T,Eigen::Dynamic,1> >
Vector;
204 _current(
other._current),
206 _manager(
other._manager)
224 ndarray::Manager::Ptr
getManager()
const {
return _manager; }
234 ndarray::Manager::Ptr _manager;
264 template <
typename T>
265 class MatrixBuilderFactory {
281 ndarray::Array<T const,1,1>
const &
x,
282 ndarray::Array<T const,1,1>
const &
y,
296 ndarray::Array<T const,1,1>
const &
x,
297 ndarray::Array<T const,1,1>
const &
y,
310 ndarray::Array<T const,1,1>
const &
x,
311 ndarray::Array<T const,1,1>
const &
y,
325 ndarray::Array<T const,1,1>
const &
x,
326 ndarray::Array<T const,1,1>
const &
y,
352 #endif // !LSST_SHAPELET_MatrixBuilder_h_INCLUDED
Eigen::Map< Eigen::Array< T, Eigen::Dynamic, Eigen::Dynamic > > Matrix
Workspace matrix type.
MatrixBuilderFactory< T > Factory
Factory type associated with this builder.
MatrixBuilder(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, int order)
Create a MatrixBuilder that evaluates a simple non-compound shapelet basis.
MatrixBuilder(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, MultiShapeletBasis const &basis, MultiShapeletFunction const &psf)
Create a MatrixBuilder that evaluates a MultiShapeletBasis object after convolving it with a MultiSha...
Eigen::Map< Eigen::Array< T, Eigen::Dynamic, 1 > > Vector
Workspace vector type.
MatrixBuilderFactory(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, int order)
Create a MatrixBuilder that evaluates a simple non-compound shapelet basis.
MatrixBuilderWorkspace< T > Workspace
Workspace type associated with this builder.
int getRemaining() const
Return the size (in units of sizeof(T)) of the unused memory in the workspace.
Class that evaluates a (multi-)shapelet basis at predefined points.
MatrixBuilder< T > operator()(Workspace &workspace) const
Return a new MatrixBuilder using the given workspace.
A basis formed from a linear combination of shapelet bases that differ only in radius.
MatrixBuilderWorkspace(MatrixBuilderWorkspace const &other)
Copy the current state of the workspace, allowing multiple MatrixBuilders to start their workspace ar...
ndarray::Array< T, 2,-2 > allocateOutput() const
Return a matrix appropriate for use as an output for operator().
Constants, typedefs, and general-purpose functions for shapelets library.
A 2-d function defined by an expansion onto a Gauss-Laguerre or Gauss-Hermite basis.
MatrixBuilder(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, MultiShapeletBasis const &basis)
Create a MatrixBuilder that evaluates a MultiShapeletBasis object.
ItemVariant const * other
ndarray::Manager::Ptr getManager() const
Return the manager object that owns the block of memory.
int getBasisSize() const
Return the number of basis elements.
MatrixBuilderFactory(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, MultiShapeletBasis const &basis)
Create a MatrixBuilder that evaluates a MultiShapeletBasis object.
void operator()(ndarray::Array< T, 2,-1 > const &output, afw::geom::ellipses::Ellipse const &ellipse) const
Fill an array with the model matrix.
int getBasisSize() const
Return the number of basis elements.
table::Key< table::Array< double > > basis
Matrix makeMatrix(int rows, int cols)
Create a matrix from the workspace memory, and increment the current location accordingly.
A factory class for MatrixBuilder, providing more control over workspace memory.
A base class for image defects.
An ellipse defined by an arbitrary BaseCore and a center point.
int getDataSize() const
Return the number of data points.
MatrixBuilderFactory(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, int order, ShapeletFunction const &psf)
Create a MatrixBuilder that evaluates a simple non-compound shapelet basis after convolving it with a...
Reusable, shareable workspace for MatrixBuilder.
Vector makeVector(int size)
Create a vector from the workspace memory, and increment the current location accordingly.
int getDataSize() const
Return the number of data points.
MatrixBuilderFactory(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, MultiShapeletBasis const &basis, MultiShapeletFunction const &psf)
Create a MatrixBuilder that evaluates a MultiShapeletBasis object after convolving it with a MultiSha...
MatrixBuilderWorkspace(int size)
Allocate a block of memory with the given number of elements (of type T).
MatrixBuilder< T > operator()() const
Return a new MatrixBuilder with internal, unshared workspace.
MatrixBuilder< T > Builder
Associated builder class.
A multi-scale shapelet function.
void increment(int size)
Manually increment the current location.
MatrixBuilder(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, int order, ShapeletFunction const &psf)
Create a MatrixBuilder that evaluates a simple non-compound shapelet basis after convolving it with a...
int computeWorkspace() const
Return the size of the workspace needed for this MatrixBuilder, in elements of T.
ndarray::Array< T, 2,-2 > operator()(afw::geom::ellipses::Ellipse const &ellipse) const
Return a newly-allocated model matrix.
MatrixBuilderWorkspace< T > Workspace
Associated workspace class.