66 lines
1.9 KiB
Python
Executable File
66 lines
1.9 KiB
Python
Executable File
#!/usr/bin/env python
|
|
|
|
from slic.core.acquisition import BSAcquisition, DBAcquisition, DIAAcquisition, PVAcquisition, SFAcquisition
|
|
from slic.core.scanner import Scanner
|
|
from slic.utils import Channels, Config, Elog, Screenshot, PV
|
|
from slic.core.condition import PVCondition
|
|
|
|
from slic.utils import devices
|
|
|
|
from devices import *
|
|
from adhoc import *
|
|
|
|
|
|
#fn_cfg = "/sf/alvra/config/exp/current_experiment.json"
|
|
fn_cfg = "/sf/alvra/config/src/python/slic/alvra/config/config.json"
|
|
cfg = Config(fn_cfg)
|
|
|
|
elog = Elog(cfg.elog_url, cfg.screenshot_directory, user=cfg.user, password="supercorrect") #TODO: remove fake password
|
|
screenshot = Screenshot(cfg.screenshot_directory)
|
|
|
|
|
|
fn_channels = "/sf/alvra/config/com/channel_lists/default_channel_list"
|
|
#fn_channels = "/sf/alvra/config/src/python/slic/alvra/config/channel_list"
|
|
channels = Channels(fn_channels)
|
|
|
|
|
|
check_intensity = PVCondition("SARFE10-PBPG050:HAMP-INTENSITY-CAL", vmin=-100, vmax=300, wait_time=3, required_fraction=0.8)
|
|
|
|
#bsdaqJF = DIAAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels)
|
|
bsdaqJF = SFAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels)
|
|
|
|
scansJF = Scanner(
|
|
scan_info_dir="/sf/alvra/data/{}/res/scan_info".format(cfg.pgroup),
|
|
# scan_info_dir="./",
|
|
default_acquisitions=[bsdaqJF],
|
|
condition=check_intensity,
|
|
)
|
|
|
|
|
|
bsdaq = BSAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels)
|
|
|
|
scansBSreadLocal = Scanner(
|
|
# scan_info_dir="/sf/alvra/data/{}/res/scan_info".format(cfg.pgroup),
|
|
scan_info_dir="./",
|
|
default_acquisitions=[bsdaq],
|
|
)
|
|
|
|
|
|
bsdaqDB = DBAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels)
|
|
bsdaqPV = PVAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels)
|
|
|
|
|
|
|
|
|
|
|
|
#for k, v in sorted(dict(globals()).items()):
|
|
# if k.startswith("__"):
|
|
# continue
|
|
# print("=" * 50)
|
|
# print(k + ":")
|
|
# print("-" * (len(k) + 1))
|
|
# print(v)
|
|
|
|
|
|
|