File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 11from ophyd_async .core import Reference
2+ from ophyd_async .fastcs .eiger import EigerDetector as FastCSEiger
23
34from dodal .common .beamlines .beamline_parameters import get_beamline_parameters
45from dodal .common .beamlines .beamline_utils import (
56 device_factory ,
67 device_instantiation ,
8+ get_path_provider ,
79)
810from dodal .common .beamlines .beamline_utils import set_beamline as set_utils_beamline
911from dodal .devices .aperturescatterguard import (
@@ -374,3 +376,16 @@ def scintillator() -> Scintillator:
374376 Reference (aperture_scatterguard ()),
375377 get_beamline_parameters (),
376378 )
379+
380+
381+ @device_factory ()
382+ def fastcs_eiger () -> FastCSEiger :
383+ """Get the i04 FastCS Eiger device, instantiate it if it hasn't already been.
384+ If this is called when already instantiated in i04, it will return the existing object.
385+ """
386+ return FastCSEiger (
387+ prefix = PREFIX .beamline_prefix ,
388+ path_provider = get_path_provider (),
389+ drv_suffix = "-EA-EIGER-02:" ,
390+ hdf_suffix = "-EA-EIGER-01:OD:" ,
391+ )
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ def configure_and_arm_detector(
4242 eiger : EigerDetector ,
4343 detector_params : DetectorParams ,
4444 trigger_info : TriggerInfo ,
45+ group : str = "arm_detector" ,
46+ wait : bool = False ,
4547):
4648 assert detector_params .expected_energy_ev
4749 start = time .time ()
@@ -68,7 +70,7 @@ def configure_and_arm_detector(
6870 yield from set_mx_settings_pvs (eiger , detector_params , wait = True )
6971 LOGGER .info (f"Setting MX PVs: { time .time () - start } s" )
7072 start = time .time ()
71- yield from bps .prepare (eiger , trigger_info , wait = True )
73+ yield from bps .prepare (eiger , trigger_info , group = group )
7274 LOGGER .info (f"Preparing Eiger: { time .time () - start } s" )
7375
7476
You can’t perform that action at this time.
0 commit comments