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