@@ -395,7 +395,15 class WeatherPlot(Plot): | |||
|
395 | 395 | |
|
396 | 396 | data = {} |
|
397 | 397 | meta = {} |
|
398 | data['weather'] = 10*numpy.log10(dataOut.data_360[0]/(250.0)) | |
|
398 | if hasattr(dataOut, 'dataPP_POWER'): | |
|
399 | factor = 1 | |
|
400 | ||
|
401 | if hasattr(dataOut, 'nFFTPoints'): | |
|
402 | factor = dataOut.normFactor | |
|
403 | ||
|
404 | print("factor",factor) | |
|
405 | data['weather'] = 10*numpy.log10(dataOut.data_360[0]/(factor)) | |
|
406 | print("weather",data['weather']) | |
|
399 | 407 | data['azi'] = dataOut.data_azi |
|
400 | 408 | return data, meta |
|
401 | 409 | |
@@ -498,7 +506,7 class WeatherPlot(Plot): | |||
|
498 | 506 | cgax, pm = wrl.vis.plot_ppi(self.res_weather,r=r,az=self.res_azi,fig=self.figures[0], proj='cg', vmin=1, vmax=60) |
|
499 | 507 | else: |
|
500 | 508 | plt.clf() |
|
501 |
cgax, pm = wrl.vis.plot_ppi(self.res_weather,r=r,az=self.res_azi,fig=self.figures[0], proj='cg', vmin= |
|
|
509 | cgax, pm = wrl.vis.plot_ppi(self.res_weather,r=r,az=self.res_azi,fig=self.figures[0], proj='cg', vmin=1, vmax=60) | |
|
502 | 510 | caax = cgax.parasites[0] |
|
503 | 511 | paax = cgax.parasites[1] |
|
504 | 512 | cbar = plt.gcf().colorbar(pm, pad=0.075) |
@@ -1286,7 +1286,6 class SpectralMoments(Operation): | |||
|
1286 | 1286 | vec_snr = numpy.zeros(oldspec.shape[1]) |
|
1287 | 1287 | |
|
1288 | 1288 | # oldspec = numpy.ma.masked_invalid(oldspec) |
|
1289 | ||
|
1290 | 1289 | for ind in range(oldspec.shape[1]): |
|
1291 | 1290 | |
|
1292 | 1291 | spec = oldspec[:,ind] |
@@ -1325,7 +1324,7 class SpectralMoments(Operation): | |||
|
1325 | 1324 | ss1 = m |
|
1326 | 1325 | |
|
1327 | 1326 | valid = numpy.arange(int(m + bb0 - ss1 + 1)) + ss1 |
|
1328 | ||
|
1327 | #valid = numpy.arange(1,oldspec.shape[0])# valid perfil completo igual pulsepair | |
|
1329 | 1328 | signal_power = ((spec2[valid] - n0) * fwindow[valid]).mean() # D. Scipión added with correct definition |
|
1330 | 1329 | total_power = (spec2[valid] * fwindow[valid]).mean() # D. Scipión added with correct definition |
|
1331 | 1330 | power = ((spec2[valid] - n0) * fwindow[valid]).sum() |
@@ -4099,7 +4098,7 class PedestalInformation(Operation): | |||
|
4099 | 4098 | #print(len(self.list_adq)) |
|
4100 | 4099 | utc_ped_list=[] |
|
4101 | 4100 | for i in range(len(self.list_pedestal)): |
|
4102 | print(i) | |
|
4101 | #print(i)# OJO IDENTIFICADOR DE SINCRONISMO | |
|
4103 | 4102 | utc_ped_list.append(self.gettimeutcfromDirFilename(path=self.path_ped,file=self.list_pedestal[i])) |
|
4104 | 4103 | |
|
4105 | 4104 | #utc_ped_list= utc_ped_list |
@@ -4384,7 +4383,7 class Block360(Operation): | |||
|
4384 | 4383 | #print("line 4049",data.dataPP_POW.shape,data.dataPP_POW[:10]) |
|
4385 | 4384 | #print("line 4049",data.azimuth.shape,data.azimuth) |
|
4386 | 4385 | if self.mode==0: |
|
4387 | self.__buffer[:,self.__profIndex,:]= data.dataPP_POW | |
|
4386 | self.__buffer[:,self.__profIndex,:]= data.dataPP_POWER# PRIMER MOMENTO | |
|
4388 | 4387 | if self.mode==1: |
|
4389 | 4388 | self.__buffer[:,self.__profIndex,:]= data.data_pow |
|
4390 | 4389 | #print("me casi",self.index,data.azimuth[self.index]) |
@@ -118,7 +118,7 class SpectraProc(ProcessingUnit): | |||
|
118 | 118 | self.dataOut.flagShiftFFT = False |
|
119 | 119 | |
|
120 | 120 | def run(self, nProfiles=None, nFFTPoints=None, pairsList=None, ippFactor=None, shift_fft=False): |
|
121 | ||
|
121 | ||
|
122 | 122 | if self.dataIn.type == "Spectra": |
|
123 | 123 | self.dataOut.copy(self.dataIn) |
|
124 | 124 | if shift_fft: |
@@ -144,7 +144,7 class SpectraProc(ProcessingUnit): | |||
|
144 | 144 | |
|
145 | 145 | if ippFactor == None: |
|
146 | 146 | self.dataOut.ippFactor = 1 |
|
147 | ||
|
147 | ||
|
148 | 148 | self.dataOut.nFFTPoints = nFFTPoints |
|
149 | 149 | |
|
150 | 150 | if self.buffer is None: |
@@ -214,13 +214,13 class SpectraProc(ProcessingUnit): | |||
|
214 | 214 | self.dataOut.pairsList = pairs |
|
215 | 215 | |
|
216 | 216 | return |
|
217 | ||
|
217 | ||
|
218 | 218 | def selectFFTs(self, minFFT, maxFFT ): |
|
219 | 219 | """ |
|
220 |
Selecciona un bloque de datos en base a un grupo de valores de puntos FFTs segun el rango |
|
|
220 | Selecciona un bloque de datos en base a un grupo de valores de puntos FFTs segun el rango | |
|
221 | 221 | minFFT<= FFT <= maxFFT |
|
222 | 222 | """ |
|
223 | ||
|
223 | ||
|
224 | 224 | if (minFFT > maxFFT): |
|
225 | 225 | raise ValueError("Error selecting heights: Height range (%d,%d) is not valid" % (minFFT, maxFFT)) |
|
226 | 226 | |
@@ -250,7 +250,7 class SpectraProc(ProcessingUnit): | |||
|
250 | 250 | self.selectFFTsByIndex(minIndex, maxIndex) |
|
251 | 251 | |
|
252 | 252 | return 1 |
|
253 | ||
|
253 | ||
|
254 | 254 | def getBeaconSignal(self, tauindex=0, channelindex=0, hei_ref=None): |
|
255 | 255 | newheis = numpy.where( |
|
256 | 256 | self.dataOut.heightList > self.dataOut.radarControllerHeaderObj.Taus[tauindex]) |
@@ -295,7 +295,7 class SpectraProc(ProcessingUnit): | |||
|
295 | 295 | |
|
296 | 296 | def selectFFTsByIndex(self, minIndex, maxIndex): |
|
297 | 297 | """ |
|
298 | ||
|
298 | ||
|
299 | 299 | """ |
|
300 | 300 | |
|
301 | 301 | if (minIndex < 0) or (minIndex > maxIndex): |
@@ -318,7 +318,7 class SpectraProc(ProcessingUnit): | |||
|
318 | 318 | self.dataOut.data_spc = data_spc |
|
319 | 319 | self.dataOut.data_cspc = data_cspc |
|
320 | 320 | self.dataOut.data_dc = data_dc |
|
321 | ||
|
321 | ||
|
322 | 322 | self.dataOut.ippSeconds = self.dataOut.ippSeconds*(self.dataOut.nFFTPoints / numpy.shape(data_cspc)[1]) |
|
323 | 323 | self.dataOut.nFFTPoints = numpy.shape(data_cspc)[1] |
|
324 | 324 | self.dataOut.profilesPerBlock = numpy.shape(data_cspc)[1] |
@@ -457,7 +457,7 class removeDC(Operation): | |||
|
457 | 457 | xx_inv = numpy.linalg.inv(xx) |
|
458 | 458 | xx_aux = xx_inv[0, :] |
|
459 | 459 | |
|
460 |
for ich in range(num_chan): |
|
|
460 | for ich in range(num_chan): | |
|
461 | 461 | yy = jspectra[ich, ind_vel, :] |
|
462 | 462 | jspectra[ich, freq_dc, :] = numpy.dot(xx_aux, yy) |
|
463 | 463 | |
@@ -481,12 +481,12 class removeDC(Operation): | |||
|
481 | 481 | class removeInterference(Operation): |
|
482 | 482 | |
|
483 | 483 | def removeInterference2(self): |
|
484 | ||
|
484 | ||
|
485 | 485 | cspc = self.dataOut.data_cspc |
|
486 | 486 | spc = self.dataOut.data_spc |
|
487 |
Heights = numpy.arange(cspc.shape[2]) |
|
|
487 | Heights = numpy.arange(cspc.shape[2]) | |
|
488 | 488 | realCspc = numpy.abs(cspc) |
|
489 | ||
|
489 | ||
|
490 | 490 | for i in range(cspc.shape[0]): |
|
491 | 491 | LinePower= numpy.sum(realCspc[i], axis=0) |
|
492 | 492 | Threshold = numpy.amax(LinePower)-numpy.sort(LinePower)[len(Heights)-int(len(Heights)*0.1)] |
@@ -494,15 +494,15 class removeInterference(Operation): | |||
|
494 | 494 | InterferenceSum = numpy.sum( realCspc[i,:,SelectedHeights], axis=0 ) |
|
495 | 495 | InterferenceThresholdMin = numpy.sort(InterferenceSum)[int(len(InterferenceSum)*0.98)] |
|
496 | 496 | InterferenceThresholdMax = numpy.sort(InterferenceSum)[int(len(InterferenceSum)*0.99)] |
|
497 | ||
|
498 | ||
|
497 | ||
|
498 | ||
|
499 | 499 | InterferenceRange = numpy.where( ([InterferenceSum > InterferenceThresholdMin]))# , InterferenceSum < InterferenceThresholdMax]) ) |
|
500 | 500 | #InterferenceRange = numpy.where( ([InterferenceRange < InterferenceThresholdMax])) |
|
501 | 501 | if len(InterferenceRange)<int(cspc.shape[1]*0.3): |
|
502 | 502 | cspc[i,InterferenceRange,:] = numpy.NaN |
|
503 | ||
|
503 | ||
|
504 | 504 | self.dataOut.data_cspc = cspc |
|
505 | ||
|
505 | ||
|
506 | 506 | def removeInterference(self, interf = 2, hei_interf = None, nhei_interf = None, offhei_interf = None): |
|
507 | 507 | |
|
508 | 508 | jspectra = self.dataOut.data_spc |
@@ -751,7 +751,7 class IncohInt(Operation): | |||
|
751 | 751 | if n is not None: |
|
752 | 752 | self.n = int(n) |
|
753 | 753 | else: |
|
754 | ||
|
754 | ||
|
755 | 755 | self.__integrationtime = int(timeInterval) |
|
756 | 756 | self.n = None |
|
757 | 757 | self.__byTime = True |
@@ -852,7 +852,7 class IncohInt(Operation): | |||
|
852 | 852 | def run(self, dataOut, n=None, timeInterval=None, overlapping=False): |
|
853 | 853 | if n == 1: |
|
854 | 854 | return dataOut |
|
855 | ||
|
855 | ||
|
856 | 856 | dataOut.flagNoData = True |
|
857 | 857 | |
|
858 | 858 | if not self.isConfig: |
@@ -868,7 +868,7 class IncohInt(Operation): | |||
|
868 | 868 | |
|
869 | 869 | dataOut.data_spc = avgdata_spc |
|
870 | 870 | dataOut.data_cspc = avgdata_cspc |
|
871 |
dataOut.data_dc = avgdata_dc |
|
|
871 | dataOut.data_dc = avgdata_dc | |
|
872 | 872 | dataOut.nIncohInt *= self.n |
|
873 | 873 | dataOut.utctime = avgdatatime |
|
874 | 874 | dataOut.flagNoData = False |
@@ -876,10 +876,10 class IncohInt(Operation): | |||
|
876 | 876 | return dataOut |
|
877 | 877 | |
|
878 | 878 | class dopplerFlip(Operation): |
|
879 | ||
|
879 | ||
|
880 | 880 | def run(self, dataOut): |
|
881 | 881 | # arreglo 1: (num_chan, num_profiles, num_heights) |
|
882 |
self.dataOut = dataOut |
|
|
882 | self.dataOut = dataOut | |
|
883 | 883 | # JULIA-oblicua, indice 2 |
|
884 | 884 | # arreglo 2: (num_profiles, num_heights) |
|
885 | 885 | jspectra = self.dataOut.data_spc[2] |
@@ -895,4 +895,4 class dopplerFlip(Operation): | |||
|
895 | 895 | # canal modificado es re-escrito en el arreglo de canales |
|
896 | 896 | self.dataOut.data_spc[2] = jspectra_tmp |
|
897 | 897 | |
|
898 | return self.dataOut No newline at end of file | |
|
898 | return self.dataOut |
@@ -29,11 +29,11 mode = 1 | |||
|
29 | 29 | #path = '/DATA_RM/TEST_19OCTUBRE/10MHZ' |
|
30 | 30 | path = '/DATA_RM/WR_20_OCT' |
|
31 | 31 | #### path_ped='/DATA_RM/TEST_PEDESTAL/P20211012-082745' |
|
32 |
#### |
|
|
32 | ####path_ped='/DATA_RM/TEST_PEDESTAL/P20211019-192244' | |
|
33 | 33 | figpath_pp = "/home/soporte/Pictures/TEST_PP" |
|
34 | 34 | figpath_spec = "/home/soporte/Pictures/TEST_MOM" |
|
35 |
plot = |
|
|
36 |
integration = |
|
|
35 | plot = 0 | |
|
36 | integration = 1 | |
|
37 | 37 | save = 0 |
|
38 | 38 | if save == 1: |
|
39 | 39 | if mode==0: |
@@ -69,7 +69,7 if save ==1: | |||
|
69 | 69 | |
|
70 | 70 | print("* Integracion de datos :",integration) |
|
71 | 71 | |
|
72 |
time.sleep( |
|
|
72 | time.sleep(5) | |
|
73 | 73 | #remotefolder = "/home/wmaster/graficos" |
|
74 | 74 | ####################################################################### |
|
75 | 75 | ################# RANGO DE PLOTEO###################################### |
@@ -209,7 +209,7 else: | |||
|
209 | 209 | opObj11.addParameter(name='online', value='0', format='int') |
|
210 | 210 | |
|
211 | 211 | opObj11 = procUnitConfObjC.addOperation(name='Block360') |
|
212 |
opObj11.addParameter(name='n', value=' |
|
|
212 | opObj11.addParameter(name='n', value='10', format='int') | |
|
213 | 213 | opObj11.addParameter(name='mode', value=mode, format='int') |
|
214 | 214 | |
|
215 | 215 | # este bloque funciona bien con divisores de 360 no olvidar 0 10 20 30 40 60 90 120 180 |
General Comments 0
You need to be logged in to leave comments.
Login now