This commit is contained in:
43
script/ManualScan.py
Normal file
43
script/ManualScan.py
Normal file
@@ -0,0 +1,43 @@
|
||||
###################################################################################################
|
||||
#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 =sin
|
||||
det2 = arr
|
||||
det3 = cm1#ri1
|
||||
|
||||
|
||||
|
||||
|
||||
MOTOR_RANGE = (0.0, 8.0)
|
||||
OUTPUT_SETPOINTS = (1.0, 2.0, 3.0)
|
||||
FIXED_X = True
|
||||
|
||||
writables_names = [pos1.getName()]
|
||||
readable_names = [det1.getName(), "arr[10]","cm1[3][2]"]
|
||||
start = [ MOTOR_RANGE[0] if FIXED_X else -1, ]
|
||||
stop = [ MOTOR_RANGE[1] if FIXED_X else -1]
|
||||
steps = [int(MOTOR_RANGE[1]-MOTOR_RANGE[0])]
|
||||
|
||||
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], [pos1.read()], [det1.read(), det2.read(), cm1.read()])
|
||||
|
||||
|
||||
scan.end()
|
||||
Reference in New Issue
Block a user