@@ -175,6 +175,8 class JROData: | |||||
175 | C = 3e8 |
|
175 | C = 3e8 | |
176 |
|
176 | |||
177 | frequency = 49.92e6 |
|
177 | frequency = 49.92e6 | |
|
178 | ||||
|
179 | realtime = False | |||
178 |
|
180 | |||
179 | def __init__(self): |
|
181 | def __init__(self): | |
180 |
|
182 |
@@ -467,7 +467,7 class JRODataReader(JRODataIO, ProcessingUnit): | |||||
467 |
|
467 | |||
468 | if not walk: |
|
468 | if not walk: | |
469 | fullpath = path |
|
469 | fullpath = path | |
470 |
|
470 | foldercounter = '' | ||
471 | else: |
|
471 | else: | |
472 | #Filtra solo los directorios |
|
472 | #Filtra solo los directorios | |
473 | for thisPath in os.listdir(path): |
|
473 | for thisPath in os.listdir(path): | |
@@ -479,7 +479,7 class JRODataReader(JRODataIO, ProcessingUnit): | |||||
479 | dirList.append(thisPath) |
|
479 | dirList.append(thisPath) | |
480 |
|
480 | |||
481 | if not(dirList): |
|
481 | if not(dirList): | |
482 | return None, None, None, None, None |
|
482 | return None, None, None, None, None, None | |
483 |
|
483 | |||
484 | dirList = sorted( dirList, key=str.lower ) |
|
484 | dirList = sorted( dirList, key=str.lower ) | |
485 |
|
485 | |||
@@ -1554,6 +1554,8 class VoltageReader(JRODataReader): | |||||
1554 |
|
1554 | |||
1555 | self.profileIndex += 1 |
|
1555 | self.profileIndex += 1 | |
1556 |
|
1556 | |||
|
1557 | self.dataOut.realtime = self.online | |||
|
1558 | ||||
1557 | return self.dataOut.data |
|
1559 | return self.dataOut.data | |
1558 |
|
1560 | |||
1559 |
|
1561 | |||
@@ -2200,6 +2202,8 class SpectraReader(JRODataReader): | |||||
2200 |
|
2202 | |||
2201 | self.dataOut.flagNoData = False |
|
2203 | self.dataOut.flagNoData = False | |
2202 |
|
2204 | |||
|
2205 | self.dataOut.realtime = self.online | |||
|
2206 | ||||
2203 | return self.dataOut.data_spc |
|
2207 | return self.dataOut.data_spc | |
2204 |
|
2208 | |||
2205 |
|
2209 |
@@ -1,6 +1,12 | |||||
1 | import numpy |
|
1 | 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): | |||
|
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 | class CrossSpectraPlot(Figure): |
|
11 | class CrossSpectraPlot(Figure): | |
6 |
|
12 | |||
@@ -1124,6 +1130,11 class SpectraHeisScope(Figure): | |||||
1124 | ymax : None, |
|
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 | if channelList == None: |
|
1138 | if channelList == None: | |
1128 | channelIndexList = dataOut.channelIndexList |
|
1139 | channelIndexList = dataOut.channelIndexList | |
1129 | else: |
|
1140 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now