This commit is contained in:
44
script/test/test1.py
Executable file
44
script/test/test1.py
Executable file
@@ -0,0 +1,44 @@
|
||||
'''
|
||||
Line Scan
|
||||
'''
|
||||
|
||||
import ch.psi.pshell.data.LayoutSF as LayoutSF
|
||||
LayoutSF.setExperimentArguments([sin, out])
|
||||
|
||||
|
||||
print get_exec_pars().path
|
||||
def before_pass(pass_num):
|
||||
print "Starting pass: " , pass_num
|
||||
def after_pass(pass_num):
|
||||
print "Finished pass: " , pass_num
|
||||
|
||||
set_exec_pars(layout="sf")
|
||||
|
||||
a= lscan(inp, (sin,out,arr), 0, 40, 10, 0.2, passes = 2, before_pass = before_pass, after_pass=after_pass, title = "Test")
|
||||
ret= tscan((sin, create_averager(sin,3,0.1)), 10, 0.1, passes = 2, before_pass = before_pass, after_pass=after_pass)
|
||||
ret= mscan([],sin, 10, -1, passes = 2, before_pass = before_pass, after_pass=after_pass)
|
||||
p = get_exec_pars()
|
||||
print p.getPath()
|
||||
|
||||
print p.getScanPath()
|
||||
|
||||
|
||||
|
||||
path = get_exec_pars().group
|
||||
#save_dataset(path + "data", a.getReadable(0) )
|
||||
#set_attribute(path + "data", "Temp", 39.0)
|
||||
|
||||
set_attribute(path, "AttrString", "Value")
|
||||
set_attribute(path, "AttrInteger", 1)
|
||||
set_attribute(path, "AttrDouble", 2.0)
|
||||
set_attribute(path, "AttrBoolean", True)
|
||||
set_attribute(path, "AttrArr", [1,2,3])
|
||||
|
||||
set_attribute(path + "sin", "Temp", 39.0)
|
||||
|
||||
|
||||
#set_return([1.0, 3, [1,2,3,4]])
|
||||
|
||||
#set_return("T\"es\"t")
|
||||
#set_return([3.0,2])
|
||||
set_return(ret)
|
||||
Reference in New Issue
Block a user