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