115 return { {
"Assoc config", {
117 "Assoc catalog file"},
118 {
ASSOC_COLUMNS.c_str(), po::value<std::string>()->default_value(
"1,2"),
119 "Assoc columns to specify x/ra,y/dec[,weight] (the index of the first column is 1)"},
120 {
ASSOC_MODE.c_str(), po::value<std::string>()->default_value(
"NEAREST"),
121 "Assoc mode [FIRST, NEAREST, MEAN, MAG_MEAN, SUM, MAG_SUM, MIN, MAX]"},
122 {
ASSOC_RADIUS.c_str(), po::value<double>()->default_value(2.0),
123 "Assoc radius (Always in pixels of the detection image)"},
124 {
ASSOC_FILTER.c_str(), po::value<std::string>()->default_value(
"ALL"),
125 "Assoc catalog filter setting: ALL, MATCHED, UNMATCHED"},
126 {
ASSOC_COPY.c_str(), po::value<std::string>()->default_value(
""),
127 "List of columns indices in the assoc catalog to copy on match (the index of the first column is 1). "},
128 {
ASSOC_COORD_TYPE.c_str(), po::value<std::string>()->default_value(
"PIXEL"),
129 "Assoc coordinates type: PIXEL, WORLD"},
131 "Column containing the source sizes (in reference frame pixels)"},
133 "Default source size (in reference frame pixels)"},
135 "Column containing the group id"},
137 "Text file containing the assoc columns configuration"},
139 "Prints the assoc configuration and quits"},
342 for (
auto& row : table) {
351 if (coordinate_system !=
nullptr) {
352 coord = coordinate_system->worldToImage(world_coord);
360 if (coordinate_system !=
nullptr) {
361 world_coord = coordinate_system->imageToWorld(coord);
365 if (columns.
size() == 3 && columns.
at(2) >= 0) {
368 for (
auto column : copy_columns) {
369 if (column >=
static_cast<int>(row.size())) {
372 if (row[column].
type() ==
typeid(
int)) {
373 catalog.
back().assoc_columns.emplace_back(boost::get<int>(row[column]));
374 }
else if (row[column].
type() ==
typeid(
double)) {
375 catalog.
back().assoc_columns.emplace_back(boost::get<double>(row[column]));
376 }
else if (row[column].
type() ==
typeid(
int64_t)) {
377 catalog.
back().assoc_columns.emplace_back(boost::get<int64_t>(row[column]));
378 }
else if (row[column].
type() ==
typeid(
SeFloat)) {
379 catalog.
back().assoc_columns.emplace_back(boost::get<SeFloat>(row[column]));