Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move beamstop to use an XYZPositioner and remove old device #695

Merged
merged 5 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/dodal/beamlines/i04.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
)
from dodal.devices.attenuator import Attenuator
from dodal.devices.backlight import Backlight
from dodal.devices.beamstop import BeamStop
from dodal.devices.dcm import DCM
from dodal.devices.detector import DetectorParams
from dodal.devices.detector.detector_motion import DetectorMotion
Expand Down Expand Up @@ -107,14 +106,14 @@ def ipin(wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False) ->

def beamstop(
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
) -> BeamStop:
) -> XYZPositioner:
"""Get the i04 beamstop device, instantiate it if it hasn't already been.
If this is called when already instantiated in i04, it will return the existing object.
"""
return device_instantiation(
BeamStop,
XYZPositioner,
"beamstop",
"",
"-MO-BS-01:",
wait_for_connection,
fake_with_ophyd_sim,
)
Expand Down
8 changes: 0 additions & 8 deletions src/dodal/devices/beamstop.py

This file was deleted.

4 changes: 2 additions & 2 deletions tests/common/beamlines/test_beamline_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

from dodal.beamlines import i03
from dodal.common.beamlines import beamline_utils
from dodal.devices.beamstop import BeamStop
from dodal.devices.eiger import EigerDetector
from dodal.devices.motors import XYZPositioner
from dodal.devices.smargon import Smargon
from dodal.devices.zebra import Zebra
from dodal.log import LOGGER
Expand All @@ -38,7 +38,7 @@ def setup():


def test_instantiate_function_makes_supplied_device():
device_types = [Zebra, BeamStop, Smargon]
device_types = [Zebra, XYZPositioner, Smargon]
for device in device_types:
dev = beamline_utils.device_instantiation(
device, device.__name__, "", False, True, None
Expand Down
Loading