diff --git a/schainpy/Graphics/BaseGraph.py b/schainpy/Graphics/BaseGraph.py index cfb3998..977748b 100644 --- a/schainpy/Graphics/BaseGraph.py +++ b/schainpy/Graphics/BaseGraph.py @@ -822,6 +822,8 @@ class RtiPlot: nrow = nsubplot initPlplot(indexPlot,ncol,nrow,winTitle,self.width,self.height) setColormap(colormap) + self.ncol = ncol + self.nrow = nrow def setFigure(self,indexPlot): setStrm(indexPlot) @@ -1005,6 +1007,12 @@ class RtiPlot: powObj.plotBox(powObj.xrange[0], powObj.xrange[1], powObj.yrange[0], powObj.yrange[1], "bc", "bc") powObj.basicXYPlot(data,y) powObj.setXYData(data,y) - + + def savePlot(self,indexPlot,filename): + + width = self.width*self.ncol + hei = self.height*self.nrow + savePlplot(filename,width,hei) + def refresh(self): plFlush() \ No newline at end of file diff --git a/schainpy/Graphics/VoltagePlot.py b/schainpy/Graphics/VoltagePlot.py index 3d6cf04..153770d 100644 --- a/schainpy/Graphics/VoltagePlot.py +++ b/schainpy/Graphics/VoltagePlot.py @@ -136,7 +136,8 @@ class RTI: colormap="br_green", showColorbar=True, showPowerProfile=True, - XAxisAsTime=True): + XAxisAsTime=True, + save = False): databuffer = self.voltageObj.data timedata = self.voltageObj.m_BasicHeader.utc @@ -188,3 +189,11 @@ class RTI: self.colorplotObj.plot(subplot=index+1,x=timedata,y=height,z=data) self.colorplotObj.refresh() + + if save: + self.colorplotObj.setFigure(indexPlot) + path = "/Users/jro/Pictures" + now = datetime.datetime.now().timetuple() + file = "rti_img%02d_%03d_%02d%02d%02d.png"%(indexPlot,now[7],now[3],now[4],now[5]) + filename = os.path.join(path,file) + self.colorplotObj.savePlot(indexPlot, filename) diff --git a/schainpy/IO/JRODataIO.py b/schainpy/IO/JRODataIO.py index eb905ba..001e315 100644 --- a/schainpy/IO/JRODataIO.py +++ b/schainpy/IO/JRODataIO.py @@ -287,6 +287,7 @@ class JRODataReader(JRODataIO): """ raise ValueError, "This method has not been implemented" +# def setup(self, dataOutObj=None, path=None, startDateTime=None, endDateTime=None, set=0, expLabel = "", ext = None, online = 0): def setup(self, dataOutObj=None, path=None, startDateTime=None, endDateTime=None, set=0, expLabel = "", ext = None, online = 0): """ setup configura los parametros de lectura de la clase DataReader. diff --git a/schainpy/Processing/VoltageProcessor.py b/schainpy/Processing/VoltageProcessor.py index c15f139..7e7034c 100644 --- a/schainpy/Processing/VoltageProcessor.py +++ b/schainpy/Processing/VoltageProcessor.py @@ -182,6 +182,7 @@ class VoltageProcessor: showColorbar=True, showPowerProfile=False, XAxisAsTime=True, + save=False, index=None): if self.dataOutObj.flagNoData: @@ -205,7 +206,8 @@ class VoltageProcessor: colormap, showColorbar, showPowerProfile, - XAxisAsTime) + XAxisAsTime, + save) self.plotterObjIndex += 1