24 #ifndef LSST_MEAS_MODELFIT_SoftenedLinearPrior_h_INCLUDED
25 #define LSST_MEAS_MODELFIT_SoftenedLinearPrior_h_INCLUDED
30 namespace lsst {
namespace meas {
namespace modelfit {
36 "Maximum ellipticity magnitude (conformal shear units)"
41 "Ellipticity magnitude (conformal shear units) at which the softened cutoff begins"
51 "ln(radius) at which the softened cutoff begins towards the minimum"
61 "ln(radius) at which the softened cutoff begins towards the maximum"
66 "The ratio P(logRadiusMinInner)/P(logRadiusMaxInner)"
90 ndarray::Array<Scalar const,1,1>
const & nonlinear,
91 ndarray::Array<Scalar const,1,1>
const &
amplitudes
96 ndarray::Array<Scalar const,1,1>
const & nonlinear,
97 ndarray::Array<Scalar const,1,1>
const &
amplitudes,
98 ndarray::Array<Scalar,1,1>
const & nonlinearGradient,
99 ndarray::Array<Scalar,1,1>
const & amplitudeGradient,
100 ndarray::Array<Scalar,2,1>
const & nonlinearHessian,
101 ndarray::Array<Scalar,2,1>
const & amplitudeHessian,
102 ndarray::Array<Scalar,2,1>
const & crossHessian
108 ndarray::Array<Scalar const,1,1>
const & nonlinear
114 ndarray::Array<Scalar const,1,1>
const & nonlinear,
121 ndarray::Array<Scalar const,1,1>
const & nonlinear,
123 ndarray::Array<Scalar,2,1>
const &
amplitudes,
124 ndarray::Array<Scalar,1,1>
const & weights,
125 bool multiplyWeights=
false
132 Scalar _evaluate(ndarray::Array<Scalar const,1,1>
const & nonlinear)
const;
136 double _logRadiusSlope;
137 double _logRadiusMinRampFraction;
138 double _logRadiusMaxRampFraction;
139 double _ellipticityMaxRampFraction;
140 Eigen::Matrix<double,4,1,Eigen::DontAlign> _logRadiusPoly1;
141 Eigen::Matrix<double,4,1,Eigen::DontAlign> _logRadiusPoly2;
142 Eigen::Matrix<double,4,1,Eigen::DontAlign> _ellipticityPoly;
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...
Base class for Bayesian priors.
A prior that's linear in radius and flat in ellipticity, with a cubic roll-off at the edges.
SoftenedLinearPrior(Control const &ctrl=Control())
SoftenedLinearPriorControl Control
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 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.
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.
Control const & getControl() const
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.
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.
#define LSST_CONTROL_FIELD(NAME, TYPE, DOC)
A preprocessor macro used to define fields in C++ "control object" structs.
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.
double logRadiusMinMaxRatio
"The ratio P(logRadiusMinInner)/P(logRadiusMaxInner)" ;
double ellipticityMaxInner
"Ellipticity magnitude (conformal shear units) at which the softened cutoff begins" ;
double logRadiusMinInner
"ln(radius) at which the softened cutoff begins towards the minimum" ;
SoftenedLinearPriorControl()
double logRadiusMaxInner
"ln(radius) at which the softened cutoff begins towards the maximum" ;
double ellipticityMaxOuter
"Maximum ellipticity magnitude (conformal shear units)" ;
double logRadiusMaxOuter
"Maximum ln(radius)" ;
double logRadiusMinOuter
"Minimum ln(radius)" ;