SourceXtractorPlusPlus  0.15
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 
SourceXtractor::FlexibleModelFittingExponentialRangeConverterFactory::getConverter
std::unique_ptr< ModelFitting::CoordinateConverter > getConverter(double initial_value, const SourceInterface &source) const override
Definition: FlexibleModelFittingConverterFactory.cpp:38
SourceXtractor::FlexibleModelFittingLinearRangeConverterFactory::getConverter
std::unique_ptr< ModelFitting::CoordinateConverter > getConverter(double initial_value, const SourceInterface &source) const override
Definition: FlexibleModelFittingConverterFactory.cpp:47
SourceXtractor::FlexibleModelFittingUnboundedConverterFactory::getConverter
std::unique_ptr< ModelFitting::CoordinateConverter > getConverter(double initial_value, const SourceInterface &source) const override
Definition: FlexibleModelFittingConverterFactory.cpp:56
Python.h
std::tie
T tie(T... args)
SourceXtractor
Definition: Aperture.h:30
NormalizedConverter.h
Euclid::make_unique
std::unique_ptr< T > make_unique(Args &&... args)
SigmoidConverter.h
ExpSigmoidConverter.h
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition: SourceInterface.h:46
std::unique_ptr
STL class.
ModelFitting
Definition: AsinhChiSquareComparator.h:30
memory_tools.h
FlexibleModelFittingConverterFactory.h
SourceXtractor::GILStateEnsure
Definition: Python.h:45