From 4d46abf6970f5a25faa873d50029e179c8109934 2015-08-11 17:57:43 From: Julio Valdez Date: 2015-08-11 17:57:43 Subject: [PATCH] -timerange bug fix at Meteor Phase Plot -bug fix at HDF5 Writer unit --- diff --git a/schainpy/model/graphics/jroplot_parameters.py b/schainpy/model/graphics/jroplot_parameters.py index de8969c..6b7cc9f 100644 --- a/schainpy/model/graphics/jroplot_parameters.py +++ b/schainpy/model/graphics/jroplot_parameters.py @@ -1250,9 +1250,6 @@ class PhasePlot(Figure): server=None, folder=None, username=None, password=None, ftp_wei=0, exp_code=0, sub_exp_code=0, plot_pos=0): - - if timerange != None: - self.timerange = timerange tmin = None tmax = None @@ -1280,8 +1277,12 @@ class PhasePlot(Figure): wintitle=wintitle, showprofile=showprofile, show=show) - - tmin, tmax = self.getTimeLim(x, xmin, xmax) + + if timerange != None: + self.timerange = timerange + + self.xmin, self.xmax = self.getTimeLim(x, xmin, xmax, timerange) + if ymin == None: ymin = numpy.nanmin(phase_beacon) - 10.0 if ymax == None: ymax = numpy.nanmax(phase_beacon) + 10.0 @@ -1324,7 +1325,7 @@ class PhasePlot(Figure): axes.pmultilineyaxis(x=self.xdata, y=self.ydata, - xmin=tmin, xmax=tmax, ymin=ymin, ymax=ymax, + xmin=self.xmin, xmax=self.xmax, ymin=ymin, ymax=ymax, xlabel=xlabel, ylabel=ylabel, title=title, legendlabels=legendlabels, marker='x', markersize=8, linestyle="solid", XAxisAsTime=True, grid='both' ) diff --git a/schainpy/model/io/jroIO_HDF5.py b/schainpy/model/io/jroIO_HDF5.py index 50ae899..4952d4d 100644 --- a/schainpy/model/io/jroIO_HDF5.py +++ b/schainpy/model/io/jroIO_HDF5.py @@ -843,8 +843,6 @@ class HDF5Writer(Operation): def putData(self): if not self.firsttime: - self.fp.flush() - self.fp.close() self.readBlock() if self.blockIndex == self.blocksPerFile: @@ -854,6 +852,8 @@ class HDF5Writer(Operation): self.setBlock() self.writeBlock() + self.fp.flush() + self.fp.close() return