From 01d4e370534c3c98e08be4fde6f0cd1ded0cdcce Mon Sep 17 00:00:00 2001 From: Laleh Beni Date: Mon, 30 Jun 2025 10:57:07 -0700 Subject: [PATCH] fix the dets issue --- src/tesseract_main.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/tesseract_main.cc b/src/tesseract_main.cc index 4f6ffdf..08aa163 100644 --- a/src/tesseract_main.cc +++ b/src/tesseract_main.cc @@ -231,12 +231,13 @@ struct Args { std::vector inner_products(config.dem.count_detectors()); if (!detector_coords.size() || !detector_coords.at(0).size()) { - // If there are no detector coordinates, just use the standard ordering - // of the indices. + // If there are no detector coordinates, just use the standard + // ordering of the indices. for (size_t det_order = 0; det_order < num_det_orders; ++det_order) { - config.det_orders.emplace_back(); - std::iota(config.det_orders.back().begin(), config.det_orders.front().end(), 0); + config.det_orders[det_order].resize(config.dem.count_detectors()); + std::iota(config.det_orders[det_order].begin(), config.det_orders[det_order].end(), 0); } + } else { // Use the coordinates to order the detectors based on a random // orientation @@ -694,4 +695,4 @@ int main(int argc, char* argv[]) { std::cout << " total_time_seconds = " << total_time_seconds; std::cout << std::endl; } -} +} \ No newline at end of file