LSST Applications g013ef56533+b8d55c8942,g083dd6704c+a047e97985,g199a45376c+0ba108daf9,g1fd858c14a+7a3b874d60,g210f2d0738+7416ca6900,g262e1987ae+1d557ba9a3,g29ae962dfc+519d34895e,g2cef7863aa+aef1011c0b,g30d7c61c20+36d16ea71a,g35bb328faa+8c5ae1fdc5,g3fd5ace14f+cb326ad149,g47891489e3+f459a6810c,g53246c7159+8c5ae1fdc5,g54cd7ddccb+890c8e1e5d,g5a60e81ecd+6240c63dbc,g64539dfbff+7416ca6900,g67b6fd64d1+f459a6810c,g6ebf1fc0d4+8c5ae1fdc5,g74acd417e5+0bae3c876a,g786e29fd12+668abc6043,g87389fa792+8856018cbb,g89139ef638+f459a6810c,g8d7436a09f+dee7680868,g8ea07a8fe4+81eaaadc04,g90f42f885a+34c0557caf,g97be763408+14b8164b5b,g98a1a72a9c+8389601a76,g98df359435+fff771c62d,gb8cb2b794d+6728931916,gbf99507273+8c5ae1fdc5,gc2a301910b+7416ca6900,gca7fc764a6+f459a6810c,gd7ef33dd92+f459a6810c,gdab6d2f7ff+0bae3c876a,ge410e46f29+f459a6810c,ge41e95a9f2+7416ca6900,geaed405ab2+e3b4b2a692,gf9a733ac38+8c5ae1fdc5,w.2025.43
LSST Data Management Base Package
Loading...
Searching...
No Matches
gaussianprior.h
Go to the documentation of this file.
1#ifndef LSST_GAUSS2D_FIT_LSQPRIOR_H
2#define LSST_GAUSS2D_FIT_LSQPRIOR_H
3
4#include <memory>
5
7
8#include "param_defs.h"
9#include "prior.h"
10
11namespace lsst::gauss2d::fit {
15class GaussianPrior : public Prior {
16public:
25 explicit GaussianPrior(std::shared_ptr<const ParamBase> param, double mean, double stddev,
26 bool transformed);
28
29 PriorEvaluation evaluate(bool calc_jacobians = false, bool normalize_loglike = false) const override;
30
31 const ParamBase& get_param() const;
32
34 double get_mean() const;
35 double get_stddev() const;
36 bool get_transformed() const;
37
38 void set_mean(double mean);
39 void set_stddev(double stddev);
40 void set_transformed(bool transformed);
41
42 size_t size() const override;
43
44 std::string repr(bool name_keywords = false,
45 std::string_view namespace_separator = Object::CC_NAMESPACE_SEPARATOR) const override;
46 std::string str() const override;
47
48private:
50 double _mean;
51 double _stddev;
52 bool _transformed;
53};
54} // namespace lsst::gauss2d::fit
55
56#endif
static constexpr std::string_view CC_NAMESPACE_SEPARATOR
The C++ namespace separator.
Definition object.h:45
PriorEvaluation evaluate(bool calc_jacobians=false, bool normalize_loglike=false) const override
Evaluate the log likelihood and residual-dependent terms.
GaussianPrior(std::shared_ptr< const ParamBase > param, double mean, double stddev, bool transformed)
Construct a GaussianPrior from a Parameter and mean/std.
size_t size() const override
void set_transformed(bool transformed)
std::string str() const override
Return a brief, human-readable string representation of this.
std::vector< double > get_loglike_const_terms() const override
Return the constant terms of the log likelihood (dependent on stddevs only)
const ParamBase & get_param() const
std::string repr(bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
Return a full, callable string representation of this.
Results from the evaluation of a prior probability function.
Definition prior.h:16
Interface for a prior probability function.
Definition prior.h:38
lsst::modelfit::parameters::ParameterBase< double > ParamBase
Definition param_defs.h:9