##// END OF EJS Templates
Agregando funciones para guardar graficos del tipo Voltage
Daniel Valdez -
r113:1c6a8ba2204a
parent child
Show More
@@ -822,6 +822,8 class RtiPlot:
822 nrow = nsubplot
822 nrow = nsubplot
823 initPlplot(indexPlot,ncol,nrow,winTitle,self.width,self.height)
823 initPlplot(indexPlot,ncol,nrow,winTitle,self.width,self.height)
824 setColormap(colormap)
824 setColormap(colormap)
825 self.ncol = ncol
826 self.nrow = nrow
825
827
826 def setFigure(self,indexPlot):
828 def setFigure(self,indexPlot):
827 setStrm(indexPlot)
829 setStrm(indexPlot)
@@ -1005,6 +1007,12 class RtiPlot:
1005 powObj.plotBox(powObj.xrange[0], powObj.xrange[1], powObj.yrange[0], powObj.yrange[1], "bc", "bc")
1007 powObj.plotBox(powObj.xrange[0], powObj.xrange[1], powObj.yrange[0], powObj.yrange[1], "bc", "bc")
1006 powObj.basicXYPlot(data,y)
1008 powObj.basicXYPlot(data,y)
1007 powObj.setXYData(data,y)
1009 powObj.setXYData(data,y)
1008
1010
1011 def savePlot(self,indexPlot,filename):
1012
1013 width = self.width*self.ncol
1014 hei = self.height*self.nrow
1015 savePlplot(filename,width,hei)
1016
1009 def refresh(self):
1017 def refresh(self):
1010 plFlush() No newline at end of file
1018 plFlush()
@@ -136,7 +136,8 class RTI:
136 colormap="br_green",
136 colormap="br_green",
137 showColorbar=True,
137 showColorbar=True,
138 showPowerProfile=True,
138 showPowerProfile=True,
139 XAxisAsTime=True):
139 XAxisAsTime=True,
140 save = False):
140
141
141 databuffer = self.voltageObj.data
142 databuffer = self.voltageObj.data
142 timedata = self.voltageObj.m_BasicHeader.utc
143 timedata = self.voltageObj.m_BasicHeader.utc
@@ -188,3 +189,11 class RTI:
188 self.colorplotObj.plot(subplot=index+1,x=timedata,y=height,z=data)
189 self.colorplotObj.plot(subplot=index+1,x=timedata,y=height,z=data)
189
190
190 self.colorplotObj.refresh()
191 self.colorplotObj.refresh()
192
193 if save:
194 self.colorplotObj.setFigure(indexPlot)
195 path = "/Users/jro/Pictures"
196 now = datetime.datetime.now().timetuple()
197 file = "rti_img%02d_%03d_%02d%02d%02d.png"%(indexPlot,now[7],now[3],now[4],now[5])
198 filename = os.path.join(path,file)
199 self.colorplotObj.savePlot(indexPlot, filename)
@@ -287,6 +287,7 class JRODataReader(JRODataIO):
287 """
287 """
288 raise ValueError, "This method has not been implemented"
288 raise ValueError, "This method has not been implemented"
289
289
290 # def setup(self, dataOutObj=None, path=None, startDateTime=None, endDateTime=None, set=0, expLabel = "", ext = None, online = 0):
290 def setup(self, dataOutObj=None, path=None, startDateTime=None, endDateTime=None, set=0, expLabel = "", ext = None, online = 0):
291 def setup(self, dataOutObj=None, path=None, startDateTime=None, endDateTime=None, set=0, expLabel = "", ext = None, online = 0):
291 """
292 """
292 setup configura los parametros de lectura de la clase DataReader.
293 setup configura los parametros de lectura de la clase DataReader.
@@ -182,6 +182,7 class VoltageProcessor:
182 showColorbar=True,
182 showColorbar=True,
183 showPowerProfile=False,
183 showPowerProfile=False,
184 XAxisAsTime=True,
184 XAxisAsTime=True,
185 save=False,
185 index=None):
186 index=None):
186
187
187 if self.dataOutObj.flagNoData:
188 if self.dataOutObj.flagNoData:
@@ -205,7 +206,8 class VoltageProcessor:
205 colormap,
206 colormap,
206 showColorbar,
207 showColorbar,
207 showPowerProfile,
208 showPowerProfile,
208 XAxisAsTime)
209 XAxisAsTime,
210 save)
209
211
210 self.plotterObjIndex += 1
212 self.plotterObjIndex += 1
211
213
General Comments 0
You need to be logged in to leave comments. Login now