mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-10-25 02:51:29 +02:00
Insert gap pixels only between chips unless module gaps are set
An unset GapPixels::module_gaps defaulted to the chip gap, so every module boundary received two extra rows or columns. Two stacked Jungfrau modules read as 1030x1030 instead of 1030x1028. Unset now means no pixels between modules; only the chip boundaries inside a module receive a gap. Also drop the explicit lambda capture in split_edge_counts that clang reported as unused for floating point pixels.
This commit is contained in:
1 parent
6bfe6c2284
commit
58da96d6f0
10 files changed
+76
-35
No files matched your search
@@ -527,8 +527,9 @@ def test_raw_file_gap_pixels(tmp_path, layout):
|
||||
gaps = GapPixels(fill_value=5)
|
||||
with RawFile(master_path, gap_pixels=gaps) as reader:
|
||||
assert reader.gap_pixels == gaps
|
||||
assert (reader.rows(), reader.cols()) == (512 * layout_rows + 2 * (layout_rows * 2 - 1),
|
||||
1024 * layout_cols + 2 * (layout_cols * 4 - 1))
|
||||
# one chip boundary per module row, three per module column and no
|
||||
# gap between modules
|
||||
assert (reader.rows(), reader.cols()) == ((512 + 2) * layout_rows, (1024 + 6) * layout_cols)
|
||||
header, image = reader.read_frame()
|
||||
assert header.size == layout_rows * layout_cols
|
||||
assert (image == insert_gap_pixels(expected, DetectorType.Jungfrau, gaps)).all()
|
||||
|
||||
Reference in new issue
Block a user