This commit is contained in:
gac-x03da
2018-04-24 16:49:00 +02:00
parent 95f8194430
commit 62a5dc9ee5
25 changed files with 1389 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
"""
Scan refocusing mirror RY and manipulator X 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
DISTANCE_X = 1.0 # mm
#DISTANCE_Ry = 0.5 # mrad (Ry)
SLOPE = 1.0/0.24 # mm/mrad (DX / DRy)
STEPS = 120
LATENCY = 0.0
ENDSCAN = False
# do not edit below
#DISTANCE_X = DISTANCE_Ry * SLOPE
DISTANCE_Ry = DISTANCE_X / SLOPE
MOTOR = (RefocusYRot, ManipulatorX)
SENSORS = (Counts, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution)
STARTPOS = (-DISTANCE_Ry / 2.0, -DISTANCE_X / 2.0)
ENDPOS = (DISTANCE_Ry / 2.0, DISTANCE_X / 2.0)
RELATIVE = True
#STARTPOS = (-1.670, -5.000)
#ENDPOS = (-0.330, 1.000)
#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()