44 lines
1.3 KiB
Python
44 lines
1.3 KiB
Python
###################################################################################################
|
|
#Manual scan: Manually setting positioners and reading back sensors, but still using
|
|
#the standard data handling and plotting of built-in scans.
|
|
###################################################################################################
|
|
|
|
|
|
mu.setSpeed(10.0)
|
|
|
|
pos1 = mu
|
|
pos2 = out
|
|
det1 =rs1
|
|
det2 = sin#rw1
|
|
det3 = out#ri1
|
|
|
|
|
|
|
|
|
|
MOTOR_RANGE = (0.0, 8.0)
|
|
OUTPUT_SETPOINTS = (1.0, 2.0, 3.0)
|
|
FIXED_X = True
|
|
|
|
writables_names = [pos1.getName(), pos2.getName()]
|
|
readable_names = [det1.getName(), det2.getName()]
|
|
start = [ MOTOR_RANGE[0] if FIXED_X else -1, OUTPUT_SETPOINTS[0]]
|
|
stop = [ MOTOR_RANGE[1] if FIXED_X else -1, OUTPUT_SETPOINTS[-1]]
|
|
steps = [int(MOTOR_RANGE[1]-MOTOR_RANGE[0]), len(OUTPUT_SETPOINTS)-1]
|
|
|
|
scan = ManualScan(writables_names, readable_names ,start, stop, steps, monitors = [sin])
|
|
|
|
|
|
#This option is to plot the foe each output value one 1D series, instead of all in a matrix plot
|
|
set_exec_pars(line_plots = (det1, det2))
|
|
|
|
scan.start()
|
|
pos1.setSpeed(10.0)
|
|
for setpoint1 in frange(MOTOR_RANGE[0], MOTOR_RANGE[1], 1.0, True):
|
|
pos1.move(setpoint1)
|
|
for setpoint2 in OUTPUT_SETPOINTS:
|
|
pos2.write(setpoint2)
|
|
scan.append ([setpoint1, setpoint2], [pos1.read(), pos2.read()], [det1.read(), det2.read()])
|
|
|
|
|
|
scan.end()
|