adding beam center to raster shots, correcting test logic
Build and Publish / test (push) Successful in 2m7s
Build and Publish / build (push) Successful in 17s
Build and Publish / Build and Deploy Docs (push) Successful in 40s

This commit is contained in:
GotthardG
2026-06-30 15:16:22 +02:00
parent 85d568fe52
commit 51535239d0
@@ -22,11 +22,13 @@ def test_screening_diffraction_uploads_one_image_per_wedge():
scan_result = SimpleNamespace(images=[_img(0, 0.0, 245, 2.1), _img(1, 90.0, 12, 8.5)])
svc._ingest_screening_diffraction(SimpleNamespace(db_id=123), scan_result)
# one fetch + one upload per wedge, with spots + resolution-estimate ring on
# one fetch + one upload per wedge, with spots + resolution-estimate ring
# + beam center overlays on
assert jfjoch.get_diffraction_image.call_count == 2
for call in jfjoch.get_diffraction_image.call_args_list:
assert call.kwargs["show_spots"] is True
assert call.kwargs["show_res_est"] is True
assert call.kwargs["show_beam_center"] is True
assert aare.upload_jpg.call_count == 2
first = aare.upload_jpg.call_args_list[0]
@@ -46,7 +48,9 @@ def test_screening_diffraction_skips_images_without_id():
SimpleNamespace(images=[SimpleNamespace(number=None), _img(3)]),
)
jfjoch.get_diffraction_image.assert_called_once_with(3, show_spots=True, show_res_est=True)
jfjoch.get_diffraction_image.assert_called_once_with(
3, show_spots=True, show_res_est=True, show_beam_center=True
)
assert aare.upload_jpg.call_count == 1