SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
FluxRadiusConfig.cpp
Go to the documentation of this file.
1
19#include <AlexandriaKernel/StringUtils.h>
20
21using namespace Euclid::Configuration;
22namespace po = boost::program_options;
23
24namespace SourceXtractor {
25
26static const std::string FLUX_FRACTION{"flux-fraction"};
27
29
31 return {{"Flux radius", {
32 {FLUX_FRACTION.c_str(), po::value<std::string>()->default_value("0.5"),
33 "Fraction of flux defining each element of the flux_radius vector"}
34 }}};
35}
36
39 m_flux_fraction = Euclid::stringToVector<SeFloat>(flux_fraction_str);
40 if (m_flux_fraction.empty()) {
41 throw Elements::Exception() << FLUX_FRACTION << " must contain at least one element";
42 }
43 for (auto frac : m_flux_fraction) {
44 if (frac <= 0 || frac >= 1) {
45 throw Elements::Exception() << FLUX_FRACTION << " only accepts values strictly between 0 and 1";
46 }
47 }
48}
49
53
54} // end of namespace SourceXtractor
const std::vector< SeFloat > & getFluxFraction() const
std::vector< SeFloat > m_flux_fraction
void initialize(const UserValues &args) override
std::map< std::string, OptionDescriptionList > getProgramOptions() override
T empty(T... args)
static const std::string FLUX_FRACTION