This commit is contained in:
x03daop
2015-09-01 10:09:12 +02:00
parent e104c934af
commit f3c57cbe5a
26 changed files with 789 additions and 11 deletions

View File

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