##// END OF EJS Templates
en el metodo readblocks se encuentra un error cuando se intenta hacer el reshape del arreglo junk, este error se produce porque no hay bytes suficientes para un bloque de datos. Para esto se propuso el nuevo metodo waitDataBlock que recalcula el numero de byte necesarios para un bloque y espera un tiempo (sleep) en caso no esten disponibles, se hacen tres intentos, si no se tiene exito el programa retorna 0.
en el metodo readblocks se encuentra un error cuando se intenta hacer el reshape del arreglo junk, este error se produce porque no hay bytes suficientes para un bloque de datos. Para esto se propuso el nuevo metodo waitDataBlock que recalcula el numero de byte necesarios para un bloque y espera un tiempo (sleep) en caso no esten disponibles, se hacen tres intentos, si no se tiene exito el programa retorna 0.

File last commit:

r169:661bb8af254a
r434:586e60daf0fb
Show More
schainPlotTypes.py
79 lines | 2.0 KiB | text/x-python | PythonLexer
Miguel Valdez
Inicia nueva version de graficos
r129 import numpy
from schainPlot import *
class RTIFigure(Figure):
Daniel Valdez
r132
overplot = 1 # igual a 1 porque el grafico es RTI, para el caso de Spectra(Spc,CrossSpc) overplot = 0
xw = 700
yw = 150
nframes = None
def __init__(self, idfigure, nframes, wintitle, colormap, driver, showColorbar, showPowerProfile):
Miguel Valdez
Inicia nueva version de graficos
r129
Daniel Valdez
r132 showGraphs = (showColorbar, showPowerProfile)
Figure.__init__(self,
idfigure=idfigure,
nframes = nframes,
wintitle=wintitle,
xw=self.xw,
yw=self.yw,
overplot=self.overplot,
driver=driver,
colormap=colormap,
*showGraphs)
self.nframes = nframes
self.showColorbar = showColorbar
self.showPowerProfile = showPowerProfile
def getSubplots(self):
nrows = self.nframes
ncolumns = 1
Miguel Valdez
Inicia nueva version de graficos
r129
Daniel Valdez
r132 return nrows, ncolumns
Miguel Valdez
Inicia nueva version de graficos
r129
def __createFrames(self):
Daniel Valdez
r132 for frame in range(self.nframes):
Miguel Valdez
Inicia nueva version de graficos
r129 frameObj = RTIFrame(idFrame = frame,
Daniel Valdez
r132 showGraph1 = self.showColorbar,
showGraph2 = self.showPowerProfile
Miguel Valdez
Inicia nueva version de graficos
r129 )
self.frameObjList.append(frameObj)
Daniel Valdez
r132
Miguel Valdez
Inicia nueva version de graficos
r129
class RTIFrame(Frame):
def __init__(self,idFrame, showColorbar, showPowerProfile):
self.idFrame = idFrame
self.showGraph1 = showColorbar
self.showGraph2 = showPowerProfile
Miguel Valdez
r130 def setXYPos(self):
pass
Miguel Valdez
Inicia nueva version de graficos
r129
class SelfSpcFigure(Figure):
def __init__(self):
pass
class SelfSpcFrame(Frame):
def __init__(self):
pass
class CrossSpcFigure(Figure):
def __init__(self):
pass
class CrossSpcFrame(Frame):
def __init__(self):
pass
class ScopeFigure(Figure):
def __init__(self):
pass
class ScopeFrame(Frame):
def __init__(self):
pass