Script execution

This commit is contained in:
gac-x03da
2020-03-09 17:39:31 +01:00
parent c21232b5c1
commit 57b874221e
+44
View File
@@ -0,0 +1,44 @@
"""
Continuous 1D Manipulator scan
set manipulator scan parameters below.
note that the motors have a limited speed range!
"""
import math
MOTORS = (OpticsFilterZ)
CENTER = 52.
WIDTH = 25.
RANGE = (CENTER - WIDTH / 2., CENTER + WIDTH / 2.)
STEP = 0.1
DWELL_TIME = 1.0
SENSORS = (SampleCurrent, RefCurrent, MachineCurrent)
# --- do not edit below ---
RELATIVE = False
LATENCY = 0.0
ZIGZAG = False
ENDSCAN = False
adjust_sensors()
set_adc_averaging()
# time for one scan in seconds
SPEED = STEP / DWELL_TIME
print "speed: ", SPEED
fly_time = (RANGE[1] - RANGE[0]) / SPEED
STEPS = int(fly_time / DWELL_TIME) + 1
print "scan time: ", fly_time
try:
cscan(MOTORS, SENSORS, RANGE[0], RANGE[1], STEPS, time=fly_time, before_read=before_readout, after_read = after_readout, check_positions = False)
finally:
if ENDSCAN:
after_scan()