From 3210ea59d72ff76a36a00a4c0b8e9ac74593aa6e Mon Sep 17 00:00:00 2001 From: Richard Dixey Date: Tue, 23 Sep 2025 17:10:29 +0100 Subject: [PATCH 1/3] add acq time to prepare --- src/dodal/devices/i11/mythen.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dodal/devices/i11/mythen.py b/src/dodal/devices/i11/mythen.py index ae7673d19b5..c3387530a20 100644 --- a/src/dodal/devices/i11/mythen.py +++ b/src/dodal/devices/i11/mythen.py @@ -110,7 +110,10 @@ def get_deadtime(self, exposure: float | None) -> float: async def prepare(self, trigger_info: TriggerInfo) -> None: if (exposure := trigger_info.livetime) is not None: - await self._driver.acquire_time.set(exposure) + await asyncio.gather( + self._driver.acquire_time.set(exposure), + self._driver.acquire_period.set(exposure), + ) if trigger_info.trigger is DetectorTrigger.INTERNAL: await self._driver.trigger_mode.set(Mythen3TriggerMode.INTERNAL) From e60044c594fc0981516c850ad57b4d02993a03ca Mon Sep 17 00:00:00 2001 From: Richard Dixey Date: Tue, 23 Sep 2025 17:14:40 +0100 Subject: [PATCH 2/3] add back static pp --- src/dodal/beamlines/i11.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/dodal/beamlines/i11.py b/src/dodal/beamlines/i11.py index c9446937ca7..3eebbbc290a 100644 --- a/src/dodal/beamlines/i11.py +++ b/src/dodal/beamlines/i11.py @@ -1,9 +1,13 @@ +from pathlib import Path + from dodal.common.beamlines.beamline_utils import ( device_factory, get_path_provider, + set_path_provider, ) from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline from dodal.common.beamlines.device_helpers import DET_SUFFIX +from dodal.common.visit import RemoteDirectoryServiceClient, StaticVisitPathProvider from dodal.devices.cryostream import OxfordCryoStream from dodal.devices.eurotherm import ( EurothermGeneral, @@ -30,6 +34,19 @@ set_log_beamline(BL) set_utils_beamline(BL) +# Currently we must hard-code the visit, determining the visit at runtime requires +# infrastructure that is still WIP. +# Communication with GDA is also WIP so for now we determine an arbitrary scan number +# locally and write the commissioning directory. The scan number is not guaranteed to +# be unique and the data is at risk - this configuration is for testing only. +set_path_provider( + StaticVisitPathProvider( + BL, + Path(f"/dls/{BL}/data/2025/cm40625-4/bluesky"), + client=RemoteDirectoryServiceClient(f"http://{BL}-control:8088/api"), + ) +) + @device_factory() def mythen3() -> Mythen3: From c32ac3cfb486b619cecae2f0c47022e83a2e309d Mon Sep 17 00:00:00 2001 From: Richard Dixey Date: Mon, 29 Sep 2025 15:46:36 +0000 Subject: [PATCH 3/3] added deadtime to acquire period --- src/dodal/devices/i11/mythen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dodal/devices/i11/mythen.py b/src/dodal/devices/i11/mythen.py index c3387530a20..73d8f078665 100644 --- a/src/dodal/devices/i11/mythen.py +++ b/src/dodal/devices/i11/mythen.py @@ -112,7 +112,7 @@ async def prepare(self, trigger_info: TriggerInfo) -> None: if (exposure := trigger_info.livetime) is not None: await asyncio.gather( self._driver.acquire_time.set(exposure), - self._driver.acquire_period.set(exposure), + self._driver.acquire_period.set(exposure + self.get_deadtime(exposure)), ) if trigger_info.trigger is DetectorTrigger.INTERNAL: