24 #ifndef LSST_MEAS_MODELFIT_MixturePrior_h_INCLUDED
25 #define LSST_MEAS_MODELFIT_MixturePrior_h_INCLUDED
30 namespace lsst {
namespace meas {
namespace modelfit {
42 ndarray::Array<Scalar const,1,1>
const & nonlinear,
43 ndarray::Array<Scalar const,1,1>
const &
amplitudes
48 ndarray::Array<Scalar const,1,1>
const & nonlinear,
49 ndarray::Array<Scalar const,1,1>
const &
amplitudes,
50 ndarray::Array<Scalar,1,1>
const & nonlinearGradient,
51 ndarray::Array<Scalar,1,1>
const & amplitudeGradient,
52 ndarray::Array<Scalar,2,1>
const & nonlinearHessian,
53 ndarray::Array<Scalar,2,1>
const & amplitudeHessian,
54 ndarray::Array<Scalar,2,1>
const & crossHessian
60 ndarray::Array<Scalar const,1,1>
const & nonlinear
66 ndarray::Array<Scalar const,1,1>
const & nonlinear,
73 ndarray::Array<Scalar const,1,1>
const & nonlinear,
76 ndarray::Array<Scalar,1,1>
const & weights,
77 bool multiplyWeights=
false
table::Key< table::Array< double > > amplitudes
A class that can be used to generate sequences of random numbers according to a number of different a...
A prior that's flat in amplitude parameters, and uses a Mixture for nonlinear parameters.
void evaluateDerivatives(ndarray::Array< Scalar const, 1, 1 > const &nonlinear, ndarray::Array< Scalar const, 1, 1 > const &litudes, ndarray::Array< Scalar, 1, 1 > const &nonlinearGradient, ndarray::Array< Scalar, 1, 1 > const &litudeGradient, ndarray::Array< Scalar, 2, 1 > const &nonlinearHessian, ndarray::Array< Scalar, 2, 1 > const &litudeHessian, ndarray::Array< Scalar, 2, 1 > const &crossHessian) const override
Evaluate the derivatives of the prior at the given point in nonlinear and amplitude space.
Scalar marginalize(Vector const &gradient, Matrix const &hessian, ndarray::Array< Scalar const, 1, 1 > const &nonlinear) const override
Return the -log amplitude integral of the prior*likelihood product.
MixturePrior(boost::shared_ptr< Mixture const > mixture, std::string const &tag="")
Scalar maximize(Vector const &gradient, Matrix const &hessian, ndarray::Array< Scalar const, 1, 1 > const &nonlinear, ndarray::Array< Scalar, 1, 1 > const &litudes) const override
Compute the amplitude vector that maximizes the prior x likelihood product.
static MixtureUpdateRestriction const & getUpdateRestriction()
Return a MixtureUpdateRestriction appropriate for (e1,e2,r) data.
boost::shared_ptr< Mixture const > getMixture() const
void drawAmplitudes(Vector const &gradient, Matrix const &fisher, ndarray::Array< Scalar const, 1, 1 > const &nonlinear, afw::math::Random &rng, ndarray::Array< Scalar, 2, 1 > const &litudes, ndarray::Array< Scalar, 1, 1 > const &weights, bool multiplyWeights=false) const override
Draw a set of Monte Carlo amplitude vectors.
Scalar evaluate(ndarray::Array< Scalar const, 1, 1 > const &nonlinear, ndarray::Array< Scalar const, 1, 1 > const &litudes) const override
Evaluate the prior at the given point in nonlinear and amplitude space.
Helper class used to define restrictions to the form of the component parameters in Mixture::updateEM...
Base class for Bayesian priors.
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
double Scalar
Typedefs to be used for probability and parameter values.
A base class for image defects.