Script execution
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user