##// END OF EJS Templates
Miguel Valdez -
r231:3ad829c7efcb
parent child
Show More
@@ -1,5 +1,6
1 1 import os
2 2 import numpy
3 import time, datetime
3 4 import mpldriver
4 5
5 6
@@ -13,6 +14,7 class Figure:
13 14 width = None
14 15 height = None
15 16 nplots = None
17 timerange = None
16 18
17 19 axesObjList = []
18 20
@@ -67,7 +69,7 class Figure:
67 69 xmin = td.seconds/(60*60.)
68 70
69 71 if xmax == None:
70 xmax = xmin + self.__timerange/(60*60.)
72 xmax = xmin + self.timerange/(60*60.)
71 73
72 74 mindt = thisdate + datetime.timedelta(0,0,0,0,0, xmin)
73 75 tmin = time.mktime(mindt.timetuple())
@@ -75,7 +77,7 class Figure:
75 77 maxdt = thisdate + datetime.timedelta(0,0,0,0,0, xmax)
76 78 tmax = time.mktime(maxdt.timetuple())
77 79
78 self.__timerange = tmax - tmin
80 self.timerange = tmax - tmin
79 81
80 82 return tmin, tmax
81 83
@@ -357,7 +357,12 class JRODataReader(JRODataIO, ProcessingUnit):
357 357 pathList.append(os.path.join(path,match[0],expLabel))
358 358 thisDate += datetime.timedelta(1)
359 359
360 if pathList == []:
361 print "Any folder found into date range %s-%s" %(startDate, endDate)
362 return None, None
360 363
364 print "%d folder(s) found [%s, ...]" %(len(pathList), pathList[0])
365
361 366 filenameList = []
362 367 for thisPath in pathList:
363 368
@@ -372,6 +377,7 class JRODataReader(JRODataIO, ProcessingUnit):
372 377 filenameList.append(filename)
373 378
374 379 if not(filenameList):
380 print "Any file found into time range %s-%s" %(startTime, endTime)
375 381 return None, None
376 382
377 383 self.filenameList = filenameList
@@ -178,7 +178,7 class RTIPlot(Figure):
178 178
179 179 def __init__(self):
180 180
181 self.__timerange = 24*60*60
181 self.timerange = 24*60*60
182 182 self.__isConfig = False
183 183 self.__nsubplots = 1
184 184
@@ -258,7 +258,7 class RTIPlot(Figure):
258 258 channelIndexList.append(dataOut.channelList.index(channel))
259 259
260 260 if timerange != None:
261 self.__timerange = timerange
261 self.timerange = timerange
262 262
263 263 tmin = None
264 264 tmax = None
@@ -673,7 +673,7 class CoherencePlot(Figure):
673 673 PREFIX = 'coherencemap'
674 674
675 675 def __init__(self):
676 self.__timerange = 24*60*60
676 self.timerange = 24*60*60
677 677 self.__isConfig = False
678 678 self.__nsubplots = 1
679 679
@@ -729,7 +729,7 class CoherencePlot(Figure):
729 729 pairsIndexList.append(dataOut.pairsList.index(pair))
730 730
731 731 if timerange != None:
732 self.__timerange = timerange
732 self.timerange = timerange
733 733
734 734 tmin = None
735 735 tmax = None
General Comments 0
You need to be logged in to leave comments. Login now