added prototype for "scan engine"
This commit is contained in:
75
alvra.py
Executable file
75
alvra.py
Executable file
@ -0,0 +1,75 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
from slic.controls import PV
|
||||||
|
from slic.daq import BS, DIA, Scanner
|
||||||
|
from slic.utils import Channels, Config, Elog, Screenshot
|
||||||
|
from slic.checkers import PVChecker
|
||||||
|
|
||||||
|
from slic.devices.device import Device
|
||||||
|
|
||||||
|
from alvra_devices import *
|
||||||
|
from alvra_adhoc import *
|
||||||
|
|
||||||
|
|
||||||
|
cfg = Config("/sf/alvra/config/exp/current_experiment.json")
|
||||||
|
|
||||||
|
elog = Elog(cfg.elog_url, cfg.user, cfg.screenshot_directory)
|
||||||
|
screenshot = Screenshot(cfg.screenshot_directory)
|
||||||
|
|
||||||
|
|
||||||
|
check_intensity = PVChecker("SARFE10-PBPG050:HAMP-INTENSITY-CAL", vmin=100, vmax=300, wait_time=3)
|
||||||
|
|
||||||
|
bsdaqJF = DIA(
|
||||||
|
api_address="http://sf-daq-alvra:10000",
|
||||||
|
jf_name="JF_4.5M",
|
||||||
|
pgroup=cfg.pgroup
|
||||||
|
)
|
||||||
|
|
||||||
|
scansJF = Scanner(
|
||||||
|
data_base_dir="scan_data",
|
||||||
|
scan_info_dir="/sf/alvra/data/{}/res/scan_info".format(cfg.pgroup),
|
||||||
|
default_counters=[bsdaqJF],
|
||||||
|
checker=check_intensity,
|
||||||
|
scan_directories=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
channels = Channels("/sf/alvra/config/com/channel_lists/default_channel_list")
|
||||||
|
|
||||||
|
bsdaq = BS(channels, default_file_path="???")
|
||||||
|
|
||||||
|
scansBSreadLocal = Scanner(
|
||||||
|
data_base_dir="/sf/alvra/config/com/data/scan_data",
|
||||||
|
scan_info_dir="/sf/alvra/config/com/data/scan_info",
|
||||||
|
default_counters=[bsdaq],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
shut_und = Device(
|
||||||
|
"SARFE10-OPSH044",
|
||||||
|
description="Photon shutter after Undulator"
|
||||||
|
)
|
||||||
|
|
||||||
|
pbps_und = Device(
|
||||||
|
"SARFE10-PBPS053",
|
||||||
|
z_undulator=44,
|
||||||
|
description="Intensity position monitor after Undulator (PBPS)"
|
||||||
|
)
|
||||||
|
|
||||||
|
print(shut_und)
|
||||||
|
print(pbps_und)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
7
alvra_adhoc.py
Normal file
7
alvra_adhoc.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
class LXT:
|
||||||
|
pass
|
||||||
|
|
||||||
|
lxt = LXT()
|
||||||
|
|
||||||
|
|
222
alvra_devices.py
Normal file
222
alvra_devices.py
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
import slic.devices as sd
|
||||||
|
|
||||||
|
|
||||||
|
phaseShifter = sd.general.alvra_timing.PhaseShifterAramis(
|
||||||
|
"SLAAR01-TSPL-EPL",
|
||||||
|
z_undulator=127,
|
||||||
|
description="Experiment laser phase shifter (Globi)"
|
||||||
|
)
|
||||||
|
|
||||||
|
prism = sd.general.smaract.SmarActStage(
|
||||||
|
gonio="SARES11-CMOV-SMA691110",
|
||||||
|
trans="SARES11-CMOV-SMA691111",
|
||||||
|
rotat="SARES11-CMOV-SMA691112",
|
||||||
|
z_undulator=127,
|
||||||
|
description="Prime laser prism"
|
||||||
|
)
|
||||||
|
|
||||||
|
xmic = sd.general.smaract.SmarActStage(
|
||||||
|
gonio="SARES11-CMOV-SMA691113",
|
||||||
|
rotat="SARES11-CMOV-SMA691114",
|
||||||
|
z_undulator=127,
|
||||||
|
description="Prime microscope mirror"
|
||||||
|
)
|
||||||
|
|
||||||
|
primeSample = sd.endstations.alvra_prime.Huber(
|
||||||
|
"SARES11-XSAM125",
|
||||||
|
z_undulator=127,
|
||||||
|
description="Sample XYZ manipulator"
|
||||||
|
)
|
||||||
|
|
||||||
|
primeMicroscope = sd.endstations.alvra_prime.Microscope(
|
||||||
|
"SARES11-XMI125",
|
||||||
|
z_undulator=127,
|
||||||
|
description="Microscope focus and zoom"
|
||||||
|
)
|
||||||
|
|
||||||
|
primeTable = sd.endstations.alvra_prime.Table(
|
||||||
|
"SARES11-XOTA125",
|
||||||
|
z_undulator=127,
|
||||||
|
description="Prime optical table"
|
||||||
|
)
|
||||||
|
|
||||||
|
vacuum = sd.endstations.alvra_prime.Vacuum(
|
||||||
|
"SARES11-V",
|
||||||
|
z_undulator=127,
|
||||||
|
description="Prime vacuum system"
|
||||||
|
)
|
||||||
|
|
||||||
|
primeCryTrans = sd.endstations.alvra_prime.VonHamosBragg(
|
||||||
|
"SARES11-XCRY125",
|
||||||
|
z_undulator=127,
|
||||||
|
description="Prime von Hamos X-trans (Bragg)"
|
||||||
|
)
|
||||||
|
|
||||||
|
#laser = sd.loptics.alvra_experiment.Laser_Exp(
|
||||||
|
# "SLAAR11-LMOT",
|
||||||
|
# z_undulator=122,
|
||||||
|
# description="Experiment laser hardware"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#laserShutter = sd.loptics.alvra_laser_shutter.laser_shutter(
|
||||||
|
# "SLAAR11-LTIM01-EVR0",
|
||||||
|
# z_undulator=122,
|
||||||
|
# description="Laser Shutter"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#pbpsOpt = sd.xdiagnostics.intensity_monitors.SolidTargetDetectorPBPS(
|
||||||
|
# "SAROP11-PBPS117",
|
||||||
|
# VME_crate="SAROP11-CVME-PBPS1",
|
||||||
|
# link=9,
|
||||||
|
# description="Intensity/position monitor after Optics hutch (PBPS)"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#pbpsAtt = sd.xdiagnostics.intensity_monitors.SolidTargetDetectorPBPS(
|
||||||
|
# "SAROP11-PBPS122",
|
||||||
|
# VME_crate="SAROP11-CVME-PBPS1",
|
||||||
|
# link=9,
|
||||||
|
# description="Intensity/Position monitor after Attenuator"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#screenFE = sd.xdiagnostics.profile_monitors.Pprm(
|
||||||
|
# "SARFE10-PPRM053",
|
||||||
|
# description="Profile monitor after single-shot spectrometer (PPRM)"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#screenOP = sd.xdiagnostics.profile_monitors.Pprm(
|
||||||
|
# "SARFE10-PPRM064",
|
||||||
|
# description="Profile monitor after Front End"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#screenMirrAlv1 = sd.xdiagnostics.profile_monitors.Pprm(
|
||||||
|
# "SAROP11-PPRM066",
|
||||||
|
# description="Profile monitor after Alvra Mirror 1 (PPRM)"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#screenMirrAlv2 = sd.xdiagnostics.profile_monitors.Pprm(
|
||||||
|
# "SAROP11-PPRM078",
|
||||||
|
# description="Profile monitor after Alvra Mirror 2 (PPRM)"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#screenMirrorV2 = sd.xdiagnostics.profile_monitors.Pprm(
|
||||||
|
# "SAROP11-PPRM110",
|
||||||
|
# description="Profile monitor after Vertical Mirror 2 (PPRM)"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#screenOPEnd = sd.xdiagnostics.profile_monitors.Pprm(
|
||||||
|
# "SAROP11-PPRM117",
|
||||||
|
# description="Profile monitor after Optics hutch (PPRM)"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#screenAtt = sd.xdiagnostics.profile_monitors.Pprm(
|
||||||
|
# "SAROP11-PPRM122",
|
||||||
|
# description="Profile monitor after Attenuator"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#kbHor = sd.xoptics.KBhor.KBhor(
|
||||||
|
# "SAROP11-OKBH124",
|
||||||
|
# description="Alvra horizontal KB mirror"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#kbVer = sd.xoptics.KBver.KBver(
|
||||||
|
# "SAROP11-OKBV123",
|
||||||
|
# description="Alvra vertical KB mirror"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#attFE = sd.xoptics.attenuator_aramis.AttenuatorAramis(
|
||||||
|
# "SARFE10-OATT053",
|
||||||
|
# description="Attenuator in Front End"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#attExp = sd.xoptics.attenuator_aramis.AttenuatorAramis(
|
||||||
|
# "SAROP11-OATT120",
|
||||||
|
# description="Attenuator Alvra"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#mono = sd.xoptics.dcm.Double_Crystal_Mono(
|
||||||
|
# "SAROP11-ODCM105",
|
||||||
|
# description="Alvra DCM Monochromator"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#refLaser = sd.xoptics.reflaser.RefLaser_Aramis(
|
||||||
|
# "SAROP11-OLAS120",
|
||||||
|
# description="Alvra beamline reference laser before KBs (OLAS)"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#slitSwitch = sd.xoptics.slits.SlitBlades_old(
|
||||||
|
# "SAROP11-OAPU104",
|
||||||
|
# description="Slit in Optics hutch after Photon switchyard and before Alvra mono"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#slitUnd = sd.xoptics.slits.SlitFourBlades_old(
|
||||||
|
# "SARFE10-OAPU044",
|
||||||
|
# description="Slit after Undulator"
|
||||||
|
#)
|
||||||
|
|
||||||
|
#slitAttExp = sd.xoptics.slits.SlitPosWidth_old(
|
||||||
|
# "SAROP11-OAPU120",
|
||||||
|
# description="Slits behind attenuator"
|
||||||
|
#)
|
||||||
|
|
||||||
|
##shutUnd = sd.???(
|
||||||
|
## "SARFE10-OPSH044",
|
||||||
|
## description="Photon shutter after Undulator"
|
||||||
|
##)
|
||||||
|
|
||||||
|
##gasMon = sd.???(
|
||||||
|
## "SARFE10-PBIG050",
|
||||||
|
## description="Gas Monitor Intensity (PBIG)"
|
||||||
|
##)
|
||||||
|
|
||||||
|
##pbpsUnd = sd.???(
|
||||||
|
## "SARFE10-PBPS053",
|
||||||
|
## z_undulator=44,
|
||||||
|
## description="Intensity position monitor after Undulator (PBPS)"
|
||||||
|
##)
|
||||||
|
|
||||||
|
##shutFE = sd.???(
|
||||||
|
## "SARFE10-SBST060",
|
||||||
|
## description="Photon shutter in the end of Front End"
|
||||||
|
##)
|
||||||
|
|
||||||
|
##mirrorAlv1 = sd.???(
|
||||||
|
## "SAROP11-OOMH064",
|
||||||
|
## description="First Alvra Horizontal offset mirror (OMH064)"
|
||||||
|
##)
|
||||||
|
|
||||||
|
##mirrorAlv2 = sd.???(
|
||||||
|
## "SAROP11-OOMH076",
|
||||||
|
## description="Second Alvra Horizontal offset mirror (OMH076)"
|
||||||
|
##)
|
||||||
|
|
||||||
|
##mirrorV1 = sd.???(
|
||||||
|
## "SAROP11-OOMV108",
|
||||||
|
## description="Alvra Vertical offset Mirror 1 (OMV108)"
|
||||||
|
##)
|
||||||
|
|
||||||
|
##mirrorV2 = sd.???(
|
||||||
|
## "SAROP11-OOMV109",
|
||||||
|
## description="Alvra Vertical offset Mirror 2 (OMV109)"
|
||||||
|
##)
|
||||||
|
|
||||||
|
##pulsePicker = sd.???(
|
||||||
|
## "SAROP11-OPPI110",
|
||||||
|
## description="X-ray pulse picker"
|
||||||
|
##)
|
||||||
|
|
||||||
|
##shutOpt = sd.???(
|
||||||
|
## "SAROP11-SBST114",
|
||||||
|
## description="Shutter after Optics hutch"
|
||||||
|
##)
|
||||||
|
|
||||||
|
##DelayPALM = sd.???(
|
||||||
|
## "SAROP11-PALM118",
|
||||||
|
## description="Timing diagnostics THz streaking (PALM)"
|
||||||
|
##)
|
||||||
|
|
||||||
|
##DelayPSEN = sd.???(
|
||||||
|
## "SAROP11-PSEN119",
|
||||||
|
## description="Timing diagnostics spectral encoding (PSEN)"
|
||||||
|
##)
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user