23#include <boost/filesystem.hpp>
24#include <boost/algorithm/string.hpp>
26#include <boost/regex.hpp>
28using boost::regex_match;
37namespace po = boost::program_options;
38namespace fs = boost::filesystem;
59 return {{
"External flag options", {
61 "The FITS file containing the external flag, several images can be provided, replace * by any identifier (ex. use numbers)"},
63 "The combination type of the external flag (OR, AND, MIN, MAX, MOST)"}
84 if (available_types.count(type) == 0) {
94 auto& filename = args.
at(
poh::wildcard(FLAG_IMAGE, name)).as<std::string>();
96 boost::regex hdu_regex(
".*\\[[0-9]*\\]$");
100 if (boost::regex_match(filename, hdu_regex)) {
114 if (flag_images.
size() == 0) {
131 Type type = available_types.at(type_str);
static std::string wildcard(const std::string &name, const std::string &instance="*")
static std::set< std::string > findWildcardNames(const std::vector< std::string > &option_name_list, const std::map< std::string, boost::program_options::variable_value > &options)
T emplace_back(T... args)