From 8e2346abf8b29dcbcb1e220b173c4f39c3e48e59 Mon Sep 17 00:00:00 2001 From: froejdh_e Date: Wed, 16 Jul 2025 15:54:29 +0200 Subject: [PATCH 1/2] fixed pixel map for mh02 --- src/PixelMap.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/PixelMap.cpp b/src/PixelMap.cpp index 5be5ed4..575e201 100644 --- a/src/PixelMap.cpp +++ b/src/PixelMap.cpp @@ -104,22 +104,34 @@ NDArray GenerateEigerFlipRowsPixelMap() { } NDArray GenerateMH02SingleCounterPixelMap() { + // This is the pixel map for a single counter Matterhorn02, i.e. 48x48 pixels. + // Data is read from two transceivers in blocks of 4 pixels. NDArray order_map({48, 48}); + size_t offset = 0; + size_t nSamples = 4; for (int row = 0; row < 48; row++) { - for (int col = 0; col < 48; col++) { - order_map(row, col) = row * 48 + col; + for (int col = 0; col < 24; col++) { + for (int iTrans = 0; iTrans < 2; iTrans++) { + order_map(row, iTrans * 24 + col) = offset + nSamples * iTrans; + } + offset += 1; + if ((col + 1) % nSamples == 0) { + offset += nSamples; + } } } return order_map; } NDArray GenerateMH02FourCounterPixelMap() { + auto single_counter_map = GenerateMH02SingleCounterPixelMap(); NDArray order_map({4, 48, 48}); for (int counter = 0; counter < 4; counter++) { for (int row = 0; row < 48; row++) { for (int col = 0; col < 48; col++) { order_map(counter, row, col) = - counter * 48 * 48 + row * 48 + col; + single_counter_map(row, col) + + counter * 48 * 48; } } } From 8143524acfb5d19d406a27b23b5d92175d2d63e2 Mon Sep 17 00:00:00 2001 From: froejdh_e Date: Wed, 16 Jul 2025 16:41:27 +0200 Subject: [PATCH 2/2] updated release notes --- RELEASE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE.md b/RELEASE.md index 02d5a9d..3893ef7 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -10,6 +10,7 @@ Features: Bugfixes: - Fixed reading RawFiles with ROI fully excluding some sub files. +- Decoding of MH02 files placed the pixels in wrong position ### 2025.05.22