Files
x03da/script/optics/FrontEndBladeScanKei.py
gac-x03da 1298292f89 Startup
2018-01-30 16:24:52 +01:00

66 lines
1.6 KiB
Python

"""
front end calibration scans
Keithley2: RMU
"""
import time
SENSORS = (Keithley2)
STARTPOS = (-1.5)
ENDPOS = (+1.5)
STEPS = 0.01
LATENCY = 1.0
DWELL = 1.0
KEITHLEY = "X03DA-KEITHLEY-1"
def trig():
wait_beam()
caput(KEITHLEY + ":DOREAD", 1)
#caput(KEITHLEY + "X03DA-KEITHLEY-1:DOINIT", 1)
#caput(KEITHLEY + "X03DA-KEITHLEY-1:DOTRIGGER", 1)
#caput(KEITHLEY + "X03DA-KEITHLEY-1:DOFETCH", 1)
caput(KEITHLEY + ":NPLC", 1)
caput(KEITHLEY + ":NAVG", DWELL / 0.02)
caput(KEITHLEY + ":TCOUNT", 1)
caput(KEITHLEY + ":RANGE", "200 nA")
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)
FrontendBladeDown.write(-2.0)
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout)
POSITIONERS = (FrontendBladeDown)
FrontendBladeUp.write(+2.0)
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, 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)
FrontendBladeWall.write(-4.0)
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout)
POSITIONERS = (FrontendBladeWall)
FrontendBladeRing.write(+4.0)
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout)
FrontendHSize.write(0.0)
FrontendVSize.write(0.0)