SourceXtractorPlusPlus  0.13
Please provide a description of the project.
SamplingConfig.cpp
Go to the documentation of this file.
1 
18 #include <boost/algorithm/string.hpp>
19 
21 
22 using namespace Euclid::Configuration;
23 namespace po = boost::program_options;
24 
25 namespace SourceXtractor {
26 
27 static const std::string SAMPLING_ADAPTIVE_TARGET {"sampling-adaptive-target"};
28 static const std::string SAMPLING_SCALE_FACTOR {"sampling-scale-factor"};
29 
30 SamplingConfig::SamplingConfig(long manager_id) : Configuration(manager_id),
31  m_adaptive_target(0.001), m_scale_factor(1.0) {}
32 
34  return {{"Model Fitting Sampling",
35  {
36 // {SAMPLING_ADAPTIVE_TARGET.c_str(), po::value<double>()->default_value(0.001),
37 // "Adaptive sampling will stop when difference is less than this"},
38  {SAMPLING_SCALE_FACTOR.c_str(), po::value<double>()->default_value(1.0),
39  "Scaling factor for the rendering of models (e.g. 2 = twice the resolution)"}
40  }
41  }};
42 }
43 
45 }
46 
48 // m_adaptive_target = args.at(SAMPLING_ADAPTIVE_TARGET).as<double>();
49  m_scale_factor = args.at(SAMPLING_SCALE_FACTOR).as<double>();
50 }
51 
52 } /* namespace SourceXtractor */
std::string
STL class.
SourceXtractor::SamplingConfig::preInitialize
void preInitialize(const UserValues &args) override
Definition: SamplingConfig.cpp:44
SourceXtractor::SAMPLING_ADAPTIVE_TARGET
static const std::string SAMPLING_ADAPTIVE_TARGET
Definition: SamplingConfig.cpp:27
SourceXtractor::SamplingConfig::initialize
void initialize(const UserValues &args) override
Definition: SamplingConfig.cpp:47
SourceXtractor::SamplingConfig::m_scale_factor
double m_scale_factor
Definition: SamplingConfig.h:49
Euclid::Configuration
SourceXtractor
Definition: Aperture.h:30
std::map::at
T at(T... args)
std::string::c_str
T c_str(T... args)
SourceXtractor::SAMPLING_SCALE_FACTOR
static const std::string SAMPLING_SCALE_FACTOR
Definition: SamplingConfig.cpp:28
std::map
STL class.
Euclid::Configuration::Configuration
SourceXtractor::SamplingConfig::getProgramOptions
std::map< std::string, OptionDescriptionList > getProgramOptions() override
Definition: SamplingConfig.cpp:33
SamplingConfig.h