mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-03-02 00:18:40 +01:00
Fix/test (#278)
Some checks failed
Build on RHEL8 / build (push) Successful in 2m29s
Build on RHEL9 / build (push) Successful in 2m40s
Build on local RHEL9 / build (push) Successful in 1m9s
Run tests using data on local RHEL8 / build (push) Has been cancelled
Build on local RHEL8 / build (push) Has been cancelled
Some checks failed
Build on RHEL8 / build (push) Successful in 2m29s
Build on RHEL9 / build (push) Successful in 2m40s
Build on local RHEL9 / build (push) Successful in 1m9s
Run tests using data on local RHEL8 / build (push) Has been cancelled
Build on local RHEL8 / build (push) Has been cancelled
This commit is contained in:
@@ -17,6 +17,7 @@ def test_read_rawfile_with_roi_spanning_over_one_module(test_data_path):
|
||||
assert headers.size == 10100
|
||||
assert frames.shape == (10100, 256, 256)
|
||||
|
||||
|
||||
@pytest.mark.withdata
|
||||
def test_read_rawfile_with_multiple_rois(test_data_path):
|
||||
with RawFile(test_data_path / "raw/ROITestData/MultipleROIs/run_master_0.json") as f:
|
||||
@@ -27,7 +28,7 @@ def test_read_rawfile_with_multiple_rois(test_data_path):
|
||||
f.read_frame()
|
||||
|
||||
assert f.tell() == 0
|
||||
frames = f.read_ROIs()
|
||||
_, frames = f.read_rois()
|
||||
assert num_rois == 2
|
||||
assert len(frames) == 2
|
||||
assert frames[0].shape == (301, 101)
|
||||
@@ -36,15 +37,16 @@ def test_read_rawfile_with_multiple_rois(test_data_path):
|
||||
assert f.tell() == 1
|
||||
|
||||
# read multiple ROIs at once
|
||||
frames = f.read_n_ROIs(2, 1)
|
||||
_, frames = f.read_n_with_roi(2, roi_index = 1)
|
||||
assert frames.shape == (2, 101, 101)
|
||||
|
||||
assert f.tell() == 3
|
||||
|
||||
f.seek(1)
|
||||
|
||||
# read specific ROI
|
||||
frame = f.read_ROIs(1, 0)
|
||||
assert len(frame) == 1
|
||||
assert frame[0].shape == (301, 101)
|
||||
_, frame = f.read_roi(0)
|
||||
assert frame.shape == (301, 101)
|
||||
assert f.tell() == 2
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user