From f5f183b57b9fde407c4ec83ff1b7f4680117d00c Mon Sep 17 00:00:00 2001 From: Tom Trafford Date: Thu, 28 Nov 2024 09:05:43 +0000 Subject: [PATCH] Changed to trigger on lower position, rather than midpoint --- src/ophyd_async/fastcs/panda/_trigger.py | 2 +- tests/fastcs/panda/test_trigger.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ophyd_async/fastcs/panda/_trigger.py b/src/ophyd_async/fastcs/panda/_trigger.py index 52518ba2da..7f5bcf51dc 100644 --- a/src/ophyd_async/fastcs/panda/_trigger.py +++ b/src/ophyd_async/fastcs/panda/_trigger.py @@ -88,7 +88,7 @@ async def prepare(self, value: ScanSpecInfo): rows += SeqTable.row( trigger=trig, position=int( - chunk.midpoints[fast_axis][start] + chunk.lower[fast_axis][start] / await fast_axis.encoder_res.get_value() ), ) diff --git a/tests/fastcs/panda/test_trigger.py b/tests/fastcs/panda/test_trigger.py index 5170d1bed8..e972bcdbe9 100644 --- a/tests/fastcs/panda/test_trigger.py +++ b/tests/fastcs/panda/test_trigger.py @@ -115,7 +115,7 @@ async def test_seq_scanspec_trigger_logic(mock_panda, sim_x_motor, sim_y_motor) SeqTrigger.IMMEDIATE, SeqTrigger.BITA_0, ] - assert (out.position == [0, 0, 50, 0, 0, 0, 250, 0, 0, 0, 50, 0, 0]).all() + assert (out.position == [0, 0, 25, 0, 0, 0, 275, 0, 0, 0, 25, 0, 0]).all() assert (out.time1 == [0, 0, 0, 900000, 0, 0, 0, 900000, 0, 0, 0, 900000, 0]).all() assert (out.time2 == [0, 0, 0, 100000, 0, 0, 0, 100000, 0, 0, 0, 100000, 0]).all()