LSST Applications g1653933729+b86e4b8053,g2303c004a3+7a9f81fab8,g28da252d5a+fa526343b8,g2bbee38e9b+2d3ef731f8,g2bc492864f+2d3ef731f8,g2cdde0e794+ed7a12f8c9,g3156d2b45e+b0ccf75d80,g347aa1857d+2d3ef731f8,g35bb328faa+b86e4b8053,g3a166c0a6a+2d3ef731f8,g3e281a1b8c+ffc3dc1f6e,g414038480c+28b4cb0ab6,g42360bd172+7a9f81fab8,g461a3dce89+b86e4b8053,g5c9cb89fa5+9543a9a537,g7f102674c4+ae0b5e0d9c,g7f343241b9+f1af73f4dd,g80478fca09+43612671ef,g82479be7b0+b53791e409,g858d7b2824+7a9f81fab8,g8cd86fa7b1+e690011a40,g9125e01d80+b86e4b8053,g979bb04a14+f1d038bb8c,g9ddcbc5298+b4cb6f9276,ga44b09e51c+892bfc8707,ga5288a1d22+c219b1b90b,gae0086650b+b86e4b8053,gc28159a63d+2d3ef731f8,gcd45df26be+7a9f81fab8,gcf0d15dbbd+fb9f8fc3a2,gda6a2b7d83+fb9f8fc3a2,gdaeeff99f8+b9455e0a82,ge5cf12406b+5667261091,ge79ae78c31+2d3ef731f8,ge7c99ddb59+5fbad68458,geb408df1e3+2fe46b4317,gf048a9a2f4+8beaee1f08,gf0baf85859+122dc4ce2f,w.2024.32
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.