SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
FlexibleModelFitting.h
Go to the documentation of this file.
1
17/*
18 * FlexibleModelFitting.h
19 *
20 * Created on: Sep 17, 2018
21 * Author: mschefer
22 */
23
24#ifndef _SEIMPLEMENTATION_PLUGIN_FLEXIBLEMODELFITTING_FLEXIBLEMODELFITTING_H_
25#define _SEIMPLEMENTATION_PLUGIN_FLEXIBLEMODELFITTING_FLEXIBLEMODELFITTING_H_
26
27#include <unordered_map>
28#include <ElementsKernel/Logging.h>
29
30#include "SEUtils/Types.h"
33
34namespace SourceXtractor {
35
37
38// FlexibleModelFitting property class to contain the results from the model fitting
39
41public:
42 virtual ~FlexibleModelFitting() = default;
43
44 FlexibleModelFitting(unsigned int iterations, unsigned int stop_reason,
45 SeFloat chi_squared, SeFloat duration, Flags flags,
47 std::unordered_map<int, double> parameter_sigmas,
48 std::vector<SeFloat> chi_squared_per_meta,
49 std::vector<int> iterations_per_meta,
50 int meta_iterations) :
51 m_iterations(iterations),
52 m_stop_reason(stop_reason),
54 m_duration(duration),
55 m_flags(flags),
57 m_parameter_sigmas(parameter_sigmas),
58 m_chi_squared_per_meta(chi_squared_per_meta),
59 m_iterations_per_meta(iterations_per_meta),
61{}
62
63 unsigned int getIterations() const {
64 return m_iterations;
65 }
66
67 unsigned int getStopReason() const {
68 return m_stop_reason;
69 }
70
72 return m_chi_squared;
73 }
74
75 Flags getFlags() const {
76 return m_flags;
77 }
78
79 SeDouble getParameterValue(int index) const {
80 return m_parameter_values.at(index);
81 }
82
83 SeDouble getParameterSigma(int index) const {
84 return m_parameter_sigmas.at(index);
85 }
86
88 return m_duration;
89 }
90
94
98
99 int getMetaIterations() const {
100 return m_meta_iterations;
101 }
102
103private:
109
113};
114
115}
116
117#endif /* _SEIMPLEMENTATION_PLUGIN_FLEXIBLEMODELFITTING_FLEXIBLEMODELFITTING_H_ */
T at(T... args)
std::vector< SeFloat > getChiSquaredPerMetaIteration() const
FlexibleModelFitting(unsigned int iterations, unsigned int stop_reason, SeFloat chi_squared, SeFloat duration, Flags flags, std::unordered_map< int, double > parameter_values, std::unordered_map< int, double > parameter_sigmas, std::vector< SeFloat > chi_squared_per_meta, std::vector< int > iterations_per_meta, int meta_iterations)
std::unordered_map< int, double > m_parameter_sigmas
SeDouble getParameterValue(int index) const
std::vector< int > getIterationsPerMetaIteration() const
SeDouble getParameterSigma(int index) const
std::unordered_map< int, double > m_parameter_values
Base class for all Properties. (has no actual content)
Definition Property.h:33
Flags
Flagging of bad sources.
Definition SourceFlags.h:37
Elements::Logging model_fitting_logger
SeFloat32 SeFloat
Definition Types.h:32