@@ -440,7 +440,7 class HDFWriter(Operation): | |||||
440 |
|
440 | |||
441 | if dataAux is None: |
|
441 | if dataAux is None: | |
442 | continue |
|
442 | continue | |
443 | elif isinstance(dataAux, (int, float, numpy.integer, numpy.float)): |
|
443 | elif isinstance(dataAux, (int, float, numpy.integer, numpy.float_)): | |
444 | dsDict['nDim'] = 0 |
|
444 | dsDict['nDim'] = 0 | |
445 | else: |
|
445 | else: | |
446 | dsDict['nDim'] = len(dataAux.shape) |
|
446 | dsDict['nDim'] = len(dataAux.shape) |
@@ -4079,11 +4079,11 class WeatherRadar(Operation): | |||||
4079 |
|
4079 | |||
4080 | for i in range(len(self.variableList)): |
|
4080 | for i in range(len(self.variableList)): | |
4081 | if self.variableList[i] == 'Z': |
|
4081 | if self.variableList[i] == 'Z': | |
4082 | dataOut.data_param[:,4,:] =self.getReflectividad_D(dataOut=dataOut,type='N') |
|
4082 | dataOut.data_param[:,4,:] = self.getReflectividad_D(dataOut=dataOut,type='N') | |
4083 | if self.variableList[i] == 'D' and dataOut.nChannels>1: |
|
4083 | if self.variableList[i] == 'D' and dataOut.nChannels>1: | |
4084 | dataOut.data_param[:,5,:] =self.getReflectividad_D(dataOut=dataOut,type='D') |
|
4084 | dataOut.data_param[:,5,:] = self.getReflectividad_D(dataOut=dataOut,type='D') | |
4085 | if self.variableList[i] == 'P' and dataOut.nChannels>1: |
|
4085 | if self.variableList[i] == 'P' and dataOut.nChannels>1: | |
4086 | dataOut.data_param[:,6,:] =self.getFasediferencialPhiD_P(dataOut=dataOut, phase=True) |
|
4086 | dataOut.data_param[:,6,:] = self.getFasediferencialPhiD_P(dataOut=dataOut, phase=True) | |
4087 | if self.variableList[i] == 'R' and dataOut.nChannels>1: |
|
4087 | if self.variableList[i] == 'R' and dataOut.nChannels>1: | |
4088 | dataOut.data_param[:,7,:] = self.getCoeficienteCorrelacionROhv_R(dataOut) |
|
4088 | dataOut.data_param[:,7,:] = self.getCoeficienteCorrelacionROhv_R(dataOut) | |
4089 |
|
4089 | |||
@@ -4422,7 +4422,7 class MergeProc(ProcessingUnit): | |||||
4422 | def __init__(self): |
|
4422 | def __init__(self): | |
4423 | ProcessingUnit.__init__(self) |
|
4423 | ProcessingUnit.__init__(self) | |
4424 |
|
4424 | |||
4425 | def run(self, attr_data, mode=0): |
|
4425 | def run(self, attr_data, mode=0, index=0): | |
4426 |
|
4426 | |||
4427 | #exit(1) |
|
4427 | #exit(1) | |
4428 | self.dataOut = getattr(self, self.inputs[0]) |
|
4428 | self.dataOut = getattr(self, self.inputs[0]) | |
@@ -4473,30 +4473,25 class MergeProc(ProcessingUnit): | |||||
4473 | self.dataOut.NSCAN = 128 |
|
4473 | self.dataOut.NSCAN = 128 | |
4474 | #print(numpy.shape(self.dataOut.data_spc)) |
|
4474 | #print(numpy.shape(self.dataOut.data_spc)) | |
4475 |
|
4475 | |||
4476 | #exit(1) |
|
|||
4477 |
|
||||
4478 | if mode==2: #HAE 2022 |
|
4476 | if mode==2: #HAE 2022 | |
4479 | data = numpy.sum([getattr(data, attr_data) for data in data_inputs],axis=0) |
|
4477 | data = numpy.sum([getattr(data, attr_data) for data in data_inputs],axis=0) | |
4480 | setattr(self.dataOut, attr_data, data) |
|
4478 | setattr(self.dataOut, attr_data, data) | |
4481 |
|
4479 | |||
4482 | self.dataOut.nIncohInt *= 2 |
|
4480 | self.dataOut.nIncohInt *= 2 | |
4483 | #meta = self.dataOut.getFreqRange(1)/1000. |
|
|||
4484 | self.dataOut.freqRange = self.dataOut.getFreqRange(1)/1000. |
|
4481 | self.dataOut.freqRange = self.dataOut.getFreqRange(1)/1000. | |
4485 |
|
4482 | |||
4486 | #exit(1) |
|
|||
4487 |
|
||||
4488 | if mode==7: #RM |
|
4483 | if mode==7: #RM | |
4489 |
|
4484 | |||
4490 | f = [getattr(data, attr_data) for data in data_inputs][0] |
|
4485 | f = [getattr(data, attr_data) for data in data_inputs][0][:,:,:,0:index] | |
4491 | g = [getattr(data, attr_data) for data in data_inputs][1] |
|
4486 | g = [getattr(data, attr_data) for data in data_inputs][1][:,:,:,index:] | |
4492 | data = numpy.concatenate((f,g),axis=3) |
|
4487 | data = numpy.concatenate((f,g), axis=3) | |
4493 | setattr(self.dataOut, attr_data, data) |
|
4488 | setattr(self.dataOut, attr_data, data) | |
4494 |
|
4489 | |||
4495 | # snr |
|
4490 | # snr | |
4496 | # self.dataOut.data_snr = numpy.concatenate((data_inputs[0].data_snr, data_inputs[1].data_snr), axis=2) |
|
4491 | # self.dataOut.data_snr = numpy.concatenate((data_inputs[0].data_snr, data_inputs[1].data_snr), axis=2) | |
4497 |
|
4492 | |||
4498 | # ranges |
|
4493 | # ranges | |
4499 | dh = self.dataOut.heightList[1]-self.dataOut.heightList[0] |
|
4494 | # dh = self.dataOut.heightList[1]-self.dataOut.heightList[0] | |
4500 | heightList_2 = (self.dataOut.heightList[-1]+dh) + numpy.arange(g.shape[-1], dtype=numpy.float) * dh |
|
4495 | # heightList_2 = (self.dataOut.heightList[-1]+dh) + numpy.arange(g.shape[-1], dtype=numpy.float) * dh | |
4501 |
|
4496 | |||
4502 | self.dataOut.heightList = numpy.concatenate((self.dataOut.heightList,heightList_2)) |
|
4497 | # self.dataOut.heightList = numpy.concatenate((self.dataOut.heightList,heightList_2)) |
General Comments 0
You need to be logged in to leave comments.
Login now