SourceXtractorPlusPlus
0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
src
lib
Configuration
BackgroundConfig.cpp
Go to the documentation of this file.
1
17
/*
18
* @file BackgroundConfig.cpp
19
* @author nikoapos
20
*/
21
22
#include "
SEFramework/Image/ProcessedImage.h
"
23
#include "
SEImplementation/Configuration/BackgroundConfig.h
"
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
41
std::map<std::string, Configuration::OptionDescriptionList>
BackgroundConfig::getProgramOptions
() {
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
50
void
BackgroundConfig::initialize
(
const
UserValues
&
args
) {
51
if
(
args
.find(
BACKGROUND_VALUE
) !=
args
.end()) {
52
m_background_level_absolute
=
true
;
53
m_background_level
=
args
.find(
BACKGROUND_VALUE
)->second.as<
double
>();
54
}
55
if
(
args
.find(
THRESHOLD_VALUE
) !=
args
.end()) {
56
m_detection_threshold_absolute
=
true
;
57
m_detection_threshold
=
args
.find(
THRESHOLD_VALUE
)->second.as<
double
>();
58
}
59
}
60
61
}
// SourceXtractor namespace
BackgroundConfig.h
ProcessedImage.h
std::string
Euclid::Configuration::Configuration
SourceXtractor::BackgroundConfig::m_background_level
SeFloat m_background_level
Definition
BackgroundConfig.h:60
SourceXtractor::BackgroundConfig::m_background_level_absolute
bool m_background_level_absolute
Definition
BackgroundConfig.h:59
SourceXtractor::BackgroundConfig::BackgroundConfig
BackgroundConfig(long manager_id)
Definition
BackgroundConfig.cpp:33
SourceXtractor::BackgroundConfig::m_detection_threshold_absolute
bool m_detection_threshold_absolute
Definition
BackgroundConfig.h:62
SourceXtractor::BackgroundConfig::getProgramOptions
std::map< std::string, Configuration::OptionDescriptionList > getProgramOptions() override
Definition
BackgroundConfig.cpp:41
SourceXtractor::BackgroundConfig::m_detection_threshold
SeFloat m_detection_threshold
Definition
BackgroundConfig.h:63
SourceXtractor::BackgroundConfig::initialize
void initialize(const UserValues &args) override
Definition
BackgroundConfig.cpp:50
std::function
std::map
Euclid::Configuration
SourceXtractor
Definition
Aperture.h:30
SourceXtractor::THRESHOLD_VALUE
static const std::string THRESHOLD_VALUE
Definition
BackgroundConfig.cpp:31
SourceXtractor::BACKGROUND_VALUE
static const std::string BACKGROUND_VALUE
Definition
BackgroundConfig.cpp:30
Generated by
1.10.0