31 namespace po = boost::program_options;
32 namespace fs = boost::filesystem;
35 namespace Configuration {
44 declareDependency<CatalogConfig>();
45 declareDependency<PhotometricBandMappingConfig>();
49 return {{
"Input catalog options",
51 "The value passed in the flux indicating that the photometry is missing, if the flag is not provided "
52 "the functionality is disabled"},
54 "Define if the catalog contains flux upper limit (YES/NO by default NO)"},
56 "Define a flag (in the flux error column) telling that the sigma has to be computed from "
57 "the flux and the Upper Limit threshold defined for each filter (must be <0 to trigger upper limit "
58 "functionality, by default -99)"}}}};
66 double upper_limit_threshold_flag = -99.;
71 logger.
info() <<
"Upper limit threshold flag is " << upper_limit_threshold_flag;
74 double missing_photo_flag = -99.;
81 auto filter_name_mapping = getDependency<PhotometricBandMappingConfig>().getPhotometricBandMapping();
82 auto threshold_mapping = getDependency<PhotometricBandMappingConfig>().getUpperLimitThresholdMapping();
83 auto mag_mapping = getDependency<PhotometricBandMappingConfig>().getConvertFromMagMapping();
84 auto column_info = getDependency<CatalogConfig>().getColumnInfo();
89 threshold_mapping, upper_limit_threshold_flag, mag_mapping}};
90 getDependency<CatalogConfig>().addAttributeHandler(
std::move(handler_ptr));
96 throw Elements::Exception() <<
"isMissingPhotometryEnabled() call to uninitialized PhotometryCatalogConfig";
105 throw Elements::Exception() <<
"isUpperLimitEnabled() call to uninitialized PhotometryCatalogConfig";
static const std::string ENABLE_UPPER_LIMIT
Superclass of all configuration classes.
bool isUpperLimitEnabled()
void info(const std::string &logMessage)
bool m_missing_photometry_enabled
State & getCurrentState()
Returns the current state of the configuration.
void initialize(const UserValues &args) override
Adds the PhotometryAttributeFromRow handler to the CatalogConfig.
static const std::string MISSING_PHOTOMETRY_FLAG
static Elements::Logging logger
Implementation of the AttributeFromRow for a photometry attribute. This class implements the createAt...
static const std::string UPPER_LIMIT_USE_THRESHOLD_FLAG
PhotometryCatalogConfig(long manager_id)
Constructs a new PhotometryCatalogConfig object.
static Logging getLogger(const std::string &name="")
The initialize() method has been called.
bool isMissingPhotometryEnabled()
std::map< std::string, OptionDescriptionList > getProgramOptions() override
Returns the program options defined by the PhotometryCatalogConfig.
bool m_upper_limit_enabled