40 lines
914 B
Python
Executable File
40 lines
914 B
Python
Executable File
tutorial_path = "src/main/assembly/help/Tutorial_py/"
|
|
run(tutorial_path+"SimulatedDevices")
|
|
|
|
|
|
import ch.psi.pshell.data.LayoutDefault
|
|
class LayoutParallelScan(ch.psi.pshell.data.LayoutDefault):
|
|
def getDefaultGroup(self, scan):
|
|
return scan.readables[0].name
|
|
|
|
|
|
#get_context().pluginManager.addDynamicClass(LayoutParallel().getClass())
|
|
|
|
|
|
#Does not work
|
|
#lay = LayoutParallelScan().getClass()
|
|
##print lay
|
|
#cls = Class.forName(lay.getCanonicalName(), True, lay.getClassLoader())
|
|
#3print cls
|
|
#set_exec_pars(layout = "org.python.proxies.__main__$LayoutParallelScan$25")
|
|
|
|
|
|
|
|
#Must restore the layout
|
|
#get_context().dataManager.setLayout(LayoutParallelScan())
|
|
|
|
set_exec_pars(layout = "Table")
|
|
|
|
|
|
|
|
def scan1():
|
|
print "scan1"
|
|
return lscan(ao1, ai1, 0, 40, 20, 0.1, title = "scan1")
|
|
|
|
def scan2():
|
|
print "scan2"
|
|
return lscan(ao2, ai2, 0, 40, 20, 0.1, title = "scan2")
|
|
|
|
|
|
parallelize(scan1, scan2)
|