24 #ifndef LSST_MEAS_MODELFIT_Likelihood_h_INCLUDED
25 #define LSST_MEAS_MODELFIT_Likelihood_h_INCLUDED
27 #include "ndarray_fwd.h"
33 namespace lsst {
namespace meas {
namespace modelfit {
121 ndarray::Array<Pixel,2,-1>
const & modelMatrix,
122 ndarray::Array<Scalar const,1,1>
const & nonlinear,
123 bool doApplyWeights=
true
141 fixed.getSize<0>(),
static_cast<std::size_t>(model->getFixedDim()),
143 "Fixed parameter vector size (%d) does not match Model fixed parameter dimensionality (%d)"
#define LSST_THROW_IF_NE(N1, N2, EXC_CLASS, MSG)
Check whether the given values are equal, and throw an LSST Exception if they are not.
Base class for optimizer/sampler likelihood functions that compute likelihood at a point.
ndarray::Array< Pixel, 1, 1 > _variance
ndarray::Array< Pixel const, 1, 1 > getVariance() const
Return the vector of per-data-point variances.
ndarray::Array< Pixel const, 1, 1 > getData() const
Return the vector of weighted, scaled data points .
Likelihood(const Likelihood &)=delete
Likelihood & operator=(const Likelihood &)=delete
ndarray::Array< Scalar const, 1, 1 > getFixed() const
Return the vector of fixed nonlinear parameters.
std::shared_ptr< Model > _model
int getDataDim() const
Return the number of data points.
ndarray::Array< Pixel, 1, 1 > _data
Likelihood(Likelihood &&)=delete
ndarray::Array< Pixel const, 1, 1 > getWeights() const
Return the vector of weights applied to data points and model matrix rows.
ndarray::Array< Scalar const, 1, 1 > _fixed
virtual void computeModelMatrix(ndarray::Array< Pixel, 2,-1 > const &modelMatrix, ndarray::Array< Scalar const, 1, 1 > const &nonlinear, bool doApplyWeights=true) const =0
Evaluate the model for the given vector of nonlinear parameters.
ndarray::Array< Pixel const, 1, 1 > getUnweightedData() const
Return the vector of unweighted data points .
int getNonlinearDim() const
Return the number of nonlinear parameters (which parameterize the model matrix)
ndarray::Array< Pixel, 1, 1 > _unweightedData
std::shared_ptr< Model > getModel() const
Return an object that defines the model and its parameters.
ndarray::Array< Pixel, 1, 1 > _weights
int getAmplitudeDim() const
Return the number of linear parameters (columns of the model matrix)
int getFixedDim() const
Return the number of fixed nonlinear parameters (set on Likelihood construction)
Likelihood(std::shared_ptr< Model > model, ndarray::Array< Scalar const, 1, 1 > const &fixed)
Reports attempts to exceed implementation-defined length limits for some classes.
A base class for image defects.