Files
x03da/script/optics/RefocusYManipulatorZScan.py
gac-x03da 62a5dc9ee5 Startup
2018-04-24 16:49:00 +02:00

32 lines
773 B
Python

"""
Scan refocusing mirror Y and manipulator Z in parallel (to find analyser focus).
Beam stays on same spot on the sample.
set scan parameters below.
set analyser parameters separately!
move manipulator and mirror to center position before start!
"""
import math
# adjust the following parameters
STEPS = 20
LATENCY = 0.0
ENDSCAN = False
MOTOR = (RefocusYTrans, ManipulatorZ)
SENSORS = (Counts, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution)
STARTPOS = (-10.9, 115.45)
ENDPOS = (-10.7, 115.30)
RELATIVE = False
adjust_sensors()
set_adc_averaging()
try:
lscan(MOTOR, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
finally:
if ENDSCAN:
after_scan()