diff --git a/schainpy/model/graphics/figure.py b/schainpy/model/graphics/figure.py index 278238d..1141496 100644 --- a/schainpy/model/graphics/figure.py +++ b/schainpy/model/graphics/figure.py @@ -1,5 +1,6 @@ import os import numpy +import time, datetime import mpldriver @@ -13,6 +14,7 @@ class Figure: width = None height = None nplots = None + timerange = None axesObjList = [] @@ -67,7 +69,7 @@ class Figure: xmin = td.seconds/(60*60.) if xmax == None: - xmax = xmin + self.__timerange/(60*60.) + xmax = xmin + self.timerange/(60*60.) mindt = thisdate + datetime.timedelta(0,0,0,0,0, xmin) tmin = time.mktime(mindt.timetuple()) @@ -75,7 +77,7 @@ class Figure: maxdt = thisdate + datetime.timedelta(0,0,0,0,0, xmax) tmax = time.mktime(maxdt.timetuple()) - self.__timerange = tmax - tmin + self.timerange = tmax - tmin return tmin, tmax diff --git a/schainpy/model/jrodataIO.py b/schainpy/model/jrodataIO.py index b96b152..78d1461 100644 --- a/schainpy/model/jrodataIO.py +++ b/schainpy/model/jrodataIO.py @@ -357,7 +357,12 @@ class JRODataReader(JRODataIO, ProcessingUnit): pathList.append(os.path.join(path,match[0],expLabel)) thisDate += datetime.timedelta(1) + if pathList == []: + print "Any folder found into date range %s-%s" %(startDate, endDate) + return None, None + print "%d folder(s) found [%s, ...]" %(len(pathList), pathList[0]) + filenameList = [] for thisPath in pathList: @@ -372,6 +377,7 @@ class JRODataReader(JRODataIO, ProcessingUnit): filenameList.append(filename) if not(filenameList): + print "Any file found into time range %s-%s" %(startTime, endTime) return None, None self.filenameList = filenameList diff --git a/schainpy/model/jroplot.py b/schainpy/model/jroplot.py index 40663fb..2dff751 100644 --- a/schainpy/model/jroplot.py +++ b/schainpy/model/jroplot.py @@ -178,7 +178,7 @@ class RTIPlot(Figure): def __init__(self): - self.__timerange = 24*60*60 + self.timerange = 24*60*60 self.__isConfig = False self.__nsubplots = 1 @@ -258,7 +258,7 @@ class RTIPlot(Figure): channelIndexList.append(dataOut.channelList.index(channel)) if timerange != None: - self.__timerange = timerange + self.timerange = timerange tmin = None tmax = None @@ -673,7 +673,7 @@ class CoherencePlot(Figure): PREFIX = 'coherencemap' def __init__(self): - self.__timerange = 24*60*60 + self.timerange = 24*60*60 self.__isConfig = False self.__nsubplots = 1 @@ -729,7 +729,7 @@ class CoherencePlot(Figure): pairsIndexList.append(dataOut.pairsList.index(pair)) if timerange != None: - self.__timerange = timerange + self.timerange = timerange tmin = None tmax = None