From a97b9bdd919db053334959eab30336a21b8678cb Mon Sep 17 00:00:00 2001 From: Alice Date: Wed, 4 Feb 2026 17:24:52 +0100 Subject: [PATCH] didnt save properly --- include/aare/PixelMap.hpp | 2 +- python/aare/CtbRawFile.py | 1 - python/tests/test_RawFile.py | 5 ++--- src/PixelMap.cpp | 2 ++ src/decode.test.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/aare/PixelMap.hpp b/include/aare/PixelMap.hpp index ba45fd5..c14bd5b 100644 --- a/include/aare/PixelMap.hpp +++ b/include/aare/PixelMap.hpp @@ -17,7 +17,7 @@ NDArray GenerateMH02SingleCounterPixelMap(); NDArray GenerateMH02FourCounterPixelMap(); /** - * @brief Generate pixel map for Matterhorn02 detector + * @brief Generate pixel map for Matterhorn10 detector * @param dynamic_range Dynamic range of the detector (16, 8, or 4) * @param n_counters Number of counters (1 to 4) */ diff --git a/python/aare/CtbRawFile.py b/python/aare/CtbRawFile.py index fd2377d..561604b 100644 --- a/python/aare/CtbRawFile.py +++ b/python/aare/CtbRawFile.py @@ -18,7 +18,6 @@ class CtbRawFile(_aare.CtbRawFile): super().__init__(fname) self._chunk_size = chunk_size self._transform = transform - print("so far so good") if self._transform: if hasattr(self._transform, "compatibility") and callable(getattr(self._transform, "compatibility")): self._transform.compatibility(self.master.reading_mode) diff --git a/python/tests/test_RawFile.py b/python/tests/test_RawFile.py index a30941a..aba8ec1 100644 --- a/python/tests/test_RawFile.py +++ b/python/tests/test_RawFile.py @@ -10,8 +10,8 @@ def test_read_rawfile_with_roi(test_data_path): headers, frames = f.read() assert headers.size == 10100 - assert frames.shape == (10100, 256, 256) - + assert frames.shape == (10100, 256, 256) + @pytest.mark.withdata def test_read_rawfile_quad_eiger_and_compare_to_numpy(test_data_path): @@ -36,7 +36,6 @@ def test_read_rawfile_quad_eiger_and_compare_to_numpy(test_data_path): assert (image == image1).all() - @pytest.mark.withdata def test_read_rawfile_eiger_and_compare_to_numpy(test_data_path): d0 = test_data_path/'raw/eiger/Lab6_20500eV_2deg_20240629_d0_f0_7.raw' diff --git a/src/PixelMap.cpp b/src/PixelMap.cpp index 8ddd724..2300bd1 100644 --- a/src/PixelMap.cpp +++ b/src/PixelMap.cpp @@ -168,6 +168,8 @@ NDArray GenerateMH02FourCounterPixelMap() { NDArray GenerateMatterhorn10PixelMap(const size_t dynamic_range, const size_t n_counters) { + + // Matterhorn10 uses transceiver samples (each transceiver sample has 1-4 channels storing 8 bytes each) constexpr size_t n_cols = Matterhorn10::nCols; constexpr size_t n_rows = Matterhorn10::nRows; NDArray pixel_map( diff --git a/src/decode.test.cpp b/src/decode.test.cpp index ba7f238..81cfb97 100644 --- a/src/decode.test.cpp +++ b/src/decode.test.cpp @@ -166,7 +166,7 @@ TEST_CASE("Expand 4 bit values packed into 8 bit to 8 bit values") { uint8_t expected_output[] = { 0x0, 0x0, 0x0, 0xF, 0xF, 0xF, - 0x0, 0x0, 0x0, 0xF, 0xF, 0xF}; // is it first little or big endian? + 0x0, 0x0, 0x0, 0xF, 0xF, 0xF}; // assuming little endian for (size_t i = 0; i < 12; ++i) { CHECK(out(i) == expected_output[i]);