SourceXtractorPlusPlus  0.15
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
34 namespace SourceXtractor {
35 
37 
38 // FlexibleModelFitting property class to contain the results from the model fitting
39 
41 public:
42  virtual ~FlexibleModelFitting() = default;
43 
44  FlexibleModelFitting(unsigned int iterations, unsigned int stop_reason,
45  SeFloat chi_squared, Flags flags,
46  std::unordered_map<int, double> parameter_values,
47  std::unordered_map<int, double> parameter_sigmas) :
48  m_iterations(iterations),
49  m_stop_reason(stop_reason),
50  m_chi_squared(chi_squared),
51  m_flags(flags),
52  m_parameter_values(parameter_values),
53  m_parameter_sigmas(parameter_sigmas) {}
54 
55  unsigned int getIterations() const {
56  return m_iterations;
57  }
58 
59  unsigned int getStopReason() const {
60  return m_stop_reason;
61  }
62 
64  return m_chi_squared;
65  }
66 
67  Flags getFlags() const {
68  return m_flags;
69  }
70 
71  SeFloat getParameterValue(int index) const {
72  return m_parameter_values.at(index);
73  }
74 
75  SeFloat getParameterSigma(int index) const {
76  return m_parameter_sigmas.at(index);
77  }
78 
79 private:
80  unsigned int m_iterations, m_stop_reason;
85 };
86 
87 }
88 
89 #endif /* _SEIMPLEMENTATION_PLUGIN_FLEXIBLEMODELFITTING_FLEXIBLEMODELFITTING_H_ */
std::unordered_map< int, double > m_parameter_sigmas
SeFloat32 SeFloat
Definition: Types.h:32
std::unordered_map< int, double > m_parameter_values
Base class for all Properties. (has no actual content)
Definition: Property.h:33
SeFloat getParameterValue(int index) const
Elements::Logging model_fitting_logger
Flags
Flagging of bad sources.
Definition: SourceFlags.h:37
FlexibleModelFitting(unsigned int iterations, unsigned int stop_reason, SeFloat chi_squared, Flags flags, std::unordered_map< int, double > parameter_values, std::unordered_map< int, double > parameter_sigmas)
SeFloat getParameterSigma(int index) const