Loading [MathJax]/extensions/tex2jax.js
LSST Applications g04dff08e69+fafbcb10e2,g0d33ba9806+e09a96fa4e,g0fba68d861+cc01b48236,g1e78f5e6d3+fb95f9dda6,g1ec0fe41b4+f536777771,g1fd858c14a+ae46bc2a71,g35bb328faa+fcb1d3bbc8,g4af146b050+dd94f3aad7,g4d2262a081+7ee6f976aa,g53246c7159+fcb1d3bbc8,g5a012ec0e7+b20b785ecb,g60b5630c4e+e09a96fa4e,g6273192d42+bf8cfc5e62,g67b6fd64d1+4086c0989b,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g87b7deb4dc+831c06c8fc,g8852436030+54b48a5987,g89139ef638+4086c0989b,g9125e01d80+fcb1d3bbc8,g94187f82dc+e09a96fa4e,g989de1cb63+4086c0989b,g9f33ca652e+64be6d9d51,g9f7030ddb1+d11454dffd,ga2b97cdc51+e09a96fa4e,gabe3b4be73+1e0a283bba,gabf8522325+fa80ff7197,gb1101e3267+23605820ec,gb58c049af0+f03b321e39,gb89ab40317+4086c0989b,gcf25f946ba+54b48a5987,gd6cbbdb0b4+af3c3595f5,gd9a9a58781+fcb1d3bbc8,gde0f65d7ad+15f2daff9d,ge278dab8ac+d65b3c2b70,ge410e46f29+4086c0989b,gf67bdafdda+4086c0989b,v29.0.0.rc5
LSST Data Management Base Package
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
gslsersicmixinterpolator.h
Go to the documentation of this file.
1#ifndef LSST_GAUSS2D_FIT_GSLSERSICMIXINTERPOLATOR_H
2#define LSST_GAUSS2D_FIT_GSLSERSICMIXINTERPOLATOR_H
3
4#ifdef LSST_GAUSS2D_FIT_HAS_GSL
5
6#include <memory>
7
8#include "gsl.h"
9#include "gslinterpolator.h"
10#include "sersicmix.h"
11
12#include <gsl/gsl_errno.h>
13#include <gsl/gsl_spline.h>
14
15namespace lsst::gauss2d::fit {
16
20class GSLSersicMixInterpolator : public SersicMixInterpolator {
21public:
22 explicit GSLSersicMixInterpolator(unsigned short order = SERSICMIX_ORDER_DEFAULT,
23 InterpType interp_type = INTERPTYPE_DEFAULT);
24 ~GSLSersicMixInterpolator();
25
26 bool correct_final_integral = true;
27 static constexpr InterpType INTERPTYPE_DEFAULT = InterpType::cspline;
29 const std::vector<SersicMixValues>& get_knots() const;
30
33 double get_final_correction() const;
34
35 std::vector<IntegralSize> get_integralsizes(double sersicindex) const override;
36 std::vector<IntegralSize> get_integralsizes_derivs(double sersicindex) const override;
37
38 InterpType get_interptype() const override;
39 unsigned short get_order() const override;
40
41 double get_sersicindex_min() const;
42 double get_sersicindex_max() const;
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 // This is allows caching of the final_correction value between calls to
50 // get_integralsizes(_derivs); so get_final_correction can return it
51 mutable double _final_correction = 1.;
52 const InterpType _interp_type;
53 const unsigned short _order;
54 std::vector<std::pair<std::unique_ptr<GSLInterpolator>, std::unique_ptr<GSLInterpolator>>> _interps;
55 const std::vector<SersicMixValues>& _knots;
56 const double _sersicindex_min;
57 const double _sersicindex_max;
58};
59
60} // namespace lsst::gauss2d::fit
61
62#endif // LSST_GAUSS2D_FIT_HAS_GSL
63#endif // LSST_GAUSS2D_FIT_GSLSERSICMIXINTERPOLATOR_H
An interpolator that returns IntegralSize vectors for a given Sersic index.
Definition sersicmix.h:34