1#ifndef LSST_GAUSS2D_FIT_LINEARINTEGRALMODEL_H
2#define LSST_GAUSS2D_FIT_LINEARINTEGRALMODEL_H
9#include "integralmodel.h"
11namespace lsst::gauss2d::fit {
18 typedef std::pair<std::reference_wrapper<const Channel>, std::shared_ptr<IntegralParameterD>>
19 ChannelIntegralParameterD;
20 typedef std::vector<ChannelIntegralParameterD> Data;
33 std::shared_ptr<IntegralParameterD>
at(
const Channel &channel);
35 std::shared_ptr<const IntegralParameterD>
at(
const Channel &channel)
const;
37 typename Data::iterator begin()
noexcept;
38 typename Data::const_iterator cbegin()
const noexcept;
40 typename Data::iterator end()
noexcept;
41 typename Data::const_iterator cend()
const noexcept;
43 std::vector<std::reference_wrapper<const Channel>>
get_channels()
const override;
46 const Channel &channel)
const override;
54 std::string repr(
bool name_keywords =
false,
55 std::string_view namespace_separator = Object::CC_NAMESPACE_SEPARATOR)
const override;
56 std::string str()
const override;
58 const bool operator<(
const IntegralModel &m)
const {
return &(*this) < &m; };
59 const bool operator==(
const IntegralModel &m)
const {
return &(*this) == &m; };
60 const bool operator!=(
const IntegralModel &m)
const {
return &(*this) != &m; };
66 std::map<std::reference_wrapper<const Channel>, std::shared_ptr<IntegralParameterD>> _map = {};
67 struct Shared_enabler;
An observational channel, usually representing some range of wavelengths of light.
Definition channel.h:29
A Parametric model for the integral of a 2D distribution.
Definition integralmodel.h:23
LinearIntegralModel(const Data *data_in)
Definition linearintegralmodel.cc:12
ParamCRefs & get_parameters_const(ParamCRefs ¶ms, ParamFilter *filter=nullptr) const override
Same as get_parameters(), but for const refs.
Definition linearintegralmodel.cc:72
std::vector< std::reference_wrapper< const Channel > > get_channels() const override
Get the set of channels this instance is applicable for.
Definition linearintegralmodel.cc:35
std::shared_ptr< IntegralParameterD > at(const Channel &channel)
Get the IntegralParameterD for the given Channel.
Definition linearintegralmodel.cc:50
std::vector< std::pair< ParamBaseCRef, ExtraParamFactorValues > > get_integral_derivative_factors(const Channel &channel) const override
Return the partial derivative of the model w.r.t. each metaparameter.
Definition linearintegralmodel.cc:46
double get_integral(const Channel &channel) const override
Get the value of the integral in a single Channel.
Definition linearintegralmodel.cc:41
ParamRefs & get_parameters(ParamRefs ¶ms, ParamFilter *filter=nullptr) const override
Definition linearintegralmodel.cc:68
size_t size() const
Return the size of Data (number of Channel/IntegralParameterD instances)
Definition linearintegralmodel.cc:77
Definition param_filter.h:17