SourceXtractorPlusPlus  0.8
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
27 #include "ModelFitting/utils.h"
28 
30 #include "SEUtils/Python.h"
31 
32 namespace SourceXtractor {
33 
34 using namespace ModelFitting;
35 
37  double initial_value, const SourceInterface& source) const {
38  GILStateEnsure ensure;
39 
40  double minimum_value, maximum_value;
41  std::tie(minimum_value, maximum_value) = m_range(initial_value, source);
42  return make_unique<ExpSigmoidConverter>(minimum_value, maximum_value);
43 }
44 
46  double initial_value, const SourceInterface& source) const {
47  GILStateEnsure ensure;
48 
49  double minimum_value, maximum_value;
50  std::tie(minimum_value, maximum_value) = m_range(initial_value, source);
51  return make_unique<SigmoidConverter>(minimum_value, maximum_value);
52 }
53 
55  double initial_value, const SourceInterface& source) const {
56  GILStateEnsure ensure;
57 
58  double factor = m_normalization_factor(initial_value, source);
59  return make_unique<NormalizedConverter>(factor);
60 }
61 
62 
63 }
64 
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 &quot;source&quot; that has properties attached to it.
std::unique_ptr< ModelFitting::CoordinateConverter > getConverter(double initial_value, const SourceInterface &source) const override