Configuration change: Context
This commit is contained in:
25
script/test/MonitorScan.py
Normal file
25
script/test/MonitorScan.py
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
#Number of cycles must be small otherwise generates a following error
|
||||
|
||||
start = -10.0
|
||||
end = -5.0
|
||||
acc_distance = 1.0
|
||||
|
||||
def before(position, scan):
|
||||
time.sleep(0.1)
|
||||
|
||||
def after(record, scan):
|
||||
global start, end
|
||||
if scan_y.position < start:
|
||||
record.invalidate()
|
||||
if scan_y.position > end:
|
||||
scan.abort()
|
||||
|
||||
#setup_plotting(line_plots = [mca_1])
|
||||
|
||||
scan_y.move(start - acc_distance)
|
||||
scan_y.moveAsync(end + acc_distance)
|
||||
|
||||
mscan(trigger, [scan_y.readback, keith_1], 1000, timeout = None, before_read = before, after_read = after)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user