added prototype for "scan engine"

This commit is contained in:
2019-12-01 13:58:59 +00:00
commit e2f667e085
3 changed files with 304 additions and 0 deletions

75
alvra.py Executable file
View File

@ -0,0 +1,75 @@
#!/usr/bin/env python
from slic.controls import PV
from slic.daq import BS, DIA, Scanner
from slic.utils import Channels, Config, Elog, Screenshot
from slic.checkers import PVChecker
from slic.devices.device import Device
from alvra_devices import *
from alvra_adhoc import *
cfg = Config("/sf/alvra/config/exp/current_experiment.json")
elog = Elog(cfg.elog_url, cfg.user, cfg.screenshot_directory)
screenshot = Screenshot(cfg.screenshot_directory)
check_intensity = PVChecker("SARFE10-PBPG050:HAMP-INTENSITY-CAL", vmin=100, vmax=300, wait_time=3)
bsdaqJF = DIA(
api_address="http://sf-daq-alvra:10000",
jf_name="JF_4.5M",
pgroup=cfg.pgroup
)
scansJF = Scanner(
data_base_dir="scan_data",
scan_info_dir="/sf/alvra/data/{}/res/scan_info".format(cfg.pgroup),
default_counters=[bsdaqJF],
checker=check_intensity,
scan_directories=True,
)
channels = Channels("/sf/alvra/config/com/channel_lists/default_channel_list")
bsdaq = BS(channels, default_file_path="???")
scansBSreadLocal = Scanner(
data_base_dir="/sf/alvra/config/com/data/scan_data",
scan_info_dir="/sf/alvra/config/com/data/scan_info",
default_counters=[bsdaq],
)
shut_und = Device(
"SARFE10-OPSH044",
description="Photon shutter after Undulator"
)
pbps_und = Device(
"SARFE10-PBPS053",
z_undulator=44,
description="Intensity position monitor after Undulator (PBPS)"
)
print(shut_und)
print(pbps_und)