35 lines
797 B
Python
35 lines
797 B
Python
"""
|
|
Focusing mirror Ry scan
|
|
|
|
set scan parameters below, move the mirror to the center position.
|
|
set analyser parameters separately!
|
|
"""
|
|
|
|
import math
|
|
|
|
# adjust the following parameters
|
|
DISTANCE = 0.08
|
|
STEPS = 40
|
|
LATENCY = 0.5
|
|
ENDSCAN = False
|
|
|
|
MOTORS = [FocusYRot]
|
|
SENSORS = [Counts, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution, OpticsCameraCentroidX, OpticsCameraSigmaX]
|
|
STARTPOS = (-DISTANCE / 2.0)
|
|
ENDPOS = (DISTANCE / 2.0)
|
|
RELATIVE = True
|
|
|
|
adjust_sensors()
|
|
set_adc_averaging()
|
|
|
|
def trig_sensors():
|
|
wait_beam()
|
|
trig_scienta()
|
|
caput("X03DA-OP-10ADC:TRG.PROC", 1)
|
|
|
|
try:
|
|
lscan(MOTORS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, before_read=trig_sensors, after_read = after_readout)
|
|
finally:
|
|
if ENDSCAN:
|
|
after_scan()
|