36 lines
787 B
Python
36 lines
787 B
Python
"""
|
|
Focusing mirror Rx scan
|
|
to center the beam on the monochromator grating
|
|
Rx = -20...+20
|
|
set the front end to 0.5 x 0.5, exit slit to 25, photon energy to 1500, ADC/Keithley averaging
|
|
"""
|
|
|
|
import math
|
|
|
|
# adjust the following parameters
|
|
STARTPOS = (-5.0)
|
|
ENDPOS = (+5.0)
|
|
STEPS = 0.01
|
|
LATENCY = 1.0
|
|
DWELL = 1.0
|
|
ENDSCAN = False
|
|
|
|
MOTORS = [FocusXRot]
|
|
SENSORS = [SampleCurrent, RefCurrent, MachineCurrent, OpticsCameraCentroidX, OpticsCameraSigmaX]
|
|
RELATIVE = False
|
|
|
|
# front end size includes offset!
|
|
FrontendHSize.write(1.0)
|
|
FrontendVSize.write(0.9)
|
|
ExitSlit.write(25.0)
|
|
|
|
adjust_sensors()
|
|
set_adc_averaging()
|
|
|
|
try:
|
|
lscan(MOTORS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
|
|
finally:
|
|
if ENDSCAN:
|
|
after_scan()
|
|
|