4 from libCatKernel
import *
5 import matplotlib
as mpl
6 import matplotlib.patches
as patches
7 from matplotlib.path
import Path
8 import matplotlib.pyplot
as plt
13 proc.__init__(self,cat,obj,panel,path)
15 self.
s1=self.getControl(
"s1")
16 self.
s2=self.getControl(
"s2")
17 self.
s3=self.getControl(
"s3")
18 self.
s4=self.getControl(
"s4")
20 self.panel.Bind(wx.EVT_BUTTON, self.
onApply, id=xrc.XRCID(
"Apply"))
23 v1 = float(self.
s1.GetValue())
24 v2 = float(self.
s2.GetValue())
25 v3 = float(self.
s3.GetValue())
26 v4 = float(self.
s4.GetValue())
27 self.obj.setSigma(v1,v2,v3,v4)
35 self.
s1.SetValue(str(v1))
36 self.
s2.SetValue(str(v2))
37 self.
s3.SetValue(str(v3))
38 self.
s4.SetValue(str(v4))
42 def Edit (cat, obj, panel, path):
48 fig = plt.figure(figsize=(10,10))
49 fig.suptitle(
"Run "+str(run), fontsize=14, fontweight=
'bold')
52 for i
in range(ndevices):
54 ax = fig.add_subplot(4,ndevices,ndevices*ch+1+i)
55 lines, = ax.plot([],[], color = c[ch], marker=
'^')
56 if ch==0: plt.title(
"Dev "+str(i+1))
57 if i==0: plt.ylabel(
"voltage (V)")
58 if ch==3: plt.xlabel(
"time (s)")
59 ax.set_autoscaley_on(
False)
68 for i
in range(ndevices):
70 ax = fig.add_subplot(4,ndevices,ndevices*ch+1+i)
71 lines, = ax.plot([],[], color = c[ch], marker=
'^')
72 lines.set_xdata(obj.data(0+5*i))
73 lines.set_ydata(obj.data(ch+1+5*i))
76 ax.set_ylim(bottom=0.)
79 fig.canvas.flush_events()
def __init__(self, cat, obj, panel, path)
def createPlot(cat, obj, run)
def Edit(cat, obj, panel, path)