Files
x03da/script/XAS.py
2017-03-20 12:33:17 +01:00

31 lines
753 B
Python

"""
XAS scan
"""
POSITIONERS = (Eph)
SENSORS = (SampleCurrent, RefCurrent, AuxCurrent, AuxVoltage, MachineCurrent)
#SENSORS = (SampleCurrent, RefCurrent, AuxCurrent, MachineCurrent, OpticsCameraCentroidX, OpticsCameraSigmaX)
STARTPOS = (518.0)
ENDPOS = (548.0)
#NUMPOINTS = 76
STEPSIZE = 0.05
LATENCY = 0.2
DWELL = 5.0
ENDSCAN = True # close shutter at end
value = DWELL * 10.0
SampleCurrentAveraging.write(value)
RefCurrentAveraging.write(value)
AuxCurrentAveraging.write(value)
AuxVoltageAveraging.write(value)
def trig():
wait_beam()
caput("X03DA-OP-10ADC:TRG.PROC", 1)
try:
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPSIZE, LATENCY, before_read=trig, after_read=after_readout)
finally:
if ENDSCAN:
after_scan()