@@ -103,6 +103,12 class ProfileToChannels(Operation): | |||||
103 | self.__counter_chan = 0 |
|
103 | self.__counter_chan = 0 | |
104 | self.buffer = None |
|
104 | self.buffer = None | |
105 |
|
105 | |||
|
106 | def isProfileInList(self, profileList): | |||
|
107 | ||||
|
108 | if self.profileIndex not in profileList: | |||
|
109 | return False | |||
|
110 | ||||
|
111 | return True | |||
106 |
|
112 | |||
107 | def run(self, dataOut): |
|
113 | def run(self, dataOut): | |
108 |
|
114 | |||
@@ -112,18 +118,17 class ProfileToChannels(Operation): | |||||
112 | nchannels = len(dataOut.beamRangeDict.keys()) |
|
118 | nchannels = len(dataOut.beamRangeDict.keys()) | |
113 | nsamples = dataOut.nHeights |
|
119 | nsamples = dataOut.nHeights | |
114 | self.buffer = numpy.zeros((nchannels, nsamples), dtype = 'complex128') |
|
120 | self.buffer = numpy.zeros((nchannels, nsamples), dtype = 'complex128') | |
|
121 | dataOut.beam.codeList = [dataOut.beamCodeDict[x][0] for x in range(nchannels)] | |||
|
122 | dataOut.beam.azimuthList = [dataOut.beamCodeDict[x][1] for x in range(nchannels)] | |||
|
123 | dataOut.beam.zenithList = [dataOut.beamCodeDict[x][2] for x in range(nchannels)] | |||
115 | self.__isConfig = True |
|
124 | self.__isConfig = True | |
116 |
|
125 | |||
117 | for i in range(self.buffer.shape[0]): |
|
126 | for i in range(self.buffer.shape[0]): | |
118 | if dataOut.profileIndex in dataOut.beamRangeDict[i]: |
|
127 | if dataOut.profileIndex in dataOut.beamRangeDict[i]: | |
119 | self.buffer[i,:] = dataOut.data |
|
128 | self.buffer[i,:] = dataOut.data | |
120 | if len(dataOut.beam.codeList) < self.buffer.shape[0]: |
|
|||
121 | beamInfo = dataOut.beamCodeDict[i] |
|
|||
122 | dataOut.beam.codeList.append(beamInfo[0]) |
|
|||
123 | dataOut.beam.azimuthList.append(beamInfo[1]) |
|
|||
124 | dataOut.beam.zenithList.append(beamInfo[2]) |
|
|||
125 | break |
|
129 | break | |
126 |
|
|
130 | ||
|
131 | ||||
127 | self.__counter_chan += 1 |
|
132 | self.__counter_chan += 1 | |
128 |
|
133 | |||
129 | if self.__counter_chan >= self.buffer.shape[0]: |
|
134 | if self.__counter_chan >= self.buffer.shape[0]: |
General Comments 0
You need to be logged in to leave comments.
Login now