##// END OF EJS Templates
se agregan variables para salvar graficos en disco para el ultimo bloque de datos o cuando se actualiza el eje x
Daniel Valdez -
r458:f4edc9ada2c8
parent child
Show More
@@ -284,7 +284,7 class RTIPlot(Figure):
284 def run(self, dataOut, id, wintitle="", channelList=None, showprofile='True',
284 def run(self, dataOut, id, wintitle="", channelList=None, showprofile='True',
285 xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None,
285 xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None,
286 timerange=None,
286 timerange=None,
287 save=False, figpath='./', figfile=None, ftp=False, wr_period=1, show=True,
287 save=False, figpath='./', lastone=0,figfile=None, ftp=False, wr_period=1, show=True,
288 server=None, folder=None, username=None, password=None,
288 server=None, folder=None, username=None, password=None,
289 ftp_wei=0, exp_code=0, sub_exp_code=0, plot_pos=0):
289 ftp_wei=0, exp_code=0, sub_exp_code=0, plot_pos=0):
290
290
@@ -381,7 +381,13 class RTIPlot(Figure):
381
381
382 self.draw()
382 self.draw()
383
383
384 if save:
384 if lastone:
385 if dataOut.blocknow >= dataOut.last_block:
386 if figfile == None:
387 figfile = self.getFilename(name = self.name)
388 self.saveFigure(figpath, figfile)
389
390 if (save and not(lastone)):
385
391
386 self.counter_imagwr += 1
392 self.counter_imagwr += 1
387 if (self.counter_imagwr==wr_period):
393 if (self.counter_imagwr==wr_period):
@@ -402,7 +408,23 class RTIPlot(Figure):
402 self.counter_imagwr = 0
408 self.counter_imagwr = 0
403
409
404 if x[1] + (x[1]-x[0]) >= self.axesList[0].xmax:
410 if x[1] + (x[1]-x[0]) >= self.axesList[0].xmax:
411
405 self.__isConfig = False
412 self.__isConfig = False
413
414 if lastone:
415 if figfile == None:
416 figfile = self.getFilename(name = self.name)
417 self.saveFigure(figpath, figfile)
418
419 if ftp:
420 #provisionalmente envia archivos en el formato de la web en tiempo real
421 name = self.getNameToFtp(thisDatetime, self.FTP_WEI, self.EXP_CODE, self.SUB_EXP_CODE, self.PLOT_CODE, self.PLOT_POS)
422 path = '%s%03d' %(self.PREFIX, self.id)
423 ftp_file = os.path.join(path,'ftp','%s.png'%name)
424 self.saveFigure(figpath, ftp_file)
425 ftp_filename = os.path.join(figpath,ftp_file)
426 self.sendByFTP_Thread(ftp_filename, server, folder, username, password)
427
406
428
407 class SpectraPlot(Figure):
429 class SpectraPlot(Figure):
408
430
General Comments 0
You need to be logged in to leave comments. Login now