@@ -318,6 +318,7 class ACFPlot(Figure): | |||
|
318 | 318 | |
|
319 | 319 | #z = numpy.where(numpy.isfinite(z), z, numpy.NAN) |
|
320 | 320 | shape = dataOut.data_acf.shape |
|
321 | print "shape_plot",shape | |
|
321 | 322 | hei_index = numpy.arange(shape[2]) |
|
322 | 323 | hei_plot = numpy.arange(nSamples)*resFactor |
|
323 | 324 | |
@@ -330,7 +331,7 class ACFPlot(Figure): | |||
|
330 | 331 | hei_plot = numpy.array(nSampleList)*resFactor |
|
331 | 332 | |
|
332 | 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 | 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 | 337 | #escalamiento -1 a 1 a resolucion (factor de resolucion en altura)* deltaHeight |
@@ -376,8 +377,8 class ACFPlot(Figure): | |||
|
376 | 377 | if ymin == None: ymin = numpy.nanmin(zdB) |
|
377 | 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 ("La cantidad de puntos en altura es %d y la nueva resolucion es % |
|
|
380 | print ("El parametro resFactor es %d y la resolucion en altura es %f"%(resFactor,deltaHeight )) | |
|
381 | print ("La cantidad de puntos en altura es %d y la nueva resolucion es %f Km"%(hei_plot.shape[0],deltaHeight*resFactor )) | |
|
381 | 382 | print ("La altura maxima es %d Km"%(hei_plot[-1]*deltaHeight )) |
|
382 | 383 | |
|
383 | 384 | self.isConfig = True |
@@ -151,23 +151,27 class SpectraAFCProc(ProcessingUnit): | |||
|
151 | 151 | shape = acf.shape # nchannels, nprofiles, nsamples |
|
152 | 152 | |
|
153 | 153 | #import matplotlib.pyplot as plt |
|
154 | #acf_tmp=acf[0,:,85] | |
|
154 | #print "test",acf.shape | |
|
155 | #acf_tmp=acf[0,:,] | |
|
155 | 156 | #plt.plot(acf_tmp) |
|
156 | 157 | #plt.show() |
|
158 | #import time | |
|
159 | #time.sleep(10) | |
|
157 | 160 | |
|
161 | for j in range(shape[0]): | |
|
158 | 162 | for i in range(shape[1]): |
|
159 |
|
|
|
163 | tmp = numpy.argmax(acf[j,:,i]) | |
|
160 | 164 |
|
|
161 |
|
|
|
162 |
|
|
|
163 |
|
|
|
164 |
|
|
|
165 |
|
|
|
166 |
|
|
|
165 | value = (acf[j,:,i][tmp+3]+acf[j,:,i][tmp+4])/2.0 | |
|
166 | acf[j,:,i][tmp] = value | |
|
167 | acf[j,:,i][tmp-1] = value | |
|
168 | acf[j,:,i][tmp+1] = value | |
|
169 | acf[j,:,i][tmp-2] = value | |
|
170 | acf[j,:,i][tmp+2] = value | |
|
167 | 171 | |
|
168 | 172 |
|
|
169 | 173 |
|
|
170 |
|
|
|
174 | #acf[3,:,i] = sp.signal.medfilt(acf[3,:,i],21) | |
|
171 | 175 | |
|
172 | 176 | |
|
173 | 177 |
@@ -1276,6 +1276,11 class SSheightProfiles(Operation): | |||
|
1276 | 1276 | self.__nProfiles = dataOut.nProfiles |
|
1277 | 1277 | self.__nHeis = dataOut.nHeights |
|
1278 | 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 | 1286 | residue = (shape[1] - self.nsamples) % self.step |
@@ -1286,7 +1291,10 class SSheightProfiles(Operation): | |||
|
1286 | 1291 | numberProfile = self.nsamples |
|
1287 | 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 | 1299 | self.bufferShape = shape[0], numberSamples, numberProfile # nchannels, nsamples , nprofiles |
|
1292 | 1300 | self.profileShape = shape[0], numberProfile, numberSamples # nchannels, nprofiles, nsamples |
@@ -1306,7 +1314,9 class SSheightProfiles(Operation): | |||
|
1306 | 1314 | self.isConfig = True |
|
1307 | 1315 | |
|
1308 | 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 | 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 | 1322 | for j in range(self.buffer.shape[0]): |
General Comments 0
You need to be logged in to leave comments.
Login now