SourceXtractorPlusPlus  0.13
Please provide a description of the project.
BackgroundConfig.cpp
Go to the documentation of this file.
1 
17 /*
18  * @file BackgroundConfig.cpp
19  * @author nikoapos
20  */
21 
24 
25 using namespace Euclid::Configuration;
26 namespace po = boost::program_options;
27 
28 namespace SourceXtractor {
29 
30 static const std::string BACKGROUND_VALUE {"background-value" };
31 static const std::string THRESHOLD_VALUE {"detection-threshold" };
32 
33 BackgroundConfig::BackgroundConfig(long manager_id) :
34  Configuration(manager_id),
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::string
STL class.
SourceXtractor::BackgroundConfig::m_background_level_absolute
bool m_background_level_absolute
Definition: BackgroundConfig.h:59
SourceXtractor::BackgroundConfig::getProgramOptions
std::map< std::string, Configuration::OptionDescriptionList > getProgramOptions() override
Definition: BackgroundConfig.cpp:41
std::map::find
T find(T... args)
SourceXtractor::BACKGROUND_VALUE
static const std::string BACKGROUND_VALUE
Definition: BackgroundConfig.cpp:30
Euclid::Configuration
SourceXtractor
Definition: Aperture.h:30
std::string::c_str
T c_str(T... args)
SourceXtractor::THRESHOLD_VALUE
static const std::string THRESHOLD_VALUE
Definition: BackgroundConfig.cpp:31
SourceXtractor::BackgroundConfig::m_background_level
SeFloat m_background_level
Definition: BackgroundConfig.h:60
ProcessedImage.h
std::map
STL class.
SourceXtractor::BackgroundConfig::m_detection_threshold
SeFloat m_detection_threshold
Definition: BackgroundConfig.h:63
BackgroundConfig.h
SourceXtractor::BackgroundConfig::initialize
void initialize(const UserValues &args) override
Definition: BackgroundConfig.cpp:50
SourceXtractor::BackgroundConfig::m_detection_threshold_absolute
bool m_detection_threshold_absolute
Definition: BackgroundConfig.h:62
Euclid::Configuration::Configuration
std::map::end
T end(T... args)