Startup
This commit is contained in:
38
script/test/TestGenerator.py
Normal file
38
script/test/TestGenerator.py
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
|
||||
def gen():
|
||||
num = 0.0
|
||||
while num < 10:
|
||||
yield num
|
||||
num += 1
|
||||
g = gen()
|
||||
|
||||
|
||||
#r1 = vscan(inp,(sin, out),gen(),False, 0.5, title = "1D Generator")
|
||||
|
||||
|
||||
|
||||
def gen():
|
||||
a,b = 0.0, 10.0
|
||||
while abs(a) < 1.0:
|
||||
while b < 20.0:
|
||||
yield [a,b]
|
||||
b=b+1.0
|
||||
b=10.0
|
||||
a=a+0.25
|
||||
|
||||
r2 = vscan((motor,inp),(sin, out),gen(),False, 0.1, title = "2D Generator", range = [-2.0,2.0, 10.0, 19.0])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#2D vector scan, plot to 2D Vector tab
|
||||
vector = [ [1,1] , [1,2] , [1,3] , [1,4] ,
|
||||
[1.5,2.5] ,
|
||||
[2,1] , [2,2] , [2,3] , [2,4] ,
|
||||
[2.5,2.5] ,
|
||||
[3,1] , [3,2] , [3,3] , [3,3.5] , [3,3.6], [3,3.7], [3,4] ]
|
||||
|
||||
#r2 = vscan((motor,inp),(sin, out),vector,False, 0.1, title = "2D Vector", range = [0,4,0,5])
|
||||
|
||||
Reference in New Issue
Block a user