Files
x03da/script/optics/ExitSlitYScan.py
2021-08-13 10:50:35 +02:00

33 lines
946 B
Python

"""
exit slit calibration scan
manual settings: photon energy 400 eV (G1200), FE = 4 x 6
set keithleys manually to "poll curr fast" and fixed range (2 uA for diode, 2 nA for RMU)
"""
POSITIONERS = (ExitSlitY)
SENSORS = (SampleCurrent,RefCurrent, MachineCurrent)
STARTPOS = (1.0)
ENDPOS = (-0.5)
#STEPS = -0.01
DWELL = 0.1
TOTAL_TIME = 120
#STEPS = int(TOTAL_TIME / DWELL) + 1
STEPS = 150
LATENCY = 0.2
def trig():
#wait_beam()
#caput(KEI_RMU + "DOINIT", 1)
#time.sleep(0.1)
#caput(KEI_RMU + "DOTRIGGER", 1)
time.sleep(DWELL)
#caput(KEI_RMU + "DOFETCH", 1)
#set_adc_averaging(dwelltime=DWELL)
#set_exec_pars(compression=True, shuffle=True)
set_exec_pars(compression=True)
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout)
#cscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, time=TOTAL_TIME, before_read=trig, after_read=after_readout, check_positions = False)