diff --git a/src/aare/beamline_dispatch/protocols.py b/src/aare/beamline_dispatch/protocols.py index 1d9b54cd..c1f74af6 100644 --- a/src/aare/beamline_dispatch/protocols.py +++ b/src/aare/beamline_dispatch/protocols.py @@ -18,7 +18,7 @@ class BecMacros(ABC): def save_current_position(device, position, axis=None, force=False, max_delta=0.5) -> None: ... @staticmethod @abstractmethod - def init_beamline_environment() -> tuple[Any, Any]: ... + def init_beamline_environment() -> tuple[Any, Any, Any]: ... @staticmethod @abstractmethod def bl_energy(energy_ev, move_gap=True, mono_scan=True, plot=True): ... diff --git a/src/aare/beamline_dispatch/simulated/beamline_dispatch.py b/src/aare/beamline_dispatch/simulated/beamline_dispatch.py index 7f892533..ed14548e 100644 --- a/src/aare/beamline_dispatch/simulated/beamline_dispatch.py +++ b/src/aare/beamline_dispatch/simulated/beamline_dispatch.py @@ -17,8 +17,8 @@ class SimulatedBecMacros(BecMacros): @staticmethod def save_current_position(device, position, axis=None, force=False, max_delta=0.5) -> None: ... @staticmethod - def init_beamline_environment() -> tuple[Any, Any]: - return (None, None) + def init_beamline_environment() -> tuple[Any, Any, Any]: + return (None, None, None) @staticmethod def bl_energy(energy_ev, move_gap=True, mono_scan=True, plot=True): ... diff --git a/src/aare/beamline_dispatch/x06da/beamline_dispatch.py b/src/aare/beamline_dispatch/x06da/beamline_dispatch.py index a19ee1e3..5ab50b50 100644 --- a/src/aare/beamline_dispatch/x06da/beamline_dispatch.py +++ b/src/aare/beamline_dispatch/x06da/beamline_dispatch.py @@ -41,7 +41,7 @@ class X06daBecMacros(BecMacros): @staticmethod def save_current_position(device, position, axis=None, force=False, max_delta=0.5) -> None: ... @staticmethod - def init_beamline_environment() -> tuple[Any, Any]: ... + def init_beamline_environment() -> tuple[Any, Any, Any]: ... @staticmethod def bl_energy(energy_ev, move_gap=True, mono_scan=True, plot=True): ... @staticmethod diff --git a/src/aare/beamline_dispatch/x10sa/beamline_dispatch.py b/src/aare/beamline_dispatch/x10sa/beamline_dispatch.py index 96b66114..aebc2c71 100644 --- a/src/aare/beamline_dispatch/x10sa/beamline_dispatch.py +++ b/src/aare/beamline_dispatch/x10sa/beamline_dispatch.py @@ -12,9 +12,6 @@ class X10SaBecMacros(BecMacros): save_and_reload, save_current_position, ) - from pxii_bec.macros.init_beamline import ( # pyright: ignore[reportMissingImports, reportMissingModuleSource] - init_beamline_environment, - ) from pxii_bec.macros.katscripts import ( # pyright: ignore[reportMissingImports, reportMissingModuleSource] auto_exposure, ) @@ -23,6 +20,9 @@ class X10SaBecMacros(BecMacros): get_current_energy, mono_pitch_scan, ) + from pxii_bec.scripts.init_beamline import ( # pyright: ignore[reportMissingImports, reportMissingModuleSource] + init_beamline_environment, + ) self.save_and_reload = save_and_reload self.save_current_position = save_current_position @@ -37,7 +37,7 @@ class X10SaBecMacros(BecMacros): @staticmethod def save_current_position(device, position, axis=None, force=False, max_delta=0.5) -> None: ... @staticmethod - def init_beamline_environment() -> tuple[Any, Any]: ... + def init_beamline_environment() -> tuple[Any, Any, Any]: ... @staticmethod def bl_energy(energy_ev, move_gap=True, mono_scan=True, plot=True): ... @staticmethod diff --git a/src/aare/devices/bec_worker.py b/src/aare/devices/bec_worker.py index 680d8856..54b716fb 100644 --- a/src/aare/devices/bec_worker.py +++ b/src/aare/devices/bec_worker.py @@ -112,7 +112,7 @@ class BECClientWorker: def _init_beamline_environment(self): try: - self.position_devices, self.planner = self.macros.init_beamline_environment() + _, self.position_devices, self.planner = self.macros.init_beamline_environment() self._backlight_brightness = self.position_devices["bl_bright"] self._frontlight_brightness = self.position_devices["fl_bright"] self._zoom = self.dev.scam_zoom