78 lines
2.2 KiB
Python
Executable File
78 lines
2.2 KiB
Python
Executable File
#!/usr/bin/env python
|
|
|
|
from slic.core.acquisition import SFAcquisition
|
|
#from slic.core.acquisition import BSAcquisition, DBAcquisition, DIAAcquisition, PVAcquisition, SFAcquisition
|
|
#from slic.core.acquisition.bschannels import BSChannels
|
|
from slic.core.scanner import Scanner
|
|
from slic.utils import Channels, Config, Elog, Screenshot
|
|
from slic.core.condition import PVCondition
|
|
from slic.gui import GUI
|
|
|
|
from slic.utils import devices
|
|
|
|
from devices import *
|
|
from adhoc import *
|
|
|
|
|
|
#TODO: why do we need this suddenly?
|
|
try:
|
|
from IPython import get_ipython
|
|
get_ipython().Completer.use_jedi = False
|
|
except:
|
|
pass
|
|
|
|
|
|
#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_detectors = "/sf/alvra/config/com/detector_lists/default_detector_list"
|
|
fn_pvs = "/sf/alvra/config/com/channel_lists/very_long_channel_list_CA"
|
|
|
|
channels = Channels(fn_channels)
|
|
detectors = Channels(fn_detectors)
|
|
pvs = Channels(fn_pvs)
|
|
|
|
detectors_disable_modules = {
|
|
"JF02T09V02": {
|
|
"disabled_modules": [0, 1, 2, 3, 6, 8]
|
|
}
|
|
}
|
|
|
|
|
|
check_intensity = PVCondition("SARFE10-PBPG050:HAMP-INTENSITY-CAL", vmin=0, vmax=1500, wait_time=3, required_fraction=0.8)
|
|
|
|
daq = SFAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels, default_pvs=pvs, default_detectors=detectors)
|
|
|
|
scan = Scanner(
|
|
scan_info_dir="/sf/alvra/data/{}/res/scan_info".format(cfg.pgroup),
|
|
# scan_info_dir="./",
|
|
default_acquisitions=[daq],
|
|
condition=check_intensity,
|
|
)
|
|
|
|
gui = GUI(scan)
|
|
|
|
|
|
bsdaqJF = Deprecator("bsdaqJF", "daq")
|
|
scansJF = Deprecator("scansJF", "scan")
|
|
|
|
|
|
#daqBS = BSAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels)
|
|
#daqDB = DBAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels)
|
|
#daqPV = PVAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels)
|
|
|
|
#scanBS = Scanner(
|
|
## scan_info_dir="/sf/alvra/data/{}/res/scan_info".format(cfg.pgroup),
|
|
# scan_info_dir="./",
|
|
# default_acquisitions=[daqBS],
|
|
#)
|
|
|
|
|
|
|