New ScreenPanel

This commit is contained in:
2018-01-19 10:56:53 +01:00
commit ae4d621609
580 changed files with 46598 additions and 0 deletions

25
script/PseudoDevices.py Executable file
View File

@@ -0,0 +1,25 @@
###################################################################################################
# Using pseudo-device to :
# - Add calculations to scan data.
# - Execute logic during scan
###################################################################################################
class Clock(Readable):
def read(self):
return time.clock()
class Average(Readable):
def read(self):
arr = wf1.take() #Gets the CACHED waveform
return reduce(lambda x, y: x + y, arr) / len(arr)
class PseudoPositioner(Writable):
def write(self,pos):
print "Step = " + str(pos)
clock=Clock()
av=Average()
positioner=PseudoPositioner()
setup_plotting(plot_list = [av,clock])
a= lscan((ao1,positioner),(wf1, ai2,av,clock),(0,0),(40,20),20,0.1)