From 8ee912d4c03e0874033842875ef3de35cafe951b 2012-11-14 17:07:15 From: Daniel Valdez Date: 2012-11-14 17:07:15 Subject: [PATCH] --- diff --git a/schainpy2/IO/SpectraIO.py b/schainpy2/IO/SpectraIO.py index 0fa8b25..e7e9f99 100644 --- a/schainpy2/IO/SpectraIO.py +++ b/schainpy2/IO/SpectraIO.py @@ -369,6 +369,10 @@ class SpectraReader(JRODataReader): self.dataOutObj.utctime = self.basicHeaderObj.utc + self.basicHeaderObj.miliSecond/1000.#+ self.profileIndex * self.ippSeconds + self.dataOutObj.ippSeconds = self.ippSeconds + + self.dataOutObj.timeInterval = self.ippSeconds * self.processingHeaderObj.nCohInt * self.processingHeaderObj.nIncohInt * self.dataOutObj.nFFTPoints + self.dataOutObj.flagShiftFFT = self.processingHeaderObj.shif_fft # self.profileIndex += 1 diff --git a/schainpy2/IO/VoltageIO.py b/schainpy2/IO/VoltageIO.py index f687e8e..6ce38ae 100644 --- a/schainpy2/IO/VoltageIO.py +++ b/schainpy2/IO/VoltageIO.py @@ -297,7 +297,7 @@ class VoltageReader(JRODataReader): self.dataOutObj.ippSeconds = self.ippSeconds - self.dataOutObj.timeInterval = self.ippSeconds + self.dataOutObj.timeInterval = self.ippSeconds * self.processingHeaderObj.nCohInt self.dataOutObj.nCohInt = self.processingHeaderObj.nCohInt diff --git a/schainpy2/Processing/SpectraProcessor.py b/schainpy2/Processing/SpectraProcessor.py index ed74182..e3aaf29 100644 --- a/schainpy2/Processing/SpectraProcessor.py +++ b/schainpy2/Processing/SpectraProcessor.py @@ -211,6 +211,8 @@ class SpectraProcessor: self.dataOutObj.flagDeflipData = self.dataInObj.flagDeflipData #asumo q la data esta sin flip self.dataOutObj.flagShiftFFT = self.dataInObj.flagShiftFFT self.dataOutObj.nIncohInt = 1 + self.dataOutObj.ippSeconds = self.dataInObj.ippSeconds + self.dataOutObj.timeInterval = self.dataInObj.timeInterval def addWriter(self, wrpath, blocksPerFile): @@ -261,6 +263,63 @@ class SpectraProcessor: if len(self.plotObjList) <= self.plotObjIndex: self.addSpc(idfigure, nframes, wintitle, driver, colormap, colorbar, showprofile) + def addRti(self, idfigure, nframes, wintitle, driver, colormap, colorbar, showprofile): + rtiObj = RTIFigure(idfigure, nframes, wintitle, driver, colormap, colorbar, showprofile) + self.plotObjList.append(rtiObj) + + def plotRti(self, idfigure=None, + starttime=None, + endtime=None, + rangemin=None, + rangemax=None, + minvalue=None, + maxvalue=None, + wintitle='', + driver='plplot', + colormap='br_greeen', + colorbar=True, + showprofile=False, + xrangestep=None, + save=False, + gpath=None, + ratio=1, + channelList=None): + + if self.dataOutObj.flagNoData: + return 0 + + if channelList == None: + channelList = self.dataOutObj.channelList + + nframes = len(channelList) + + if len(self.plotObjList) <= self.plotObjIndex: + self.addRti(idfigure, nframes, wintitle, driver, colormap, colorbar, showprofile) + + data = 10.*numpy.log10(self.dataOutObj.data_spc[channelList,:,:]) + + currenttime = self.dataOutObj.utctime - time.timezone + + range = self.dataOutObj.heightList + + + figuretitle = "RTI Plot for Spectra Data" #+ date + + cleardata = False + + deltax = self.dataOutObj.timeInterval + + plotObj = self.plotObjList[self.plotObjIndex] + + + + + + self.plotObjIndex += 1 + + + + diff --git a/schainpy2/Processing/VoltageProcessor.py b/schainpy2/Processing/VoltageProcessor.py index 172d34c..2acd7b3 100644 --- a/schainpy2/Processing/VoltageProcessor.py +++ b/schainpy2/Processing/VoltageProcessor.py @@ -97,7 +97,7 @@ class VoltageProcessor: thisdatetime = datetime.datetime.fromtimestamp(self.dataOutObj.utctime) dateTime = "%s"%(thisdatetime.strftime("%d-%b-%Y %H:%M:%S")) date = "%s"%(thisdatetime.strftime("%d-%b-%Y")) - print thisdatetime + figuretitle = "RTI Plot Radar Data" #+ date plotObj = self.plotObjList[self.plotObjIndex] @@ -221,7 +221,7 @@ class VoltageProcessor: myCohIntObj = self.integratorObjList[self.integratorObjIndex] myCohIntObj.exe(data = self.dataOutObj.data, datatime=None) - self.dataOutObj.timeInterval *= nCohInt +# self.dataOutObj.timeInterval *= nCohInt self.dataOutObj.flagNoData = True if myCohIntObj.isReady: