SourceXtractorPlusPlus  0.12
Please provide a description of the project.
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, SeFloat chi_squared, Flags flags,
45  std::unordered_map<int, double> parameter_values, std::unordered_map<int, double> parameter_sigmas) :
46  m_iterations(iterations),
47  m_chi_squared(chi_squared),
48  m_flags(flags),
49  m_parameter_values(parameter_values),
50  m_parameter_sigmas(parameter_sigmas) {}
51 
52  unsigned int getIterations() const {
53  return m_iterations;
54  }
55 
57  return m_chi_squared;
58  }
59 
60  Flags getFlags() const {
61  return m_flags;
62  }
63 
64  SeFloat getParameterValue(int index) const {
65  return m_parameter_values.at(index);
66  }
67 
68  SeFloat getParameterSigma(int index) const {
69  return m_parameter_sigmas.at(index);
70  }
71 
72 private:
73  unsigned int m_iterations;
78 };
79 
80 }
81 
82 #endif /* _SEIMPLEMENTATION_PLUGIN_FLEXIBLEMODELFITTING_FLEXIBLEMODELFITTING_H_ */
SeFloat getParameterSigma(int index) const
std::unordered_map< int, double > m_parameter_sigmas
SeFloat32 SeFloat
Definition: Types.h:32
FlexibleModelFitting(unsigned int iterations, SeFloat chi_squared, Flags flags, std::unordered_map< int, double > parameter_values, std::unordered_map< int, double > parameter_sigmas)
std::unordered_map< int, double > m_parameter_values
Base class for all Properties. (has no actual content)
Definition: Property.h:33
T at(T... args)
SeFloat getParameterValue(int index) const
Elements::Logging model_fitting_logger
Flags
Flagging of bad sources.
Definition: SourceFlags.h:34