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