@@ -2,8 +2,8 import numpy | |||
|
2 | 2 | import time, datetime, os |
|
3 | 3 | from graphics.figure import * |
|
4 | 4 | def isRealtime(utcdatatime): |
|
5 |
utcnow = time.mktime( |
|
|
6 | delta = utcnow - utcdatatime # abs | |
|
5 | utcnow = time.mktime(time.localtime()) | |
|
6 | delta = abs(utcnow - utcdatatime) # abs | |
|
7 | 7 | if delta >= 30.: |
|
8 | 8 | return False |
|
9 | 9 | return True |
@@ -479,7 +479,7 class SpectraPlot(Figure): | |||
|
479 | 479 | xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None, |
|
480 | 480 | save=False, figpath='./', figfile=None, show=True, ftp=False, wr_period=1, |
|
481 | 481 | server=None, folder=None, username=None, password=None, |
|
482 | ftp_wei=0, exp_code=0, sub_exp_code=0, plot_pos=0): | |
|
482 | ftp_wei=0, exp_code=0, sub_exp_code=0, plot_pos=0, realtime=False): | |
|
483 | 483 | |
|
484 | 484 | """ |
|
485 | 485 | |
@@ -497,7 +497,7 class SpectraPlot(Figure): | |||
|
497 | 497 | zmax : None |
|
498 | 498 | """ |
|
499 | 499 | |
|
500 |
if |
|
|
500 | if realtime: | |
|
501 | 501 | if not(isRealtime(utcdatatime = dataOut.utctime)): |
|
502 | 502 | print 'Skipping this plot function' |
|
503 | 503 | return |
General Comments 0
You need to be logged in to leave comments.
Login now