diff --git a/schainpy/model/data/jrodata.py b/schainpy/model/data/jrodata.py index f962b34..d14b827 100644 --- a/schainpy/model/data/jrodata.py +++ b/schainpy/model/data/jrodata.py @@ -297,7 +297,6 @@ class JROData(GenericData): def getFmax(self): PRF = 1. / (self.ippSeconds * self.nCohInt) - fmax = PRF return fmax @@ -605,11 +604,9 @@ class Spectra(JROData): noise = numpy.zeros(self.nChannels) for channel in range(self.nChannels): - #print "confuse",self.data_spc.dtype daux = self.data_spc[channel, xmin_index:xmax_index, ymin_index:ymax_index] - #print "HI3.0",(daux.dtype),daux.shape noise[channel] = hildebrand_sekhon(daux, self.nIncohInt) return noise @@ -634,9 +631,7 @@ class Spectra(JROData): return freqrange def getAcfRange(self, extrapoints=0): - #print "miay",self.ippFactor - deltafreq = 10. / (self.getFmax() / (self.nFFTPoints * self.ippFactor)) - #print deltafreq + deltafreq = 10. / ( self.getFmax() / (self.nFFTPoints * self.ippFactor) ) freqrange = deltafreq * \ (numpy.arange(self.nFFTPoints + extrapoints) - self.nFFTPoints / 2.) - deltafreq / 2 @@ -646,10 +641,11 @@ class Spectra(JROData): def getFreqRange(self, extrapoints=0): deltafreq = self.getFmax() / (self.nFFTPoints * self.ippFactor) + #print "deltafreq", deltafreq freqrange = deltafreq * \ (numpy.arange(self.nFFTPoints + extrapoints) - self.nFFTPoints / 2.) - deltafreq / 2 - + #print "freqrange",freqrange return freqrange def getVelRange(self, extrapoints=0): diff --git a/schainpy/model/graphics/jroplot_spectra.py b/schainpy/model/graphics/jroplot_spectra.py index 83ac624..7a43c20 100644 --- a/schainpy/model/graphics/jroplot_spectra.py +++ b/schainpy/model/graphics/jroplot_spectra.py @@ -274,7 +274,6 @@ class ACFPlot(Figure): folder=None, username=None, password=None, xaxis="frequency"): - channel0 = channel nSamples = nSamples resFactor = resolutionFactor @@ -313,12 +312,6 @@ class ACFPlot(Figure): shape = dataOut.data_acf.shape hei_index = numpy.arange(shape[2]) hei_plot = numpy.arange(nSamples)*resFactor - #print hei_plot - #import matplotlib.pyplot as plt - #c=z[0,:,0]*15+15 - #plt.plot(c) - #plt.show() - #print "HOLA# if nSampleList is not None: for nsample in nSampleList: @@ -335,18 +328,9 @@ class ACFPlot(Figure): #escalamiento -1 a 1 a resolucion (factor de resolucion en altura)* deltaHeight min = numpy.min(z[0,:,0]) max =numpy.max(z[0,:,0]) - for i in range(shape[0]): for j in range(shape[2]): z[i,:,j]= (((z[i,:,j]-min)/(max-min))*deltaHeight*resFactor + j*deltaHeight) - #z[i,:,j]= (z[i,:,j]+1.0)*deltaHeight*dataOut.step/2.0 + j*deltaHeight*dataOut.step - - #print deltaHeight - #print resFactor - #print numpy.max(z[0,:,0]) - #import matplotlib.pyplot as plt - #plt.plot((z[0,:,0])*deltaHeight) - #plt.show() if xaxis == "frequency": x = dataOut.getFreqRange()/1000. @@ -355,7 +339,8 @@ class ACFPlot(Figure): ylabel = "Power (dB)" elif xaxis == "time": - x = dataOut.getAcfRange() + delta= dataOut.getAcfRange()[1]-dataOut.getAcfRange()[0] + x = dataOut.getAcfRange()+delta/2.0 zdB = z[channel0,:,hei_plot] xlabel = "Time (ms)" ylabel = "ACF" diff --git a/schainpy/model/proc/jroproc_spectra.py b/schainpy/model/proc/jroproc_spectra.py index 1b54d09..2afb375 100644 --- a/schainpy/model/proc/jroproc_spectra.py +++ b/schainpy/model/proc/jroproc_spectra.py @@ -22,20 +22,19 @@ class SpectraProc(ProcessingUnit): def __updateSpecFromVoltage(self): - self.dataOut.timeZone = self.dataIn.timeZone - self.dataOut.dstFlag = self.dataIn.dstFlag - self.dataOut.errorCount = self.dataIn.errorCount - self.dataOut.useLocalTime = self.dataIn.useLocalTime + self.dataOut.timeZone = self.dataIn.timeZone + self.dataOut.dstFlag = self.dataIn.dstFlag + self.dataOut.errorCount = self.dataIn.errorCount + self.dataOut.useLocalTime= self.dataIn.useLocalTime try: self.dataOut.processingHeaderObj = self.dataIn.processingHeaderObj.copy() except: pass self.dataOut.radarControllerHeaderObj = self.dataIn.radarControllerHeaderObj.copy() - self.dataOut.systemHeaderObj = self.dataIn.systemHeaderObj.copy() - self.dataOut.channelList = self.dataIn.channelList - self.dataOut.heightList = self.dataIn.heightList - #print self.dataOut.heightList.shape,"spec4" - self.dataOut.dtype = numpy.dtype([('real', '