36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
"""
|
|
2D Manipulator scan
|
|
|
|
set manipulator scan parameters below.
|
|
set analyser parameters separately!
|
|
move manipulator to center position before start!
|
|
|
|
"""
|
|
|
|
import math
|
|
|
|
# actual number of positions will be +1!
|
|
STARTPOS = (113.85-0.2, -1.30-0.2)
|
|
ENDPOS = (113.85+0.2, -1.30+0.2)
|
|
STEPS = (0.025, 0.025)
|
|
LATENCY = 1.0
|
|
ENDSCAN = True
|
|
ZIGZAG = False
|
|
|
|
MOTORS = (ManipulatorZ, ManipulatorY)
|
|
#SENSORS = (Counts, Scienta.spectrum, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution)
|
|
SENSORS = (Counts, Scienta.dataMatrix, Scienta.spectrum, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution)
|
|
#SENSORS = (Counts, Scienta.spectrum, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution)
|
|
RELATIVE = False
|
|
|
|
#adjust_sensors()
|
|
#set_adc_averaging()
|
|
set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
|
|
set_exec_pars(compression=True)
|
|
|
|
try:
|
|
ascan(MOTORS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, zigzag = ZIGZAG, before_read=before_readout, after_read = after_readout, check_positions = False)
|
|
finally:
|
|
if ENDSCAN:
|
|
after_scan()
|
|
|