pre-cleanup
This commit is contained in:
36
alvra.py
36
alvra.py
@ -1,9 +1,11 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
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, PV
|
||||
from slic.core.condition import PVCondition
|
||||
from slic.gui import GUI
|
||||
|
||||
from slic.utils import devices
|
||||
|
||||
@ -11,6 +13,14 @@ 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)
|
||||
@ -21,13 +31,29 @@ 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)
|
||||
fn_detectors = "/sf/alvra/config/com/detector_lists/default_detector_list"
|
||||
fn_PV = "/sf/alvra/config/com/channel_lists/very_long_channel_list_CA"
|
||||
channels = Channels(fn_channels)
|
||||
detectors = Channels(fn_detectors)
|
||||
pvs = Channels(fn_PV)
|
||||
|
||||
detectors_disable_modules = {
|
||||
"JF02T09V02": {
|
||||
"disabled_modules": [0, 1, 2, 3, 6, 8]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
check_intensity = PVCondition("SARFE10-PBPG050:HAMP-INTENSITY-CAL", vmin=-100, vmax=300, wait_time=3, required_fraction=0.8)
|
||||
## this is probably too clever for its own good:
|
||||
#bschs = BSChannels.from_file("/sf/alvra/config/com/channel_lists/very_long_channel_list")
|
||||
#channels, pvs = bschs.online, bschs.offline
|
||||
|
||||
#bsdaqJF = DIAAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels)
|
||||
bsdaqJF = SFAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels)
|
||||
#channels = Channels("/sf/alvra/config/com/channel_lists/very_long_channel_list_BS")
|
||||
#pvs = Channels("/sf/alvra/config/com/channel_lists/very_long_channel_list_CA")
|
||||
|
||||
check_intensity = PVCondition("SARFE10-PBPG050:HAMP-INTENSITY-CAL", vmin=0, vmax=1500, wait_time=3, required_fraction=0.8)
|
||||
|
||||
bsdaqJF = SFAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels, default_pvs=pvs, default_detectors=detectors)
|
||||
|
||||
scansJF = Scanner(
|
||||
scan_info_dir="/sf/alvra/data/{}/res/scan_info".format(cfg.pgroup),
|
||||
@ -50,7 +76,7 @@ bsdaqDB = DBAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels)
|
||||
bsdaqPV = PVAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels)
|
||||
|
||||
|
||||
|
||||
gui = GUI(scansJF)
|
||||
|
||||
|
||||
#for k, v in sorted(dict(globals()).items()):
|
||||
|
Reference in New Issue
Block a user