4 from libCatKernel
import *
5 from libCatKernel
import *
12 proc.__init__(self,cat,obj,panel,path)
14 self.
s1=self.getControl(
"s1")
15 self.
s2=self.getControl(
"s2")
16 self.
s3=self.getControl(
"s3")
17 self.
s4=self.getControl(
"s4")
19 self.panel.Bind(wx.EVT_BUTTON, self.
onApply, id=xrc.XRCID(
"Apply"))
22 v1 = float(self.
s1.GetValue())
23 v2 = float(self.
s2.GetValue())
24 v3 = float(self.
s3.GetValue())
25 v4 = float(self.
s4.GetValue())
34 self.
s1.SetValue(str(v1))
35 self.
s2.SetValue(str(v2))
36 self.
s3.SetValue(str(v3))
37 self.
s4.SetValue(str(v4))
41 def Edit (cat, obj, panel, path):
47 fig = plt.figure(figsize=(10,10))
48 fig.suptitle(
"Run "+str(run), fontsize=14, fontweight=
'bold')
50 ax = fig.add_subplot(3,1,vplot)
56 ax1 = fig.add_subplot(3,1,1)
57 lines, = ax1.plot([],[],
'bo')
59 ax1.set_autoscaley_on(
True)
63 lines.set_xdata(obj.data(0))
64 lines.set_ydata(obj.data(1))
70 ax2=fig.add_subplot(3,1,2)
71 h1 = ax2.hist(obj.data(0))
77 fig.canvas.flush_events()
83 def Plot(cat, obj, parent, id):
84 from mpl_toolkits.mplot3d
import Axes3D
85 from matplotlib
import cm
86 import matplotlib
as mpl
87 import matplotlib.pyplot
as plt
92 fig.suptitle(
'TestSuite - Plot capabilities', fontsize=14, fontweight=
'bold')
95 p1=fig.add_subplot(2,3,1)
96 p1.plot(obj.data(0),
'bo', obj.data().vector(1),
'k')
97 p1.set_title(
r'$\sigma_0='+str(obj.sigma(0))+
'$')
100 p2=fig.add_subplot(2,3,2)
101 p2.plot(obj.data(1),
'r--')
102 p2.set_title(
r'$\sigma_1='+str(obj.sigma(1))+
'$')
106 n, bins, h=plt.hist(obj.data().vector(0), 10)
107 plt.title(obj.data().
title(0))
112 plt.hist(obj.data().vector(1), 20)
113 plt.title(obj.data().
name(1)+
" : "+obj.data().
title(1))
117 p5=fig.add_subplot(2,3,5)
118 h1=
h1d(p5, obj.hist1d(0), facecolor=
'red',linestyle=
'dashed')
140 p7=fig.add_subplot(2,3,6)
143 p7.plot(h7.xbins(),h7.bins(),
'ro',color=
'red')
def updatePlots(figs, obj)
def Plot(cat, obj, parent, id)
def Edit(cat, obj, panel, path)
def h1d(fig, histo, alpha=0.5, facecolor='green', edgecolor='yellow', linestyle='dashed')
def __init__(self, cat, obj, panel, path)
StatusCode setSigma(double m1, double m2, double m3, double m4)
def createPlots(cat, obj, run)