""" front end calibration scans """ import time SENSORS = (RefCurrent, AuxCurrent, MachineCurrent) STARTPOS = (-1.5) ENDPOS = (+1.5) STEPS = 0.01 LATENCY = 1.0 DWELL = 1.0 def trig(): wait_beam() caput("X03DA-OP-10ADC:TRG.PROC", 1) value = DWELL * 10.0 SampleCurrentAveraging.write(value) RefCurrentAveraging.write(value) AuxCurrentAveraging.write(value) RefCurrentGain.write("L, 10^7") AuxCurrentGain.write("L, 10^7") FrontendHSize.write(2.0) FrontendVSize.write(2.0) ExitSlit.write(25.0) MonoBeta.write(-87.0) MonoTheta.write(+87.0) time.sleep(30.0) POSITIONERS = (FrontendBladeUp) lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout) POSITIONERS = (FrontendBladeDown) lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout)