Files
x03da/script/users/XAS_doubleRange.py
2017-11-02 20:57:14 +01:00

47 lines
1.3 KiB
Python

"""
XAS scan
"""
POSITIONERS = (Eph)
SENSORS = (SampleCurrent, RefCurrent, AuxCurrent, AuxVoltage, MachineCurrent)
#SENSORS = (SampleCurrent, RefCurrent, AuxCurrent, MachineCurrent, OpticsCameraCentroidX, OpticsCameraSigmaX)
STARTPOS = (98)
ENDPOS = (106)
#NUMPOINTS = 76
STEPSIZE = 0.05
LATENCY = 0.0
DWELL = 1.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)
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPSIZE, LATENCY, before_read=trig, after_read=after_readout)
POSITIONERS = (Eph)
SENSORS = (SampleCurrent, RefCurrent, AuxCurrent, AuxVoltage, MachineCurrent)
#SENSORS = (SampleCurrent, RefCurrent, AuxCurrent, MachineCurrent, OpticsCameraCentroidX, OpticsCameraSigmaX)
STARTPOS = (106)
ENDPOS = (200)
#NUMPOINTS = 76
STEPSIZE = 1.0
LATENCY = 0.0
DWELL = 1.0
ENDSCAN = True # close shutter at end
value = DWELL * 10.0
SampleCurrentAveraging.write(value)
RefCurrentAveraging.write(value)
AuxCurrentAveraging.write(value)
AuxVoltageAveraging.write(value)
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPSIZE, LATENCY, before_read=trig, after_read=after_readout)