121 lines
3.7 KiB
Python
121 lines
3.7 KiB
Python
#!/usr/bin/env python
|
|
|
|
from slic.gui import GUI
|
|
from slic.core.adjustable import PVAdjustable, DummyAdjustable
|
|
from slic.core.acquisition import SFAcquisition
|
|
from slic.core.condition import PVCondition
|
|
from slic.core.scanner import Scanner
|
|
from slic.devices.general.motor import Motor
|
|
from slic.devices.general.delay_stage import Delay
|
|
from slic.devices.general.smaract import SmarActAxis
|
|
from slic.utils import devices
|
|
#from slic.utils import Channels, Config, Elog, Screenshot, PV
|
|
#from slic.core.acquisition.fakeacquisition import FakeAcquisition
|
|
|
|
from devices.attenuator import Attenuator
|
|
from devices.undulator import Undulators
|
|
from devices.magnet import Magnet
|
|
|
|
|
|
dummy = DummyAdjustable(units="au")
|
|
|
|
magnet = Magnet()
|
|
|
|
jet_delay = PVAdjustable("SATES20-CVME-EVR0:Pul6-Delay-SP", "SATES20-CVME-EVR0:Pul6-Delay-RB", accuracy=1, name="Jet Delay")
|
|
|
|
waveplate = Motor("SLAAT21-LMOT-M702:MOT", name="Laser Waveplate")
|
|
delay = Motor("SLAAT21-LMOT-M708:MOT", name="Laser Delay as Motor")
|
|
#delay_motor = Delay(delay_motor, name="Laser Delay as Delay")
|
|
|
|
source_y = Motor("SATES20-MANIP1:MOTOR_1", name="Source manipulator y")
|
|
source_x = Motor("SATES20-MANIP1:MOTOR_2", name="Source manipulator x")
|
|
|
|
att = Attenuator("SATFE10-OATT064")
|
|
und = Undulators(name="z Athos Undulators")
|
|
|
|
xota_z_trans = Motor("SATES21-XOTA166:W_Z", name="Table 1: Z coordinated")
|
|
#xota_hori_z = Motor("SATES21-XOTA166:MOTOR_Z", name="Table 1: Z raw")
|
|
|
|
mot1_x = SmarActAxis("SATES21-XSMA166:MOT4", name="Table 1: sma X")
|
|
mot1_y = SmarActAxis("SATES21-XSMA166:MOT5", name="Table 1: sma Y")
|
|
mot1_z = SmarActAxis("SATES21-XSMA166:MOT6", name="Table 1: sma Z")
|
|
|
|
mot3_z = SmarActAxis("SATES23-XSMA169:MOT3", name="Table 3: sma Z")
|
|
|
|
|
|
# "SLAAR11-LTIM01-EVR0:DUMMY_PV5_NBS",
|
|
channels_nbs = [f"SATES20-CVME-EVR0:DUMMY_PV{i+1}_NBS" for i in range(10)]
|
|
|
|
|
|
channels_inten = [
|
|
"SATFE10-PEPG046:FCUP-INTENSITY-CAL",
|
|
"SATFE10-PEPG046-EVR0:CALCI",
|
|
"SATFE10-PEPG046-EVR0:CALCS",
|
|
"SATFE10-PEPG046-EVR0:CALCT",
|
|
"SATFE10-PEPG046-EVR0:CALCX",
|
|
"SATFE10-PEPG046-EVR0:CALCY",
|
|
"SATFE10-PEPG046:FCUP-INTENSITY-AVG",
|
|
"SATFE10-PEPG046:FCUP-INTENSITY-CAL",
|
|
]
|
|
|
|
# CH 0-3 farday cup / 4&5 multipliers
|
|
channels_inten += [f"SATFE10-LSCP1:CH{n}:1" for n in range(6)]
|
|
|
|
|
|
channels_ks = [
|
|
"SATES21-GES1:A1_VALUES", #SATES21-GES1:TD_VALUES.VALZ
|
|
# "SATES21-GES1:A2_VALUES",
|
|
# "SATES21-GES1:A3_VALUES",
|
|
# "SATES21-GES1:A4_VALUES",
|
|
]
|
|
|
|
channels_cam = [
|
|
"SATES21-CAMS154-M1:FPICTURE",
|
|
"SATES24-CAMS161-M1:FPICTURE",
|
|
]
|
|
|
|
channels_giges = [
|
|
"SATES21-CAMS154-GIGE3:FPICTURE",
|
|
]
|
|
|
|
|
|
#channels = channels_nbs + channels_inten + channels_ks + channels_cam
|
|
channels = channels_nbs + channels_inten + channels_ks + channels_giges + channels_cam
|
|
#channels = channels_nbs + channels_inten + channels_ks
|
|
|
|
|
|
pvs = [
|
|
"SATFE10-PEPG046:PHOTON-ENERGY-PER-PULSE-AVG",
|
|
]
|
|
|
|
pvs += [f"SATES20-CVME-EVR0:DUMMY_PV{i+1}_NBS.INP" for i in range(10)]
|
|
pvs += [f"SATUN{i:02}-UIND030:FELPHOTENE" for i in range(6, 22+1) if i != 14]
|
|
|
|
|
|
detectors = [
|
|
# "JF15T08V01"
|
|
]
|
|
|
|
|
|
instrument = "maloja"
|
|
#pgroup = "p18493" # commissioning june 2020
|
|
#pgroup = "p18722" # commissioning sept 2020
|
|
#pgroup = "p18863" # JF commissioning april 2021
|
|
#pgroup = "p19241" # two colors
|
|
pgroup = "p19342" # XMCD
|
|
#pgroup = "p19343" # slic dev
|
|
|
|
|
|
daq = SFAcquisition(instrument, pgroup, default_channels=channels, default_pvs=pvs, default_detectors=detectors, rate_multiplicator=1)
|
|
#daq = FakeAcquisition(instrument, pgroup)
|
|
|
|
check_intensity = PVCondition("SATBD01-DBPM060:Q2", vmin=5, vmax=None, wait_time=3, required_fraction=0.8)
|
|
#check_intensity = None
|
|
|
|
scan = Scanner(scan_info_dir=f"/sf/{instrument}/data/{pgroup}/res/scan_info", default_acquisitions=[daq], condition=check_intensity)
|
|
|
|
gui = GUI(scan)
|
|
|
|
|
|
|