LSST Applications g034a557a3c+0df69e75ff,g0afe43252f+b86e4b8053,g11f7dcd041+017865fdd3,g1cd03abf6b+1c8dc8730a,g1ce3e0751c+f991eae79d,g28da252d5a+a136f03385,g2bbee38e9b+b6588ad223,g2bc492864f+b6588ad223,g2cdde0e794+8523d0dbb4,g347aa1857d+b6588ad223,g35bb328faa+b86e4b8053,g3a166c0a6a+b6588ad223,g461a3dce89+b86e4b8053,g52b1c1532d+b86e4b8053,g6233c72cae+da9c58a417,g7f3b0d46df+ad13c1b82d,g80478fca09+f29c5d6c70,g858d7b2824+4fc997592f,g8cd86fa7b1+5f14beadf5,g965a9036f2+4fc997592f,g979bb04a14+87f76c17e6,g9ddcbc5298+f24b38b85a,gae0086650b+b86e4b8053,gbb886bcc26+77117948e7,gc28159a63d+b6588ad223,gc30aee3386+a2f0f6cab9,gcaf7e4fdec+4fc997592f,gcd45df26be+4fc997592f,gcdd4ae20e8+0acf6430b1,gcf0d15dbbd+0acf6430b1,gdaeeff99f8+006e14e809,gdbce86181e+467b805b48,ge3d4d395c2+224150c836,ge5f7162a3a+1d9667e7ad,ge6cb8fbbf7+0992c83eee,ge79ae78c31+b6588ad223,gf048a9a2f4+41d6ddaca1,gf0baf85859+b4cca3d10f,w.2024.30
LSST Data Management Base Package
Loading...
Searching...
No Matches
source.h
Go to the documentation of this file.
1#ifndef LSST_GAUSS2D_FIT_SOURCE_H
2#define LSST_GAUSS2D_FIT_SOURCE_H
3
4#include <memory>
5
6#include "component.h"
7#include "componentmixture.h"
8#include "param_filter.h"
9
10namespace lsst::gauss2d::fit {
22class Source : public ComponentMixture {
23public:
24 explicit Source(Components& components);
25
26 void add_extra_param_map(const Channel& channel, ExtraParamMap& map_extra, const GradParamMap& map_grad,
27 ParameterMap& offsets) const override;
28 void add_extra_param_factors(const Channel& channel, ExtraParamFactors& factors) const override;
29 void add_grad_param_map(const Channel& channel, GradParamMap& map, ParameterMap& offsets) const override;
30 void add_grad_param_factors(const Channel& channel, GradParamFactors& factors) const override;
31
32 Components get_components() const override;
34 size_t get_n_gaussians(const Channel& channel) const override;
35
36 ParamRefs& get_parameters(ParamRefs& params, ParamFilter* filter = nullptr) const override;
37 ParamCRefs& get_parameters_const(ParamCRefs& params, ParamFilter* filter = nullptr) const override;
38
39 void set_extra_param_factors(const Channel& channel, ExtraParamFactors& factors,
40 size_t index) const override;
41 void set_grad_param_factors(const Channel& channel, GradParamFactors& factors,
42 size_t index) 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:
49 Components _components = {};
50};
51
52} // namespace lsst::gauss2d::fit
53
54#endif
table::Key< table::Array< int > > components
static constexpr std::string_view CC_NAMESPACE_SEPARATOR
The C++ namespace separator.
Definition object.h:45
An observational channel, usually representing some range of wavelengths of light.
Definition channel.h:29
A list of related Component instances.
An association of physically-related Component instances.
Definition source.h:22
void add_grad_param_factors(const Channel &channel, GradParamFactors &factors) const override
Add Parameter gradient factors to an existing map.
Definition source.cc:33
std::unique_ptr< const lsst::gauss2d::Gaussians > get_gaussians(const Channel &channel) const override
Return the vector of Gaussian sub-components controlled by this model.
Definition source.cc:39
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.
Definition source.cc:79
std::string str() const override
Return a brief, human-readable string representation of this.
Definition source.cc:86
void add_grad_param_map(const Channel &channel, GradParamMap &map, ParameterMap &offsets) const override
Add Parameter gradient indices to an existing map.
Definition source.cc:29
ParamRefs & get_parameters(ParamRefs &params, ParamFilter *filter=nullptr) const override
Add Parameter refs matching the filter to a vector, in order.
Definition source.cc:55
void set_grad_param_factors(const Channel &channel, GradParamFactors &factors, size_t index) const override
Set Parameter gradient factors in an existing map.
Definition source.cc:72
ParamCRefs & get_parameters_const(ParamCRefs &params, ParamFilter *filter=nullptr) const override
Same as get_parameters(), but for const refs.
Definition source.cc:60
void add_extra_param_map(const Channel &channel, ExtraParamMap &map_extra, const GradParamMap &map_grad, ParameterMap &offsets) const override
Add extra Parameter indices to a map.
Definition source.cc:20
Source(Components &components)
Definition source.cc:9
void set_extra_param_factors(const Channel &channel, ExtraParamFactors &factors, size_t index) const override
Set extra Parameter gradient factors in an existing map.
Definition source.cc:65
void add_extra_param_factors(const Channel &channel, ExtraParamFactors &factors) const override
Add extra Parameter gradient factors to an existing vector.
Definition source.cc:25
size_t get_n_gaussians(const Channel &channel) const override
Return the number of Gaussian sub-components controlled by this model.
Definition source.cc:49
Components get_components() const override
Definition source.cc:37
Options for filtering Parameter instances.