Skip to content

Commit

Permalink
Add oav fixture, test_bimorph_optimisaiton skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-fernandes committed Jan 17, 2025
1 parent 0356666 commit 15592d9
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion tests/plans/test_bimorph.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import pytest
from bluesky.run_engine import RunEngine
from bluesky.utils import Msg
from ophyd_async.core import DeviceCollector
from ophyd_async.core import DeviceCollector, StandardDetector
from ophyd_async.epics.adsimdetector import SimDetector
from ophyd_async.testing import callback_on_mock_put, set_mock_value

from dodal.devices.slits import Slits
Expand All @@ -26,6 +27,11 @@ def callback(value, wait=False, signal=motor.user_readback):
return slits


@pytest.fixture
def oav(static_path_provider) -> StandardDetector:
return SimDetector("FAKE-PREFIX", path_provider=static_path_provider)


@pytest.mark.parametrize("dimension", [SlitDimension.X, SlitDimension.Y])
@pytest.mark.parametrize("gap", [1.0])
@pytest.mark.parametrize("center", [2.0])
Expand All @@ -50,3 +56,20 @@ async def test_move_slits(
Msg("set", centre_signal, center, group=ANY),
Msg("wait", None, group=ANY),
] == messages


async def test_bimorph_optimisation(
mirror_with_mocked_put,
slits,
oav,
voltage_increment,
active_dimension,
active_slit_center_start,
active_slit_center_end,
active_slit_size,
inactive_slit_center,
inactive_slit_size,
number_of_slit_positions,
bimorph_settle_time,
initial_voltage_list,
): ...

0 comments on commit 15592d9

Please sign in to comment.