From 24bb65c15db5fa09731dbf60eb37fd6b04f13a04 Mon Sep 17 00:00:00 2001 From: Alice Date: Wed, 16 Sep 2026 12:22:20 +0200 Subject: [PATCH] fixed tests --- include/aare/StrixelPixelRemapping/BaseStrixelPixelMap.hpp | 5 +++++ .../StrixelPixelRemapAlgorithm.test.cpp | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/aare/StrixelPixelRemapping/BaseStrixelPixelMap.hpp b/include/aare/StrixelPixelRemapping/BaseStrixelPixelMap.hpp index 95237801..4d0a7f86 100644 --- a/include/aare/StrixelPixelRemapping/BaseStrixelPixelMap.hpp +++ b/include/aare/StrixelPixelRemapping/BaseStrixelPixelMap.hpp @@ -104,6 +104,11 @@ template class StrixelPixelMap { return m_group_maps; } + const std::array & + get_group_maps_ref() const { + return m_group_maps; + } + /** * @brief Get the strixel-to-pixel map for a specific strixel group. * @param group_index Index of the strixel group (0-based). diff --git a/src/StrixelPixelRemapping/StrixelPixelRemapAlgorithm.test.cpp b/src/StrixelPixelRemapping/StrixelPixelRemapAlgorithm.test.cpp index dd252cfa..87400ae4 100644 --- a/src/StrixelPixelRemapping/StrixelPixelRemapAlgorithm.test.cpp +++ b/src/StrixelPixelRemapping/StrixelPixelRemapAlgorithm.test.cpp @@ -288,7 +288,7 @@ TEST_CASE("strixel_to_pixel_map: user ROI smaller than group ROI", const auto placement = test_placement(); // User ROI is in module coordinates. - const ROI user_roi{65, 72, 65, 67}; + const ROI user_roi{65, 71, 65, 67}; StrixelPixelMap map(SensorConfig<1>{sensor, {group}}, placement, {0, 0}); @@ -413,11 +413,10 @@ TEST_CASE("strixel_to_pixel_map: user ROI does not intersect group ROI", map.calculate_map(user_roi); - const auto result = map.get_group_maps()[0]; + const auto result = map.get_group_map(0); CHECK(result.effective_roi.is_empty()); - CHECK(result.map.data() == - nullptr); // is there a better check for empty NDArray? + CHECK(result.empty() == true); } // ModuloOrdering