1 Commits

Author SHA1 Message Date
gac-x06da
d2b18d367a Found local changes on deployment system 2024-06-20 15:50:57 +02:00
3 changed files with 38 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
def beam_stop_scan():
print("running beam stop scan")

View File

@@ -15,12 +15,25 @@ class PlotUpdate(AutoUpdates):
# plt = self.figure.plot(dev_x, dev_y)
# plt.set(title=f"PXIII: Scan {info.scan_number}", x_label=dev_x, y_label=dev_y)
def px_default_line_scan(self, info:ScanInfo):
dev_x = info.scan_report_devices[0]
dev_y = "bpm4i"
self.figure.clear_all()
plt = self.figure.plot(dev_x, dev_y)
plt.set(title="Custom line scan with samy")
def handler(self, info: ScanInfo) -> None:
# EXAMPLES:
# if info.scan_name == "line_scan" and info.scan_report_devices:
# self.simple_line_scan(info)
# return
# if info.scan_name == "grid_scan" and info.scan_report_devices:
# self.run_grid_scan_update(info)
# self.simple_grid_scan(info)
# return
if info.scan_report_devices and info.scan_report_devices[0] == "samy":
self.px_default_line_scan(info)
return
super().handler(info)

22
start_bec_client.py Normal file
View File

@@ -0,0 +1,22 @@
from bec_ipython_client import BECIPythonClient
from bec_lib import bec_logger, ServiceConfig
logger = bec_logger.logger
bec_logger.level = bec_logger.LOGLEVEL.SUCCESS
config = ServiceConfig(redis={"host":"x06da-bec-001", "port":6379})
bec = BECIPythonClient(config=config)
bec.start()
bec.load_high_level_interface("spec_hli")
dev = bec.device_manager.devices
scans = bec.scans
logger.success("Started BECClient")
##########################################
from pxiii_bec.bec_ipython_client.plugins.beam_stop_scan import beam_stop_scan
beam_stop_scan()