SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
BackgroundConfig.cpp
Go to the documentation of this file.
1
17/*
18 * @file BackgroundConfig.cpp
19 * @author nikoapos
20 */
21
24
25using namespace Euclid::Configuration;
26namespace po = boost::program_options;
27
28namespace SourceXtractor {
29
30static const std::string BACKGROUND_VALUE {"background-value" };
31static const std::string THRESHOLD_VALUE {"detection-threshold" };
32
35 m_background_level_absolute(false),
36 m_background_level(0),
37 m_detection_threshold_absolute(false),
38 m_detection_threshold(0) {
39}
40
42 return { {"Detection image", {
43 {BACKGROUND_VALUE.c_str(), po::value<double>(),
44 "Background value to be subtracted from the detection image."},
45 {THRESHOLD_VALUE.c_str(), po::value<double>()->default_value((1.5)),
46 "Detection threshold above the background."},
47 }}};
48}
49
51 if (args.find(BACKGROUND_VALUE) != args.end()) {
53 m_background_level = args.find(BACKGROUND_VALUE)->second.as<double>();
54 }
55 if (args.find(THRESHOLD_VALUE) != args.end()) {
57 m_detection_threshold = args.find(THRESHOLD_VALUE)->second.as<double>();
58 }
59}
60
61} // SourceXtractor namespace
std::map< std::string, Configuration::OptionDescriptionList > getProgramOptions() override
void initialize(const UserValues &args) override
static const std::string THRESHOLD_VALUE
static const std::string BACKGROUND_VALUE