Files
x03da/script/optics/FrontEndBladeScanKei.py
gac-x03da 4af401ed90 Closedown
2018-08-16 18:42:41 +02:00

81 lines
2.0 KiB
Python

"""
front end calibration scans
keithley 2: RMU
set keithley manually to "poll curr medi"
"""
import time
SENSORS = (RefCurrent,)
STARTPOS = (-1.5)
ENDPOS = (+1.5)
STEPS = 0.01
LATENCY = 0.5
DWELL = 0.1
KEI_RMU = "X03DA-KEITHLEY-2:"
#caput(KEI_RMU + "DOSETDEFAULT", 1)
#time.sleep(1.0)
#caput(KEI_RMU + "DOSETADVANCED", 1)
#time.sleep(1.0)
#caput(KEI_RMU + "READSCAN.SCAN", 0)
#caput(KEI_RMU + "NPLC", 1)
#caput(KEI_RMU + "NAVG", 5)
#caput(KEI_RMU + "TCOUNT", 1)
#caput(KEI_RMU + "RANGE", 6) # 200 nA
def trig():
wait_beam()
#caput(KEI_RMU + "DOINIT", 1)
#time.sleep(0.1)
#caput(KEI_RMU + "DOTRIGGER", 1)
time.sleep(DWELL * 1.1)
#caput(KEI_RMU + "DOFETCH", 1)
FrontendHSize.write(2.0)
FrontendVSize.write(2.0)
ExitSlit.write(25.0)
caput("X03DA-PGM:ronbeta.A", -87.0)
caput("X03DA-PGM:rontheta.A", +87.0)
#MonoBeta.waitValueInRange(-87.01, -86.99, 100000)
#MonoTheta.waitValueInRange(+86.99, +87.01, 100000)
POSITIONERS = (FrontendBladeUp)
FrontendBladeUp.write(STARTPOS)
FrontendBladeDown.write(-2.0)
time.sleep(5.0)
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=before_readout, after_read=after_readout)
POSITIONERS = (FrontendBladeDown)
FrontendBladeDown.write(STARTPOS)
FrontendBladeUp.write(+2.0)
time.sleep(5.0)
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=before_readout, after_read=after_readout)
FrontendHSize.write(2.0)
FrontendVSize.write(2.0)
time.sleep(10.0)
STARTPOS = (-4.0)
ENDPOS = (+4.0)
STEPS = 0.1
POSITIONERS = (FrontendBladeRing)
FrontendBladeRing.write(STARTPOS)
FrontendBladeWall.write(-4.0)
time.sleep(5.0)
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=before_readout, after_read=after_readout)
POSITIONERS = (FrontendBladeWall)
FrontendBladeWall.write(STARTPOS)
FrontendBladeRing.write(+4.0)
time.sleep(5.0)
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=before_readout, after_read=after_readout)
FrontendHSize.write(0.0)
FrontendVSize.write(0.0)