fix: separate detector tilt geometry per beamline

This commit is contained in:
2026-09-01 14:35:54 +02:00
parent 08866f8cc5
commit d359bef2e1
4 changed files with 35 additions and 7 deletions
@@ -49,6 +49,15 @@ def test_pxii_dispatch_beam_center():
assert np.isclose(beam_center[1][0], 2242.05, atol=1)
@pytest.mark.skipif(
importlib.util.find_spec("pxii_bec") is None, reason="run only for pxii flavour"
)
def test_poni_rot_is_0():
with patch.dict("os.environ", {"BEAMLINE": "X10SA"}):
dispatch = get_beamline_dispatch()
assert dispatch.geo.detector_tilt == (0, 0)
@pytest.mark.skipif(
importlib.util.find_spec("pxiii_bec") is None, reason="run only for pxiii flavour"
)
@@ -56,3 +65,12 @@ def test_pxiii_dispatch_can_be_instantiated():
with patch.dict("os.environ", {"BEAMLINE": "X06DA"}):
dispatch = get_beamline_dispatch()
assert isinstance(dispatch, X06daDispatch)
@pytest.mark.skipif(
importlib.util.find_spec("pxiii_bec") is None, reason="run only for pxiii flavour"
)
def test_poni_rot_is_not_0():
with patch.dict("os.environ", {"BEAMLINE": "X06DA"}):
dispatch = get_beamline_dispatch()
assert dispatch.geo.detector_tilt != (0, 0)