31namespace po = boost::program_options;
32namespace fs = boost::filesystem;
35namespace 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)"}}}};
67 double upper_limit_threshold_flag = -99.;
72 logger.
info() <<
"Upper limit threshold flag is " << upper_limit_threshold_flag;
75 double missing_photo_flag = -99.;
82 auto filter_name_mapping = getDependency<PhotometricBandMappingConfig>().getPhotometricBandMapping();
83 auto threshold_mapping = getDependency<PhotometricBandMappingConfig>().getUpperLimitThresholdMapping();
84 auto mag_mapping = getDependency<PhotometricBandMappingConfig>().getConvertFromMagMapping();
85 auto column_info = getDependency<CatalogConfig>().getColumnInfo();
91 getDependency<CatalogConfig>().addAttributeHandler(
std::move(handler_ptr));
97 throw Elements::Exception() <<
"isMissingPhotometryEnabled() call to uninitialized PhotometryCatalogConfig";
106 throw Elements::Exception() <<
"isUpperLimitEnabled() call to uninitialized PhotometryCatalogConfig";
static Logging getLogger(const std::string &name="")
void info(const std::string &logMessage)
Superclass of all configuration classes.
State & getCurrentState()
Returns the current state of the configuration.
@ INITIALIZED
The initialize() method has been called.
bool m_missing_photometry_enabled
void initialize(const UserValues &args) override
Adds the PhotometryAttributeFromRow handler to the CatalogConfig.
bool isMissingPhotometryEnabled()
bool m_upper_limit_enabled
PhotometryCatalogConfig(long manager_id)
Constructs a new PhotometryCatalogConfig object.
std::map< std::string, OptionDescriptionList > getProgramOptions() override
Returns the program options defined by the PhotometryCatalogConfig.
bool isUpperLimitEnabled()
Implementation of the AttributeFromRow for a photometry attribute. This class implements the createAt...
static const std::string MISSING_PHOTOMETRY_FLAG
static Elements::Logging logger
static const std::string UPPER_LIMIT_USE_THRESHOLD_FLAG
static const std::string ENABLE_UPPER_LIMIT