updated PV channel list filename; updated disabled detector modules; updated intensity beam condition; added lots of shortcuts and markers
This commit is contained in:
108
alvra.py
108
alvra.py
@ -4,14 +4,14 @@ from slic.core.acquisition import SFAcquisition
|
|||||||
#from slic.core.acquisition import BSAcquisition, DBAcquisition, DIAAcquisition, PVAcquisition, SFAcquisition
|
#from slic.core.acquisition import BSAcquisition, DBAcquisition, DIAAcquisition, PVAcquisition, SFAcquisition
|
||||||
#from slic.core.acquisition.bschannels import BSChannels
|
#from slic.core.acquisition.bschannels import BSChannels
|
||||||
from slic.core.scanner import Scanner
|
from slic.core.scanner import Scanner
|
||||||
from slic.core.acquisition import BSChannels
|
from slic.core.acquisition import BSChannels, PVChannels
|
||||||
from slic.core.acquisition import PVChannels
|
from slic.core.adjustable import DummyAdjustable
|
||||||
from slic.utils.channels import load_channels
|
from slic.utils import Config, Elog, Screenshot, load_channels
|
||||||
from slic.utils import Config, Elog, Screenshot
|
|
||||||
from slic.core.condition import PVCondition
|
from slic.core.condition import PVCondition
|
||||||
from slic.gui import GUI
|
from slic.gui import GUI
|
||||||
|
|
||||||
from slic.utils import devices
|
from slic.utils import devices
|
||||||
|
from slic.utils import Marker, as_shortcut
|
||||||
|
|
||||||
from devices import *
|
from devices import *
|
||||||
from adhoc import *
|
from adhoc import *
|
||||||
@ -35,7 +35,7 @@ screenshot = Screenshot(cfg.screenshot_directory)
|
|||||||
|
|
||||||
fn_channels = "/sf/alvra/config/com/channel_lists/default_channel_list"
|
fn_channels = "/sf/alvra/config/com/channel_lists/default_channel_list"
|
||||||
fn_detectors = "/sf/alvra/config/com/detector_lists/default_detector_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"
|
fn_pvs = "/sf/alvra/config/com/channel_lists/PV_default_channel_list"
|
||||||
|
|
||||||
channels = BSChannels.from_file(fn_channels)
|
channels = BSChannels.from_file(fn_channels)
|
||||||
detectors = load_channels(fn_detectors)
|
detectors = load_channels(fn_detectors)
|
||||||
@ -52,15 +52,23 @@ pvs = PVChannels.from_file(fn_pvs)
|
|||||||
|
|
||||||
|
|
||||||
detectors_disable_modules = {
|
detectors_disable_modules = {
|
||||||
"JF02T09V02": {
|
"JF02T09V03": {
|
||||||
"disabled_modules": [0, 1, 2, 3, 6, 8]
|
"disabled_modules": [0, 1, 2, 3, 5, 6, 7, 8], "remove_raw_files": True,
|
||||||
|
},
|
||||||
|
"JF06T32V02": {
|
||||||
|
"disabled_modules": [0, 1], "remove_raw_files": True,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#detectors = detectors_disable_modules
|
||||||
|
detectors = None
|
||||||
|
|
||||||
|
|
||||||
check_intensity = PVCondition("SARFE10-PBPG050:HAMP-INTENSITY-CAL", vmin=0, vmax=1500, wait_time=3, required_fraction=0.8)
|
check_intensity = PVCondition("SARFE10-PBPG050:HAMP-INTENSITY-CAL", vmin=0, vmax=1500, wait_time=0.5, required_fraction=0.8)
|
||||||
|
#check_intensity = PVCondition("SARFE10-PBPG050:PHOTON-ENERGY-PER-PULSE-US", vmin=0, vmax=1500, wait_time=0.5, required_fraction=0.8)
|
||||||
|
#check_intensity = PVCondition("SARFE10-PBPS053:INTENSITY", vmin=0.1,vmax=2, wait_time=0.5, required_fraction=0.8)
|
||||||
|
#check_intensity = PVCondition("SAROP11-PBPS122:INTENSITY", vmin=0.05,vmax=5, wait_time=0.5, required_fraction=0.8)
|
||||||
|
|
||||||
daq = SFAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels, default_pvs=pvs, default_detectors=detectors)
|
daq = SFAcquisition(cfg.instrument, cfg.pgroup, default_channels=channels, default_pvs=list(pvs), default_detectors=detectors)
|
||||||
|
|
||||||
scan = Scanner(
|
scan = Scanner(
|
||||||
scan_info_dir="/sf/alvra/data/{}/res/scan_info".format(cfg.pgroup),
|
scan_info_dir="/sf/alvra/data/{}/res/scan_info".format(cfg.pgroup),
|
||||||
@ -69,7 +77,7 @@ scan = Scanner(
|
|||||||
condition=check_intensity,
|
condition=check_intensity,
|
||||||
)
|
)
|
||||||
|
|
||||||
gui = GUI(scan, show_spec=True, show_goto=True)
|
gui = GUI(scan, show_spec=True, show_goto=True, show_run=True)
|
||||||
|
|
||||||
|
|
||||||
bsdaqJF = Deprecator("bsdaqJF", "daq")
|
bsdaqJF = Deprecator("bsdaqJF", "daq")
|
||||||
@ -85,3 +93,83 @@ scansJF = Deprecator("scansJF", "scan")
|
|||||||
# scan_info_dir="./",
|
# scan_info_dir="./",
|
||||||
# default_acquisitions=[daqBS],
|
# default_acquisitions=[daqBS],
|
||||||
#)
|
#)
|
||||||
|
|
||||||
|
|
||||||
|
dummy = DummyAdjustable(name="A Dummy Adjustable")
|
||||||
|
|
||||||
|
|
||||||
|
def huber_pos(x, y, z, att=None):
|
||||||
|
print(f"x = {x}, y = {y}, z = {z}, att = {att}")
|
||||||
|
XrayShutter.close()
|
||||||
|
t1 = primeSample.x.set(x)
|
||||||
|
t2 = primeSample.y.set(y)
|
||||||
|
t3 = primeSample.z.set(z)
|
||||||
|
ts = [t1, t2, t3]
|
||||||
|
if att is not None:
|
||||||
|
t4 = attExp.set(att)
|
||||||
|
ts.append(t4)
|
||||||
|
for t in ts:
|
||||||
|
t.wait()
|
||||||
|
print("moving done")
|
||||||
|
XrayShutter.open()
|
||||||
|
print("done")
|
||||||
|
|
||||||
|
|
||||||
|
@as_shortcut
|
||||||
|
def FrostedYAG():
|
||||||
|
huber_pos(-6, -8.6, 0)
|
||||||
|
|
||||||
|
@as_shortcut
|
||||||
|
def ThinYAG():
|
||||||
|
huber_pos(-6.6, -18.2, 0)
|
||||||
|
|
||||||
|
@as_shortcut
|
||||||
|
def KnifeEdgeX():
|
||||||
|
huber_pos(-9.3, 9, 2.5, att=1e-5)
|
||||||
|
|
||||||
|
@as_shortcut
|
||||||
|
def KnifeEdgeY():
|
||||||
|
huber_pos(-6, 14, 2.5, att=1e-5)
|
||||||
|
|
||||||
|
@as_shortcut
|
||||||
|
def SiN():
|
||||||
|
huber_pos(12.6, 10, -1.1)
|
||||||
|
|
||||||
|
@as_shortcut
|
||||||
|
def TimingDiode():
|
||||||
|
huber_pos(10.9, -15.1, 0)
|
||||||
|
|
||||||
|
#@as_shortcut
|
||||||
|
#def JetYAG():
|
||||||
|
# huber_pos(15.3, 2.2,0)
|
||||||
|
|
||||||
|
m1 = Marker(primeSample.x, name="Jet X")
|
||||||
|
m2 = Marker(primeSample.y, name="Jet Y")
|
||||||
|
m3 = Marker(primeSample.z, name="Jet Z")
|
||||||
|
|
||||||
|
m4 = Marker(primeSample.x, name="YAG Jet X")
|
||||||
|
m5 = Marker(primeSample.y, name="YAG Jet Y")
|
||||||
|
m6 = Marker(primeSample.z, name="YAG Jet Z")
|
||||||
|
|
||||||
|
m7 = Marker(primeSample.x, name="Solid Sample X")
|
||||||
|
m8 = Marker(primeSample.y, name="Solid Sample Y")
|
||||||
|
m9 = Marker(primeSample.z, name="Solid Sample Z")
|
||||||
|
|
||||||
|
t0_harmonics = None
|
||||||
|
t0_topas = None
|
||||||
|
|
||||||
|
@as_shortcut
|
||||||
|
def go_to_t0_harmonics():
|
||||||
|
if t0_harmonics is not None:
|
||||||
|
laser.pumpHarmonics_delay.motor.set(t0_harmonics)
|
||||||
|
else:
|
||||||
|
print("please define t0_harmonics")
|
||||||
|
|
||||||
|
@as_shortcut
|
||||||
|
def go_to_t0_topas():
|
||||||
|
if t0_topas is not None:
|
||||||
|
laser.pumpTopas_delay.motor.set(t0_topas)
|
||||||
|
else:
|
||||||
|
print("please define t0_topas")
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user