LSST Applications g063fba187b+cac8b7c890,g0f08755f38+6aee506743,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+b4475c5878,g1dcb35cd9c+8f9bc1652e,g20f6ffc8e0+6aee506743,g217e2c1bcf+73dee94bd0,g28da252d5a+1f19c529b9,g2bbee38e9b+3f2625acfc,g2bc492864f+3f2625acfc,g3156d2b45e+6e55a43351,g32e5bea42b+1bb94961c2,g347aa1857d+3f2625acfc,g35bb328faa+a8ce1bb630,g3a166c0a6a+3f2625acfc,g3e281a1b8c+c5dd892a6c,g3e8969e208+a8ce1bb630,g414038480c+5927e1bc1e,g41af890bb2+8a9e676b2a,g7af13505b9+809c143d88,g80478fca09+6ef8b1810f,g82479be7b0+f568feb641,g858d7b2824+6aee506743,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+2903d499ea,gb58c049af0+d64f4d3760,gc28159a63d+3f2625acfc,gcab2d0539d+b12535109e,gcf0d15dbbd+46a3f46ba9,gda6a2b7d83+46a3f46ba9,gdaeeff99f8+1711a396fd,ge79ae78c31+3f2625acfc,gef2f8181fd+0a71e47438,gf0baf85859+c1f95f4921,gfa517265be+6aee506743,gfa999e8aa5+17cd334064,w.2024.51
LSST Data Management Base Package
|
A concrete Model class that simply concatenates several other Models. More...
#include <MultiModel.h>
Public Types | |
enum | CenterEnum { FIXED_CENTER = 0x0 , SINGLE_CENTER = 0x1 , MULTI_CENTER = 0x2 } |
typedef std::vector< std::string > | NameVector |
typedef std::vector< std::shared_ptr< shapelet::MultiShapeletBasis > > | BasisVector |
typedef std::vector< afw::geom::ellipses::Ellipse > | EllipseVector |
typedef std::vector< afw::geom::ellipses::Ellipse >::iterator | EllipseIterator |
typedef std::vector< afw::geom::ellipses::Ellipse >::const_iterator | EllipseConstIterator |
Public Member Functions | |
MultiModel (ModelVector components, NameVector const &prefixes) | |
Construct a new MultiModel. | |
ModelVector const & | getComponents () const |
Return the vector of constituent models. | |
std::shared_ptr< Prior > | adaptPrior (std::shared_ptr< Prior > prior) const override |
Given an arbitrary prior, return one compatible with this Model or throw LogicError. | |
EllipseVector | makeEllipseVector () const override |
Return an uninitialized vector of afw::geom::ellipses::Ellipse with the parametrization expected by readEllipses() and writeEllipses(). | |
void | writeEllipses (Scalar const *nonlinearIter, Scalar const *fixedIter, EllipseIterator ellipseIter) const override |
Convert a set of nonlinear+fixed parameter arrays to a vector of ellipses. | |
void | readEllipses (EllipseConstIterator ellipseIter, Scalar *nonlinearIter, Scalar *fixedIter) const override |
Convert a vector of ellipses to a set of nonlinear+fixed parameter arrays. | |
int | getNonlinearDim () const |
Return the number of free nonlinear parameters. | |
int | getAmplitudeDim () const |
Return the number of linear parameters. | |
int | getFixedDim () const |
Return the number of fixed nonlinear parameters. | |
int | getBasisCount () const |
Return the number of MultiShapeletBasis objects (equivalently, the number of ellipses) | |
NameVector const & | getNonlinearNames () const |
Return the names of the free nonlinear parameters. | |
NameVector const & | getAmplitudeNames () const |
Return the names of the amplitude parameters. | |
NameVector const & | getFixedNames () const |
Return the names of the fixed nonlinear parameters. | |
BasisVector const & | getBasisVector () const |
Return the MultiShapeletBasis objects that comprise the Model. | |
shapelet::MultiShapeletFunction | makeShapeletFunction (ndarray::Array< Scalar const, 1, 1 > const &nonlinear, ndarray::Array< Scalar const, 1, 1 > const &litudes, ndarray::Array< Scalar const, 1, 1 > const &fixed) const |
Create a MultiShapeletFunction object from a set of parameter vectors. | |
EllipseVector | writeEllipses (ndarray::Array< Scalar const, 1, 1 > const &nonlinear, ndarray::Array< Scalar const, 1, 1 > const &fixed) const |
Convert a set of nonlinear+fixed parameter arrays to a vector of ellipses. | |
void | readEllipses (EllipseVector const &ellipses, ndarray::Array< Scalar, 1, 1 > const &nonlinear, ndarray::Array< Scalar, 1, 1 > const &fixed) const |
Convert a vector of ellipses to a set of nonlinear+fixed parameter arrays. | |
virtual void | transformParameters (LocalUnitTransform const &transform, ndarray::Array< Scalar, 1, 1 > const &nonlinear, ndarray::Array< Scalar, 1, 1 > const &litudes, ndarray::Array< Scalar, 1, 1 > const &fixed) const |
Transform (in-place) parameter vectors from one unit system to another. | |
Static Public Member Functions | |
static std::shared_ptr< Model > | make (BasisVector basisVector, NameVector const &prefixes, CenterEnum center) |
Construct a concrete Model instance with multiple ellipses and multishapelet bases. | |
static std::shared_ptr< Model > | make (std::shared_ptr< shapelet::MultiShapeletBasis > basis, CenterEnum center) |
Construct a concrete Model instance with a single ellipse and multishapelet basis. | |
static std::shared_ptr< Model > | makeGaussian (CenterEnum center, double radius=1.0) |
Construct a concrete Model instance that represents a single elliptical Gaussian function. | |
A concrete Model class that simply concatenates several other Models.
Definition at line 34 of file MultiModel.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Enumerator | |
---|---|
FIXED_CENTER | |
SINGLE_CENTER | |
MULTI_CENTER |
|
explicit |
Construct a new MultiModel.
[in] | components | A vector of other Models to combine |
[in] | prefixes | A vector of name prefixes used to construct parameter names, one for each element in components. |
|
overridevirtual |
Given an arbitrary prior, return one compatible with this Model or throw LogicError.
Implements lsst::meas::modelfit::Model.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
Return the vector of constituent models.
Definition at line 47 of file MultiModel.h.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
staticinherited |
Construct a concrete Model instance with multiple ellipses and multishapelet bases.
This can be used to construct a multi-component model (for instance, a bulge-disk decomposition), using MultiShapeletBasis objects such as those loaded by the lsst.shapelet.tractor module.
[in] | basisVector | A vector of MultiShapeletBasis objects, one for each component. Each component will have a separate set of ellipse parameters. |
[in] | prefixes | A vector of parameter name prefixes, one for each basis. These will be prepended to the names described in the documentation for the other overload of make(). |
[in] | center | An enum specifying whether the different components should have a fixed center (FIXED_CENTER), the same center (SINGLE_CENTER), or independent centers (MULTI_CENTER). |
|
staticinherited |
Construct a concrete Model instance with a single ellipse and multishapelet basis.
This can be used to construct a single-component model (e.g. a single fixed-index Sersic profile), or a linear combination model with only one ellipse.
[in] | basis | A MultiShapeletBasis object, of the sort provided by the lsst.shapelet.tractor module. |
[in] | center | An enum specifying whether the model should have a fixed center (FIXED_CENTER) or parametrized center (SINGLE_CENTER or MULTI_CENTER). |
The names of the nonlinear and fixed parameters will be ["eta1", "eta2", "logR", "x", "y"], with "x" and "y" in the fixed parameters if center==FIXED_CENTER. The amplitudes will be labeled "alphaN", where "N" is an integer starting from 0.
As implied by the parameter names, the ellipse is parametrized using afw::geom::ellipses::SeparableConformalShearLogTraceRadius. For the basis objects provided by lsst.shapelet.tractor, that generally means that logR=0 corresponds to the half-light radius.
|
overridevirtual |
Return an uninitialized vector of afw::geom::ellipses::Ellipse with the parametrization expected by readEllipses() and writeEllipses().
Implements lsst::meas::modelfit::Model.
|
staticinherited |
Construct a concrete Model instance that represents a single elliptical Gaussian function.
The Models returned by this method use the same ellipse parametrization and naming schemes as those returned by make().
[in] | center | An enum specifying whether the model should have a fixed center (FIXED_CENTER) or parametrized center (SINGLE_CENTER or MULTI_CENTER). |
[in] | radius | The radius at which logR=0, in units of the Gaussian sigma parameter (i.e. radius=1 corresponds to a model in which the radius parameter is ln(sigma)). |
|
inherited |
Create a MultiShapeletFunction object from a set of parameter vectors.
|
overridevirtual |
Convert a vector of ellipses to a set of nonlinear+fixed parameter arrays.
[in] | ellipseIter | Iterator to the beginning of an ellipse vector, as returned by makeEllipseVector(). |
[out] | nonlinearIter | Pointer to the beginning of a nonlinear parameter array. |
[out] | fixedIter | Pointer to the beginning of a fixed parameter array. |
Implements lsst::meas::modelfit::Model.
|
inherited |
Convert a vector of ellipses to a set of nonlinear+fixed parameter arrays.
[in] | ellipses | An ellipse vector, as returned by makeEllipseVector(). |
[out] | nonlinear | Output nonlinear parameter array. |
[out] | fixed | Output fixed parameter array. |
|
virtualinherited |
Transform (in-place) parameter vectors from one unit system to another.
The default implementation transforms nonlinear and fixed parameters by converting them to ellipses, transforming the ellipses, and converting back to parameters. The amplitudes are simply multiplied by transform.flux. Subclasses for which this isn't appropriate should override.
|
inherited |
Convert a set of nonlinear+fixed parameter arrays to a vector of ellipses.
[in] | nonlinear | nonlinear parameter array. |
[in] | fixed | fixed parameter array. |
This is a convenient method that combines the call to makeEllipseVector() with a call to the other overload of writeEllipses(), for cases when there is no need to reuse an existing ellipse vector.
|
overridevirtual |
Convert a set of nonlinear+fixed parameter arrays to a vector of ellipses.
[in] | nonlinearIter | Pointer to the beginning of a nonlinear parameter array. |
[in] | fixedIter | Pointer to the beginning of a fixed parameter array. |
[out] | ellipseIter | Iterator to the beginning of an ellipse vector, as returned by makeEllipseVector(). |
Implements lsst::meas::modelfit::Model.