From 664055de9234625d39e616c3864bf2d63d6a3b75 Mon Sep 17 00:00:00 2001 From: Alice Date: Mon, 23 Jun 2025 17:26:59 +0200 Subject: [PATCH] fixed quad structure --- src/DetectorGeometry.cpp | 7 +++---- src/RawFile.test.cpp | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/DetectorGeometry.cpp b/src/DetectorGeometry.cpp index c7f0125..9658aad 100644 --- a/src/DetectorGeometry.cpp +++ b/src/DetectorGeometry.cpp @@ -23,13 +23,12 @@ DetectorGeometry::DetectorGeometry(const xy &geometry, for (size_t port_col = 0; port_col < udp_interfaces_per_module.col; ++port_col) { ModuleGeometry g; - g.origin_x = (col + port_col) * module_pixels_x; - g.origin_y = (row + port_row) * - module_pixels_y; // TODO: quad doesnt seem - // to have an effect g.row_index = quad ? (row + port_row + 1) % 2 : (row + port_row); g.col_index = col + port_col; + g.origin_x = g.col_index * module_pixels_x; + g.origin_y = g.row_index * module_pixels_y; + g.width = module_pixels_x; g.height = module_pixels_y; module_geometries.push_back(g); diff --git a/src/RawFile.test.cpp b/src/RawFile.test.cpp index a34bde0..4fff715 100644 --- a/src/RawFile.test.cpp +++ b/src/RawFile.test.cpp @@ -202,9 +202,8 @@ TEST_CASE("check find_geometry", "[.integration][.files][.rawfile]") { "raw/eiger_quad_data/" "W13_vthreshscan_m21C_300V_800eV_vrpre3400_master_0.json", 2, 1, 2, 512, 512, - std::vector{ - ModuleGeometry{0, 0, 256, 512, 0, 0}, - ModuleGeometry{0, 256, 256, 512, 1, 0}}}); + std::vector{ModuleGeometry{0, 256, 256, 512, 1, 0}, + ModuleGeometry{0, 0, 256, 512, 0, 0}}}); auto fpath = test_data_path() / test_parameters.master_filename;