##// END OF EJS Templates
All ISR CombineChannels
Christianpl -
r1797:2540e7469321 isr
parent child
Show More
@@ -164,6 +164,41 class selectChannels(Operation):
164
164
165 return
165 return
166
166
167 class CombineChannels(Operation):
168 '''Digital hybrid implementation'''
169
170 def run(self, dataout, sum_list=[], sub_list=[]):
171 '''
172 Input:
173 sum_list : list of pairs [[0,2],[1,3]]
174 sub_list : list of pairs [[2,4],[6,8]]
175 '''
176 #print(dataout.data[0, :, :])
177 tmp = []
178
179 if sub_list:
180 for i, j in sub_list:
181 if dataout.flagDataAsBlock:
182 tmp.append( dataout.data[i, :, :] - dataout.data[j, :, :])
183 else:
184 tmp.append(dataout.data[i,:] - dataout.data[j,:,:])
185
186 if sum_list:
187 for i, j in sum_list:
188 if dataout.flagDataAsBlock:
189 tmp.append(dataout.data[i, :, :] + dataout.data[j, :, :])
190 #tmp.append(numpy.sum(dataout.data[i, :, :],dataout.data[j, :, :]))
191 else:
192 tmp.append(dataout.data[i,:] + dataout.data[j,:,:])
193
194
195
196
197 dataout.data = numpy.array(tmp)
198 dataout.channelList = range(len(tmp))
199
200 return dataout
201
167 class selectHeights(Operation):
202 class selectHeights(Operation):
168
203
169 def run(self, dataOut, minHei=None, maxHei=None, minIndex=None, maxIndex=None):
204 def run(self, dataOut, minHei=None, maxHei=None, minIndex=None, maxIndex=None):
General Comments 0
You need to be logged in to leave comments. Login now