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

Allow using ophyd pin tip centring #210

Merged
merged 2 commits into from
Oct 23, 2023
Merged
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
17 changes: 17 additions & 0 deletions src/dodal/beamlines/i03.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from dodal.devices.fast_grid_scan import FastGridScan
from dodal.devices.flux import Flux
from dodal.devices.oav.oav_detector import OAV
from dodal.devices.oav.pin_image_recognition import PinTipDetection
from dodal.devices.s4_slit_gaps import S4SlitGaps
from dodal.devices.sample_shutter import SampleShutter
from dodal.devices.smargon import Smargon
Expand Down Expand Up @@ -151,6 +152,22 @@
)


@skip_device(lambda: BL == "s03")
def pin_tip_detection(
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
) -> PinTipDetection:
"""Get the i03 pin tip detection device, instantiate it if it hasn't already been.
If this is called when already instantiated in i03, it will return the existing object.
"""
return device_instantiation(

Check warning on line 162 in src/dodal/beamlines/i03.py

View check run for this annotation

Codecov / codecov/patch

src/dodal/beamlines/i03.py#L162

Added line #L162 was not covered by tests
PinTipDetection,
"pin_tip_detection",
"-DI-OAV-01:",
wait_for_connection,
fake_with_ophyd_sim,
)


def smargon(
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
) -> Smargon:
Expand Down