SourceXtractorPlusPlus  0.11
Please provide a description of the project.
FlexibleModelFittingConverterFactory.cpp
Go to the documentation of this file.
1 
17 /*
18  * FlexibleModelFittingConverterFactory.cpp
19  *
20  * Created on: May 10, 2019
21  * Author: mschefer
22  */
23 
25 
29 
31 #include "SEUtils/Python.h"
32 
33 namespace SourceXtractor {
34 
35 using namespace ModelFitting;
37 
39  double initial_value, const SourceInterface& source) const {
40  GILStateEnsure ensure;
41 
42  double minimum_value, maximum_value;
43  std::tie(minimum_value, maximum_value) = m_range(initial_value, source);
44  return make_unique<ExpSigmoidConverter>(minimum_value, maximum_value);
45 }
46 
48  double initial_value, const SourceInterface& source) const {
49  GILStateEnsure ensure;
50 
51  double minimum_value, maximum_value;
52  std::tie(minimum_value, maximum_value) = m_range(initial_value, source);
53  return make_unique<SigmoidConverter>(minimum_value, maximum_value);
54 }
55 
57  double initial_value, const SourceInterface& source) const {
58  GILStateEnsure ensure;
59 
60  double factor = m_normalization_factor(initial_value, source);
61  return make_unique<NormalizedConverter>(factor);
62 }
63 
64 
65 }
66 
T tie(T... args)
std::unique_ptr< ModelFitting::CoordinateConverter > getConverter(double initial_value, const SourceInterface &source) const override
std::unique_ptr< ModelFitting::CoordinateConverter > getConverter(double initial_value, const SourceInterface &source) const override
STL class.
The SourceInterface is an abstract "source" that has properties attached to it.
std::unique_ptr< ModelFitting::CoordinateConverter > getConverter(double initial_value, const SourceInterface &source) const override
std::unique_ptr< T > make_unique(Args &&... args)