Cat
Functions
CurrentMeasurement Namespace Reference

Functions

def Edit (cat, obj, panel, path)
 
def createPlot (cat, obj, run)
 
def updatePlot (fig, obj)
 

Function Documentation

◆ createPlot()

def CurrentMeasurement.createPlot (   cat,
  obj,
  run 
)

Definition at line 47 of file CurrentMeasurement.py.

References numberOfDevices().

47 def createPlot(cat, obj, run):
48  fig = plt.figure(figsize=(10,10))
49  fig.suptitle("Run "+str(run), fontsize=14, fontweight='bold')
50  ndevices = obj.element().numberOfDevices()
51  c=['r','b','g','c']
52  for i in range(ndevices):
53  for ch in range(4):
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)
60  ax.set_ylim(0.,0.25)
61  ax.grid()
62  fig.show()
63  return fig
64 
def createPlot(cat, obj, run)

◆ Edit()

def CurrentMeasurement.Edit (   cat,
  obj,
  panel,
  path 
)

Definition at line 42 of file CurrentMeasurement.py.

42 def Edit (cat, obj, panel, path):
43  return CurrentMeasurement(cat, obj, panel, path)
44 
45 #----------------------------------------------------------------------
46 
def Edit(cat, obj, panel, path)

◆ updatePlot()

def CurrentMeasurement.updatePlot (   fig,
  obj 
)

Definition at line 65 of file CurrentMeasurement.py.

References numberOfDevices().

65 def updatePlot(fig, obj):
66  ndevices = obj.element().numberOfDevices()
67  c=['r','b','g','c']
68  for i in range(ndevices):
69  for ch in range(4):
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))
74  ax.relim()
75  ax.autoscale_view()
76  ax.set_ylim(bottom=0.)
77 
78  fig.canvas.draw()
79  fig.canvas.flush_events()
80 
81 #----------------------------------------------------------------------
82 
def updatePlot(fig, obj)