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