Compare commits
1 Commits
main
...
feature/si
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2b18d367a |
2
pxiii_bec/bec_ipython_client/plugins/beam_stop_scan.py
Normal file
2
pxiii_bec/bec_ipython_client/plugins/beam_stop_scan.py
Normal file
@@ -0,0 +1,2 @@
|
||||
def beam_stop_scan():
|
||||
print("running beam stop scan")
|
||||
@@ -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
22
start_bec_client.py
Normal 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()
|
||||
|
||||
Reference in New Issue
Block a user