mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-10-23 17:21:27 +02:00
Drop detector type and quad flag from the gap pixel API
insert_gap_pixels and gapped_shape only used the detector type to reject anything but Jungfrau and Eiger, and the quad flag only to shrink the module width to 512. Both Jungfrau and Eiger use 256x256 pixel chips in 1024x512 modules, and an Eiger quad is 512x512 pixels, so its only chip boundaries are at pixel 256 and the module width never matters. The layout is now fixed and both functions take just the image, its ROI and the GapPixels configuration, in C++ and in Python. RawFile keeps rejecting gap pixels for other detector types with std::invalid_argument, now checked in the reader instead of the layout.
This commit is contained in:
1 parent
f9216897fd
commit
34f0d9f679
11 files changed
+157
-230
No files matched your search
@@ -158,7 +158,7 @@ def test_gap_pixels_on_raw_files(tmp_path):
|
||||
assert (reader.rows, reader.cols) == (514, 1030)
|
||||
frames = reader.read_all()
|
||||
assert frames.shape == (4, 514, 1030)
|
||||
assert (frames == insert_gap_pixels(expected, aare.DetectorType.Jungfrau, gaps)).all()
|
||||
assert (frames == insert_gap_pixels(expected, gaps)).all()
|
||||
|
||||
reader = MultiThreadedFileReader(master_path, n_threads=2, chunk_size=1, gap_pixels=True)
|
||||
assert reader.gap_pixels == GapPixels()
|
||||
|
||||
Reference in new issue
Block a user