@@ -175,6 +175,8 class JROData: | |||
|
175 | 175 | C = 3e8 |
|
176 | 176 | |
|
177 | 177 | frequency = 49.92e6 |
|
178 | ||
|
179 | realtime = False | |
|
178 | 180 | |
|
179 | 181 | def __init__(self): |
|
180 | 182 |
@@ -467,7 +467,7 class JRODataReader(JRODataIO, ProcessingUnit): | |||
|
467 | 467 | |
|
468 | 468 | if not walk: |
|
469 | 469 | fullpath = path |
|
470 | ||
|
470 | foldercounter = '' | |
|
471 | 471 | else: |
|
472 | 472 | #Filtra solo los directorios |
|
473 | 473 | for thisPath in os.listdir(path): |
@@ -479,7 +479,7 class JRODataReader(JRODataIO, ProcessingUnit): | |||
|
479 | 479 | dirList.append(thisPath) |
|
480 | 480 | |
|
481 | 481 | if not(dirList): |
|
482 | return None, None, None, None, None | |
|
482 | return None, None, None, None, None, None | |
|
483 | 483 | |
|
484 | 484 | dirList = sorted( dirList, key=str.lower ) |
|
485 | 485 | |
@@ -1554,6 +1554,8 class VoltageReader(JRODataReader): | |||
|
1554 | 1554 | |
|
1555 | 1555 | self.profileIndex += 1 |
|
1556 | 1556 | |
|
1557 | self.dataOut.realtime = self.online | |
|
1558 | ||
|
1557 | 1559 | return self.dataOut.data |
|
1558 | 1560 | |
|
1559 | 1561 | |
@@ -2200,6 +2202,8 class SpectraReader(JRODataReader): | |||
|
2200 | 2202 | |
|
2201 | 2203 | self.dataOut.flagNoData = False |
|
2202 | 2204 | |
|
2205 | self.dataOut.realtime = self.online | |
|
2206 | ||
|
2203 | 2207 | return self.dataOut.data_spc |
|
2204 | 2208 | |
|
2205 | 2209 |
@@ -1,6 +1,12 | |||
|
1 | 1 | import numpy |
|
2 | 2 | import time, datetime, os |
|
3 | 3 | from graphics.figure import * |
|
4 | def isRealtime(utcdatatime): | |
|
5 | utcnow = time.mktime(datetime.datetime.utcnow().timetuple()) | |
|
6 | delta = utcnow - utcdatatime # abs | |
|
7 | if delta >= 5*60.: | |
|
8 | return False | |
|
9 | return True | |
|
4 | 10 | |
|
5 | 11 | class CrossSpectraPlot(Figure): |
|
6 | 12 | |
@@ -1124,6 +1130,11 class SpectraHeisScope(Figure): | |||
|
1124 | 1130 | ymax : None, |
|
1125 | 1131 | """ |
|
1126 | 1132 | |
|
1133 | if dataOut.realtime: | |
|
1134 | if not(isRealtime(utcdatatime = dataOut.utctime)): | |
|
1135 | print 'Skipping this plot function' | |
|
1136 | return | |
|
1137 | ||
|
1127 | 1138 | if channelList == None: |
|
1128 | 1139 | channelIndexList = dataOut.channelIndexList |
|
1129 | 1140 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now