24 #ifndef LSST_MEAS_MODELFIT_Likelihood_h_INCLUDED
25 #define LSST_MEAS_MODELFIT_Likelihood_h_INCLUDED
27 #include "ndarray_fwd.h"
29 #include "lsst/pex/exceptions.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()),
142 pex::exceptions::LengthError,
143 "Fixed parameter vector size (%d) does not match Model fixed parameter dimensionality (%d)"
157 #endif // !LSST_MEAS_MODELFIT_Likelihood_h_INCLUDED
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, 1, 1 > _unweightedData
int getNonlinearDim() const
Return the number of nonlinear parameters (which parameterize the model matrix)
Likelihood & operator=(const Likelihood &)=delete
int getAmplitudeDim() const
Return the number of linear parameters (columns of the model matrix)
float Pixel
Typedefs to be used for pixel values.
double Scalar
Typedefs to be used for probability and parameter values.
int getDataDim() const
Return the number of data points.
Abstract base class and concrete factories that define multi-shapelet galaxy models.
int getFixedDim() const
Return the number of fixed nonlinear parameters.
Likelihood(const Likelihood &)=delete
Likelihood(boost::shared_ptr< Model > model, ndarray::Array< Scalar const, 1, 1 > const &fixed)
ndarray::Array< Scalar const, 1, 1 > getFixed() const
Return the vector of fixed nonlinear parameters.
ndarray::Array< Pixel, 1, 1 > _data
ndarray::Array< Pixel, 1, 1 > _weights
ndarray::Array< Pixel const, 1, 1 > getData() const
Return the vector of weighted, scaled data points .
Base class for optimizer/sampler likelihood functions that compute likelihood at a point...
ndarray::Array< Scalar const, 1, 1 > _fixed
ndarray::Array< Pixel, 1, 1 > _variance
ndarray::Array< Pixel const, 1, 1 > getWeights() const
Return the vector of weights applied to data points and model matrix rows.
ndarray::Array< Pixel const, 1, 1 > getUnweightedData() const
Return the vector of unweighted data points .
int getFixedDim() const
Return the number of fixed nonlinear parameters (set on Likelihood construction)
ndarray::Array< Pixel const, 1, 1 > getVariance() const
Return the vector of per-data-point variances.
boost::shared_ptr< Model > getModel() const
Return an object that defines the model and its parameters.
boost::shared_ptr< Model > _model