Files
x11ma/script/templates/LEEM_tilt_scan.py
2021-05-11 14:39:04 +02:00

23 lines
687 B
Python
Executable File

CENTER = [0.0, 0.0]
RANGE = 2000
STEP = 1000.0
SETTLING_TIME = 1.0
RANGE_H = [CENTER[0]-RANGE, CENTER[0]+RANGE]
RANGE_V = [CENTER[1]-RANGE, CENTER[1]+RANGE]
STEP_H = STEP
STEP_V = STEP
INIT_TILT = True # True - tilt must be manually set to 0,0 before the scan
# False - tilt set 0.0 at least once at PShell start up
if INIT_TILT:
init_tilt()
try:
ascan ( [tilt_horizontal, tilt_vertical], machine_cur, \
[RANGE_H[0], RANGE_V[0]], [RANGE_H[1], RANGE_V[1]], [float(STEP_H), float(STEP_V)], \
latency=SETTLING_TIME, zigzag=True, save=True)
finally:
if INIT_TILT:
tilt_horizontal.write(0.0)
tilt_vertical.write(0.0)