Files
x03da/script/optics/ExitSlitYScanKei.py
2018-01-30 17:59:47 +01:00

53 lines
1.3 KiB
Python

"""
exit slit calibration scan
manual settings: photon energy 800 eV (G1200), FE = 1 x 1
keithley 1: diode
keithley 2: RMU
"""
POSITIONERS = (ExitSlitY)
SENSORS = (Keithley1, Keithley2, MachineCurrent)
STARTPOS = (-0.5)
ENDPOS = (1.0)
STEPS = 0.01
NSTEPS = round((ENDPOS - STARTPOS) / STEPS) + 1
LATENCY = 0.1
DWELL = 1.0
KEI_DIODE = "X03DA-KEITHLEY-1:"
KEI_RMU = "X03DA-KEITHLEY-2:"
caput(KEI_DIODE + "DOSETDEFAULT", 0)
time.sleep(1.0)
caput(KEI_DIODE + "DOSETADVANCED", 0)
time.sleep(1.0)
#caput(KEI_DIODE + "READSCAN.SCAN", 0)
#caput(KEI_DIODE + "NPLC", 1)
#caput(KEI_DIODE + "NAVG", DWELL / 0.02)
#caput(KEI_DIODE + "TCOUNT", 1)
caput(KEI_DIODE + "RANGE", 6) # 200 nA
time.sleep(1.0)
#caput(KEI_RMU + "READSCAN.SCAN", 0)
#caput(KEI_RMU + "NPLC", 1)
#caput(KEI_RMU + "NAVG", DWELL / 0.02)
#caput(KEI_RMU + "TCOUNT", 1)
#caput(KEI_RMU + "RANGE", 8) # 2 nA
def trig():
wait_beam()
caput(KEI_DIODE + "DOREAD", 1)
#caput(KEI_DIODE + "DOINIT", 1)
#caput(KEI_RMU + "DOINIT", 1)
#time.sleep(1.0)
#caput(KEI_DIODE + "DOTRIGGER", 1)
#caput(KEI_RMU + "DOTRIGGER", 1)
#time.sleep(DWELL * 2)
#caput(KEI_DIODE + "DOFETCH", 1)
#caput(KEI_RMU + "DOFETCH", 1)
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout)