fix: update different macro sigs for 10s vs 6d
CI / lint (pull_request) Successful in 43s
CI / test (3.12) (pull_request) Successful in 1m3s
CI / test (3.13) (pull_request) Successful in 1m4s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m6s
CI / test (3.14) (pull_request) Successful in 1m10s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m25s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m25s
CI / test-with-coverage (pull_request) Successful in 1m37s
CI / coverage-analysis (pull_request) Failing after 4s
Docs build and publish / docker (push) Successful in 6s
CI / lint (push) Canceled after 34s
CI / test (3.12) (push) Canceled after 32s
CI / test (3.13) (push) Canceled after 29s
CI / test (3.14) (push) Canceled after 27s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 24s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 22s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 19s
CI / test-with-coverage (push) Canceled after 17s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 17s
CI / lint (pull_request) Successful in 43s
CI / test (3.12) (pull_request) Successful in 1m3s
CI / test (3.13) (pull_request) Successful in 1m4s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m6s
CI / test (3.14) (pull_request) Successful in 1m10s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m25s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m25s
CI / test-with-coverage (pull_request) Successful in 1m37s
CI / coverage-analysis (pull_request) Failing after 4s
Docs build and publish / docker (push) Successful in 6s
CI / lint (push) Canceled after 34s
CI / test (3.12) (push) Canceled after 32s
CI / test (3.13) (push) Canceled after 29s
CI / test (3.14) (push) Canceled after 27s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 24s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 22s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 19s
CI / test-with-coverage (push) Canceled after 17s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 17s
This commit was merged in pull request #176.
This commit is contained in:
@@ -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, Any]: ...
|
||||
def init_beamline_environment() -> tuple[Any, Any]: ...
|
||||
@staticmethod
|
||||
@abstractmethod
|
||||
def bl_energy(energy_ev, move_gap=True, mono_scan=True, plot=True): ...
|
||||
|
||||
@@ -15,8 +15,8 @@ class X06daBecMacros(BecMacros):
|
||||
from pxiii_bec.macros.init_beamline import ( # pyright: ignore[reportMissingImports, reportMissingModuleSource]
|
||||
init_beamline_environment,
|
||||
)
|
||||
from pxiii_bec.macros.katscripts import (
|
||||
auto_exposure, # pyright: ignore[reportMissingImports, reportMissingModuleSource]
|
||||
from pxiii_bec.macros.katscripts import ( # pyright: ignore[reportMissingImports, reportMissingModuleSource]
|
||||
auto_exposure,
|
||||
)
|
||||
from pxiii_bec.macros.pxiii_energy import ( # pyright: ignore[reportMissingImports, reportMissingModuleSource]
|
||||
bl_energy,
|
||||
@@ -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, Any]: ...
|
||||
def init_beamline_environment() -> tuple[Any, Any]: ...
|
||||
@staticmethod
|
||||
def bl_energy(energy_ev, move_gap=True, mono_scan=True, plot=True): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -24,20 +24,33 @@ class X10SaBecMacros(BecMacros):
|
||||
init_beamline_environment,
|
||||
)
|
||||
|
||||
self.save_and_reload = save_and_reload
|
||||
def _save_and_reload():
|
||||
save_and_reload()
|
||||
_, planner, devices = init_beamline_environment()
|
||||
return planner, devices
|
||||
|
||||
def _init_beamline_environment():
|
||||
_, planner, devices = init_beamline_environment()
|
||||
return planner, devices
|
||||
|
||||
self.save_and_reload = _save_and_reload
|
||||
self.save_current_position = save_current_position
|
||||
self.init_beamline_environment = init_beamline_environment
|
||||
self.init_beamline_environment = _init_beamline_environment
|
||||
self.bl_energy = bl_energy
|
||||
self.get_current_energy = get_current_energy
|
||||
self.mono_pitch_scan = mono_pitch_scan
|
||||
self.auto_exposure = auto_exposure
|
||||
|
||||
def _auto_exposure():
|
||||
auto_exposure()
|
||||
|
||||
self.auto_exposure = _auto_exposure
|
||||
|
||||
@staticmethod
|
||||
def save_and_reload() -> tuple[Any, Any]: ...
|
||||
@staticmethod
|
||||
def save_current_position(device, position, axis=None, force=False, max_delta=0.5) -> None: ...
|
||||
@staticmethod
|
||||
def init_beamline_environment() -> tuple[Any, Any, Any]: ...
|
||||
def init_beamline_environment() -> tuple[Any, Any]: ...
|
||||
@staticmethod
|
||||
def bl_energy(energy_ev, move_gap=True, mono_scan=True, plot=True): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -114,7 +114,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
|
||||
@@ -500,16 +500,17 @@ class BECClientWorker:
|
||||
def save_current_bs_pos(self):
|
||||
self.macros.save_current_position(self.dev.bs_y, "in")
|
||||
self.macros.save_current_position(self.dev.bs_x, "in")
|
||||
self.save_config_and_reload_devices()
|
||||
|
||||
def save_current_collimator_pos(self):
|
||||
self.macros.save_current_position(self.dev.coll_x, "in")
|
||||
self.macros.save_current_position(self.dev.coll_y, "in")
|
||||
self.save_config_and_reload_devices()
|
||||
|
||||
def save_current_aerotech_position(self):
|
||||
self.macros.save_current_position(self.dev.aerotech, "in", axis="x")
|
||||
self.macros.save_current_position(self.dev.aerotech, "work", axis="y")
|
||||
self.macros.save_current_position(self.dev.aerotech, "work", axis="z")
|
||||
|
||||
self.save_config_and_reload_devices()
|
||||
|
||||
def save_config_and_reload_devices(self):
|
||||
|
||||
Reference in New Issue
Block a user