##// END OF EJS Templates
-Se modificó el atributo nChannels de la clase JROData y derivadas por la propiedad nChannels (llamada a la funcion self.getNChannels)...
-Se modificó el atributo nChannels de la clase JROData y derivadas por la propiedad nChannels (llamada a la funcion self.getNChannels) -Se modificó el atributo channelIndexList de la clase JROData y derivadas por la propiedad channelIndexList (llamada a la funcion self.getChannelIndexList) -Se eliminó todas las asignaciones de valor de 'nChannels' y 'channelIndexList' de los obejtos del tipo JROData y derivados (ahora no son atributos sino que se modifican dinamicante a partir de 'channelList') -Se modificó el metodo selectChannels de la clase VoltageProc y SpectraProc para que acepte como atributo la lista de canales y no la lista de indices de canales. -Se modificó el test del controlador para probar estas modificaciones

File last commit:

r199:83ce53852b6c
r200:ac28b7810bcd
Show More
mpldriver.py
85 lines | 2.6 KiB | text/x-python | PythonLexer
Daniel Valdez
Se agrega el folder "graphics" que contiene figure.py y mpldriver.py...
r190 import matplotlib
Miguel Valdez
Primera version del controlador probada y testeada incluyendo graficos
r199 matplotlib.use("TKAgg")
Daniel Valdez
Se agrega el folder "graphics" que contiene figure.py y mpldriver.py...
r190 import matplotlib.pyplot
Miguel Valdez
Controlador de Signal Chain finalizado....
r197 #import scitools.numpyutils
Daniel Valdez
En graphics:...
r192 from mpl_toolkits.axes_grid1 import make_axes_locatable
Daniel Valdez
Se agrega el folder "graphics" que contiene figure.py y mpldriver.py...
r190
def init(idfigure, wintitle, width, height):
matplotlib.pyplot.ioff()
fig = matplotlib.pyplot.matplotlib.pyplot.figure(num=idfigure, facecolor="w")
fig.canvas.manager.set_window_title(wintitle)
fig.canvas.manager.resize(width,height)
matplotlib.pyplot.ion()
Daniel Valdez
En esta version se ha implementado la clase para ploteo de espectros, a este grafico aun le falta agregar el perfil de potencia para cada canal.
r196 return fig
def setWinTitle(fig, title):
fig.canvas.manager.set_window_title(title)
Daniel Valdez
Se agrega el folder "graphics" que contiene figure.py y mpldriver.py...
r190 def setTextFromAxes(idfigure, ax, title):
fig = matplotlib.pyplot.figure(idfigure)
ax.annotate(title, xy=(.1, .99),
xycoords='figure fraction',
horizontalalignment='left', verticalalignment='top',
fontsize=10)
def setTitle(idfigure, title):
fig = matplotlib.pyplot.figure(idfigure)
fig.suptitle(title)
def makeAxes(idfigure, nrow, ncol, xpos, ypos, colspan, rowspan):
fig = matplotlib.pyplot.figure(idfigure)
ax = matplotlib.pyplot.subplot2grid((nrow, ncol), (xpos, ypos), colspan=colspan, rowspan=rowspan)
return ax
def pline(ax, x, y, xmin, xmax, ymin, ymax, xlabel, ylabel, title, firsttime):
if firsttime:
ax.plot(x, y)
ax.set_xlim([xmin,xmax])
ax.set_ylim([ymin,ymax])
ax.set_xlabel(xlabel, size=8)
ax.set_ylabel(ylabel, size=8)
ax.set_title(title, size=10)
matplotlib.pyplot.tight_layout()
else:
ax.lines[0].set_data(x,y)
def draw(idfigure):
fig = matplotlib.pyplot.figure(idfigure)
fig.canvas.draw()
Daniel Valdez
En graphics:...
r192 def pcolor(ax, x, y, z, xmin, xmax, ymin, ymax, zmin, zmax, xlabel, ylabel, title, firsttime, mesh):
if firsttime:
divider = make_axes_locatable(ax)
ax_cb = divider.new_horizontal(size="5%", pad=0.05)
fig1 = ax.get_figure()
fig1.add_axes(ax_cb)
ax.set_xlim([xmin,xmax])
ax.set_ylim([ymin,ymax])
ax.set_xlabel(xlabel)
ax.set_ylabel(ylabel)
ax.set_title(title)
Daniel Valdez
En esta version se ha implementado la clase para ploteo de espectros, a este grafico aun le falta agregar el perfil de potencia para cada canal.
r196 imesh=ax.pcolormesh(x,y,z.T,vmin=zmin,vmax=zmax)
Daniel Valdez
En graphics:...
r192 matplotlib.pyplot.colorbar(imesh, cax=ax_cb)
ax_cb.yaxis.tick_right()
for tl in ax_cb.get_yticklabels():
tl.set_visible(True)
ax_cb.yaxis.tick_right()
matplotlib.pyplot.tight_layout()
return imesh
else:
Miguel Valdez
Primera version del controlador probada y testeada incluyendo graficos
r199 ax.set_xlim([xmin,xmax])
ax.set_ylim([ymin,ymax])
ax.set_xlabel(xlabel)
ax.set_ylabel(ylabel)
ax.set_title(title)
Daniel Valdez
En esta version se ha implementado la clase para ploteo de espectros, a este grafico aun le falta agregar el perfil de potencia para cada canal.
r196 z = z.T
z = z[0:-1,0:-1]
mesh.set_array(z.ravel())
Daniel Valdez
En graphics:...
r192
return mesh
Daniel Valdez
Se agrega el folder "graphics" que contiene figure.py y mpldriver.py...
r190