Skip to content

Commit

Permalink
Add saxs and waxs Pilatus detectors to i22 beamline
Browse files Browse the repository at this point in the history
- Adds DLS standard constructor for ophyd-async Pilatus implementation
  • Loading branch information
DiamondJoseph committed Apr 23, 2024
1 parent cee1627 commit 05e5bcf
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/dodal/beamlines/i22.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from ophyd_async.epics.areadetector import PilatusDetector

from dodal.beamlines.beamline_utils import device_instantiation, get_directory_provider
from dodal.beamlines.beamline_utils import set_beamline as set_utils_beamline
from dodal.devices.areadetector.pilatus import DLSPilatus
from dodal.devices.tetramm import TetrammDetector
from dodal.log import set_beamline as set_log_beamline
from dodal.utils import get_beamline_name
Expand Down Expand Up @@ -35,3 +38,29 @@ def it(
fake_with_ophyd_sim,
directory_provider=get_directory_provider(),
)


def saxs(
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
) -> PilatusDetector:
return device_instantiation(
DLSPilatus,
"saxs",
"-EA-PILAT-01:",
wait_for_connection,
fake_with_ophyd_sim,
directory_provider=get_directory_provider(),
)


def waxs(
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
) -> PilatusDetector:
return device_instantiation(
DLSPilatus,
"waxs",
"-EA-PILAT-03:",
wait_for_connection,
fake_with_ophyd_sim,
directory_provider=get_directory_provider(),
)
15 changes: 15 additions & 0 deletions src/dodal/devices/areadetector/pilatus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from ophyd_async.core import DirectoryProvider
from ophyd_async.epics.areadetector import PilatusDetector
from ophyd_async.epics.areadetector.drivers import PilatusDriver
from ophyd_async.epics.areadetector.writers import NDFileHDF


def DLSPilatus(
prefix: str, name: str, directory_provider: DirectoryProvider
) -> PilatusDetector:
return PilatusDetector(
name=name,
directory_provider=directory_provider,
driver=PilatusDriver(prefix + "DRV:"),
hdf=NDFileHDF(prefix + "HDF:"),
)

0 comments on commit 05e5bcf

Please sign in to comment.