@@ -318,6 +318,7 class ACFPlot(Figure): | |||||
318 |
|
318 | |||
319 | #z = numpy.where(numpy.isfinite(z), z, numpy.NAN) |
|
319 | #z = numpy.where(numpy.isfinite(z), z, numpy.NAN) | |
320 | shape = dataOut.data_acf.shape |
|
320 | shape = dataOut.data_acf.shape | |
|
321 | print "shape_plot",shape | |||
321 | hei_index = numpy.arange(shape[2]) |
|
322 | hei_index = numpy.arange(shape[2]) | |
322 | hei_plot = numpy.arange(nSamples)*resFactor |
|
323 | hei_plot = numpy.arange(nSamples)*resFactor | |
323 |
|
324 | |||
@@ -330,7 +331,7 class ACFPlot(Figure): | |||||
330 | hei_plot = numpy.array(nSampleList)*resFactor |
|
331 | hei_plot = numpy.array(nSampleList)*resFactor | |
331 |
|
332 | |||
332 | if hei_plot[-1] >= hei_index[-1]: |
|
333 | if hei_plot[-1] >= hei_index[-1]: | |
333 |
print ("La cantidad de puntos en altura es %d y la resolucion es % |
|
334 | print ("La cantidad de puntos en altura es %d y la resolucion es %f Km"%(hei_plot.shape[0],deltaHeight*resFactor )) | |
334 | raise ValueError, "resFactor %d multiplicado por el valor de %d nSamples es mayor a %d cantidad total de puntos"%(resFactor,nSamples,hei_index[-1]) |
|
335 | raise ValueError, "resFactor %d multiplicado por el valor de %d nSamples es mayor a %d cantidad total de puntos"%(resFactor,nSamples,hei_index[-1]) | |
335 |
|
336 | |||
336 | #escalamiento -1 a 1 a resolucion (factor de resolucion en altura)* deltaHeight |
|
337 | #escalamiento -1 a 1 a resolucion (factor de resolucion en altura)* deltaHeight | |
@@ -376,8 +377,8 class ACFPlot(Figure): | |||||
376 | if ymin == None: ymin = numpy.nanmin(zdB) |
|
377 | if ymin == None: ymin = numpy.nanmin(zdB) | |
377 | if ymax == None: ymax = numpy.nanmax(zdB) |
|
378 | if ymax == None: ymax = numpy.nanmax(zdB) | |
378 |
|
379 | |||
379 |
print ("El parametro resFactor es %d y la resolucion en altura es % |
|
380 | print ("El parametro resFactor es %d y la resolucion en altura es %f"%(resFactor,deltaHeight )) | |
380 |
print ("La cantidad de puntos en altura es %d y la nueva resolucion es % |
|
381 | print ("La cantidad de puntos en altura es %d y la nueva resolucion es %f Km"%(hei_plot.shape[0],deltaHeight*resFactor )) | |
381 | print ("La altura maxima es %d Km"%(hei_plot[-1]*deltaHeight )) |
|
382 | print ("La altura maxima es %d Km"%(hei_plot[-1]*deltaHeight )) | |
382 |
|
383 | |||
383 | self.isConfig = True |
|
384 | self.isConfig = True |
@@ -151,24 +151,28 class SpectraAFCProc(ProcessingUnit): | |||||
151 | shape = acf.shape # nchannels, nprofiles, nsamples |
|
151 | shape = acf.shape # nchannels, nprofiles, nsamples | |
152 |
|
152 | |||
153 | #import matplotlib.pyplot as plt |
|
153 | #import matplotlib.pyplot as plt | |
154 | #acf_tmp=acf[0,:,85] |
|
154 | #print "test",acf.shape | |
|
155 | #acf_tmp=acf[0,:,] | |||
155 | #plt.plot(acf_tmp) |
|
156 | #plt.plot(acf_tmp) | |
156 | #plt.show() |
|
157 | #plt.show() | |
157 |
|
158 | #import time | ||
158 | for i in range(shape[1]): |
|
159 | #time.sleep(10) | |
159 | tmp = numpy.argmax(acf[0,:,i]) |
|
160 | ||
160 | if i>30: |
|
161 | for j in range(shape[0]): | |
161 | value = (acf[0,:,i][tmp+3]+acf[0,:,i][tmp+4])/2.0 |
|
162 | for i in range(shape[1]): | |
162 | acf[0,:,i][tmp] = value |
|
163 | tmp = numpy.argmax(acf[j,:,i]) | |
163 | acf[0,:,i][tmp-1] = value |
|
164 | if i>30: | |
164 | acf[0,:,i][tmp+1] = value |
|
165 | value = (acf[j,:,i][tmp+3]+acf[j,:,i][tmp+4])/2.0 | |
165 |
|
|
166 | acf[j,:,i][tmp] = value | |
166 |
|
|
167 | acf[j,:,i][tmp-1] = value | |
167 |
|
168 | acf[j,:,i][tmp+1] = value | ||
168 | import scipy as sp |
|
169 | acf[j,:,i][tmp-2] = value | |
169 | from scipy import signal |
|
170 | acf[j,:,i][tmp+2] = value | |
170 | acf[0,:,i] = sp.signal.medfilt(acf[0,:,i],21) |
|
171 | ||
171 |
|
172 | import scipy as sp | ||
|
173 | from scipy import signal | |||
|
174 | #acf[3,:,i] = sp.signal.medfilt(acf[3,:,i],21) | |||
|
175 | ||||
172 |
|
176 | |||
173 |
|
177 | |||
174 | #print numpy.argmax(acf[0,:,85]) |
|
178 | #print numpy.argmax(acf[0,:,85]) |
@@ -1276,6 +1276,11 class SSheightProfiles(Operation): | |||||
1276 | self.__nProfiles = dataOut.nProfiles |
|
1276 | self.__nProfiles = dataOut.nProfiles | |
1277 | self.__nHeis = dataOut.nHeights |
|
1277 | self.__nHeis = dataOut.nHeights | |
1278 | shape = dataOut.data.shape #nchannels, nprofiles, nsamples |
|
1278 | shape = dataOut.data.shape #nchannels, nprofiles, nsamples | |
|
1279 | print "input nChannels",self.__nChannels | |||
|
1280 | print "input nProfiles",self.__nProfiles | |||
|
1281 | print "input nHeis",self.__nHeis | |||
|
1282 | print "input Shape",shape | |||
|
1283 | ||||
1279 |
|
1284 | |||
1280 |
|
1285 | |||
1281 | residue = (shape[1] - self.nsamples) % self.step |
|
1286 | residue = (shape[1] - self.nsamples) % self.step | |
@@ -1286,7 +1291,10 class SSheightProfiles(Operation): | |||||
1286 | numberProfile = self.nsamples |
|
1291 | numberProfile = self.nsamples | |
1287 | numberSamples = (shape[1] - self.nsamples)/self.step |
|
1292 | numberSamples = (shape[1] - self.nsamples)/self.step | |
1288 |
|
1293 | |||
1289 | print "New number of profile: %d, number of height: %d, Resolution %d Km"%(numberProfile,numberSamples,deltaHeight*self.step) |
|
1294 | print "new numberProfile",numberProfile | |
|
1295 | print "new numberSamples",numberSamples | |||
|
1296 | ||||
|
1297 | print "New number of profile: %d, number of height: %d, Resolution %f Km"%(numberProfile,numberSamples,deltaHeight*self.step) | |||
1290 |
|
1298 | |||
1291 | self.bufferShape = shape[0], numberSamples, numberProfile # nchannels, nsamples , nprofiles |
|
1299 | self.bufferShape = shape[0], numberSamples, numberProfile # nchannels, nsamples , nprofiles | |
1292 | self.profileShape = shape[0], numberProfile, numberSamples # nchannels, nprofiles, nsamples |
|
1300 | self.profileShape = shape[0], numberProfile, numberSamples # nchannels, nprofiles, nsamples | |
@@ -1306,7 +1314,9 class SSheightProfiles(Operation): | |||||
1306 | self.isConfig = True |
|
1314 | self.isConfig = True | |
1307 |
|
1315 | |||
1308 | for i in range(self.buffer.shape[1]): |
|
1316 | for i in range(self.buffer.shape[1]): | |
1309 | self.buffer[:,i] = numpy.flip(dataOut.data[:,i*self.step:i*self.step + self.nsamples]) |
|
1317 | #self.buffer[:,i] = numpy.flip(dataOut.data[:,i*self.step:i*self.step + self.nsamples]) | |
|
1318 | self.buffer[:,i] = dataOut.data[:,i*self.step:i*self.step + self.nsamples] | |||
|
1319 | ||||
1310 | #self.buffer[:,j,self.__nHeis-j*self.step - self.nheights:self.__nHeis-j*self.step] = numpy.flip(dataOut.data[:,j*self.step:j*self.step + self.nheights]) |
|
1320 | #self.buffer[:,j,self.__nHeis-j*self.step - self.nheights:self.__nHeis-j*self.step] = numpy.flip(dataOut.data[:,j*self.step:j*self.step + self.nheights]) | |
1311 |
|
1321 | |||
1312 | for j in range(self.buffer.shape[0]): |
|
1322 | for j in range(self.buffer.shape[0]): |
General Comments 0
You need to be logged in to leave comments.
Login now