118 return { {
"Assoc config", {
120 "Assoc catalog file"},
121 {
ASSOC_COLUMNS.c_str(), po::value<std::string>()->default_value(
"1,2"),
122 "Assoc columns to specify x/ra,y/dec[,weight] (the index of the first column is 1)"},
123 {
ASSOC_MODE.c_str(), po::value<std::string>()->default_value(
"NEAREST"),
124 "Assoc mode [FIRST, NEAREST, MEAN, MAG_MEAN, SUM, MAG_SUM, MIN, MAX]"},
125 {
ASSOC_RADIUS.c_str(), po::value<double>()->default_value(2.0),
126 "Assoc radius (Always in pixels of the detection image)"},
127 {
ASSOC_FILTER.c_str(), po::value<std::string>()->default_value(
"ALL"),
128 "Assoc catalog filter setting: ALL, MATCHED, UNMATCHED"},
129 {
ASSOC_COPY.c_str(), po::value<std::string>()->default_value(
""),
130 "List of columns indices in the assoc catalog to copy on match (the index of the first column is 1). "},
131 {
ASSOC_COORD_TYPE.c_str(), po::value<std::string>()->default_value(
"PIXEL"),
132 "Assoc coordinates type: PIXEL, WORLD"},
134 "Column containing the source sizes (in reference frame pixels)"},
136 "Column containing the source widths (in reference frame pixels)"},
138 "Column containing the source heights (in reference frame pixels)"},
140 "Default source size (in reference frame pixels)"},
142 "Column containing the group id"},
144 "Text file containing the assoc columns configuration"},
146 "Prints the assoc configuration and quits"},
369 for (
auto& row : table) {
378 if (coordinate_system !=
nullptr) {
379 coord = coordinate_system->worldToImage(world_coord);
387 if (coordinate_system !=
nullptr) {
388 world_coord = coordinate_system->imageToWorld(coord);
392 if (columns.
size() == 3 && columns.
at(2) >= 0) {
395 for (
auto column : copy_columns) {
396 if (column >=
static_cast<int>(row.size())) {
399 if (row[column].
type() ==
typeid(
int)) {
400 catalog.
back().assoc_columns.emplace_back(boost::get<int>(row[column]));
401 }
else if (row[column].
type() ==
typeid(
double)) {
402 catalog.
back().assoc_columns.emplace_back(boost::get<double>(row[column]));
403 }
else if (row[column].
type() ==
typeid(
int64_t)) {
404 catalog.
back().assoc_columns.emplace_back(boost::get<int64_t>(row[column]));
405 }
else if (row[column].
type() ==
typeid(
SeFloat)) {
406 catalog.
back().assoc_columns.emplace_back(boost::get<SeFloat>(row[column]));