@@ -1278,6 +1278,52 class IncohInt(Operation): | |||||
1278 | dataOut.timeInterval = self.__timeInterval*self.n |
|
1278 | dataOut.timeInterval = self.__timeInterval*self.n | |
1279 | dataOut.flagNoData = False |
|
1279 | dataOut.flagNoData = False | |
1280 |
|
1280 | |||
|
1281 | class ProfileConcat(Operation): | |||
|
1282 | ||||
|
1283 | __isConfig = False | |||
|
1284 | buffer = None | |||
|
1285 | ||||
|
1286 | def __init__(self): | |||
|
1287 | ||||
|
1288 | self.profileIndex = 0 | |||
|
1289 | ||||
|
1290 | def reset(self): | |||
|
1291 | self.buffer = numpy.zeros_like(self.buffer) | |||
|
1292 | self.start_index = 0 | |||
|
1293 | self.times = 1 | |||
|
1294 | ||||
|
1295 | def setup(self, data, m, n=1): | |||
|
1296 | self.buffer = numpy.zeros((data.shape[0],data.shape[1]*m),dtype=type(data[0,0])) | |||
|
1297 | self.profiles = data.shape[1] | |||
|
1298 | self.start_index = 0 | |||
|
1299 | self.times = 1 | |||
|
1300 | ||||
|
1301 | def concat(self, data): | |||
|
1302 | ||||
|
1303 | self.buffer[:,self.start_index:self.profiles*self.times] = data.copy() | |||
|
1304 | self.start_index = self.start_index + self.profiles | |||
|
1305 | ||||
|
1306 | def run(self, dataOut, m): | |||
|
1307 | ||||
|
1308 | dataOut.flagNoData = True | |||
|
1309 | ||||
|
1310 | if not self.__isConfig: | |||
|
1311 | self.setup(dataOut.data, m, 1) | |||
|
1312 | self.__isConfig = True | |||
|
1313 | ||||
|
1314 | self.concat(dataOut.data) | |||
|
1315 | self.times += 1 | |||
|
1316 | if self.times > m: | |||
|
1317 | dataOut.data = self.buffer | |||
|
1318 | self.reset() | |||
|
1319 | dataOut.flagNoData = False | |||
|
1320 | # se deben actualizar mas propiedades del header y del objeto dataOut, por ejemplo, las alturas | |||
|
1321 | deltaHeight = dataOut.heightList[1] - dataOut.heightList[0] | |||
|
1322 | xf = dataOut.heightList[0] + dataOut.nHeights * deltaHeight * 5 | |||
|
1323 | dataOut.heightList = numpy.arange(dataOut.heightList[0], xf, deltaHeight) | |||
|
1324 | ||||
|
1325 | ||||
|
1326 | ||||
1281 | class ProfileSelector(Operation): |
|
1327 | class ProfileSelector(Operation): | |
1282 |
|
1328 | |||
1283 | profileIndex = None |
|
1329 | profileIndex = None |
General Comments 0
You need to be logged in to leave comments.
Login now