This commit is contained in:
2019-12-10 09:29:54 +01:00
parent a1e2b8d128
commit d0f7d2b02f
10 changed files with 101 additions and 33 deletions

View File

@@ -0,0 +1,17 @@
def check():
if caget('TESTIOC:TESTCALCOUT:Output') != 103.9:
raise Exception ("ERROR")
def func():
for i in range(100):
#print i
check()
#func()
print parallelize(func, func, func,func, func, func,func, func, func)

8
script/test/TestHist.py Normal file
View File

@@ -0,0 +1,8 @@
import ch.psi.pshell.device.HistogramGenerator as Hist
h=Hist("hist",pe.readback, 100, 100.0,500.0,100)
h.monitored=True
h.initialize()
show_panel(h)
show_panel(pe)

33
script/test/TestLog.py Normal file
View File

@@ -0,0 +1,33 @@
data = [1e-13,1e-14,1e-15, 1e-20] * 100
#data = [1e30, 1e10, 1e2, 1e-20,1e-22,1e-25, 1e-32, -1e10]
#data= [1e-1,1e-2,1e-3,1e-4]
#data = [1e12,1e13,1e14,1e15]
#ata = [-1e12,-1e13,-1e14,-1e15]
#data = [1e-2,1e-1,1e0,1e1, 1e2]
#Qdata = [-1e2,-1e1,-1e-1,1e-1,1e1, 1e2]
p = plot(data)[0]
ay=p.getAxis(p.AxisId.Y)
#ay.setLogarithmic(True)
ax=p.getAxis(p.AxisId.X)
ax.setLogarithmic(True)
a=p.chart.getXYPlot().getRangeAxis()
"""
p = plot([50, 10,500,1000,5000,1000], xdata = [-10, 0.1,1,10,100,1000, 10000])[0]
p.getAxis(p.AxisId.X).logarithmic = True
p.getAxis(p.AxisId.Y).setRange(1, 100000)
p.getAxis(p.AxisId.Y).logarithmic = True
a=p.chart.getXYPlot().getRangeAxis()
a.setLog10TickLabelsFlag(True)
"""