This commit is contained in:
2023-05-01 11:28:04 +02:00
parent 3a83f3cf34
commit abe3bcb19c
265 changed files with 28663 additions and 1295 deletions
+31
View File
@@ -0,0 +1,31 @@
def after_read(rec,scan):
print rec[energy], rec[sin]
#r = mscan(energy, sin.cache, after_read=after_read)
#Execute the scan: sample undefined number of samples until a condition is met, with auto range
scan_completed=False
def after_read(record, scan):
global scan_completed
print record[sin]
if motor.isReady():
scan_completed=True
scan.abort()
motor.move(0.0)
motor.moveAsync(3.0)
try:
r = mscan(motor.readback, [motor.readback, sin.cache], after_read=after_read, range=[0.0, 3.0], domain_axis=motor.readback.name)
except ScanAbortedException as ex:
if not scan_completed: raise
motor.moveAsync(0.0)
print r[sin]
#print r[0][sin]
print r[0][motor.readback]