@@ -390,8 +390,10 class HDFWriter(Operation): | |||||
390 | dsDict['nDim'] = 0 |
|
390 | dsDict['nDim'] = 0 | |
391 | else: |
|
391 | else: | |
392 | if uniqueChannel: #Creates extra dimension to avoid the creation of multiple channels |
|
392 | if uniqueChannel: #Creates extra dimension to avoid the creation of multiple channels | |
393 | dataAux = numpy.expand_dims(dataAux, axis=0) |
|
393 | #dataAux = numpy.expand_dims(dataAux, axis=0) | |
394 |
|
394 | setattr(self.dataOut, self.dataList[i], numpy.expand_dims(getattr(self.dataOut, self.dataList[i]), axis=0)) | ||
|
395 | dataAux = getattr(self.dataOut, self.dataList[i]) | |||
|
396 | #print(getattr(self.dataOut, self.dataList[i])) | |||
395 | dsDict['nDim'] = len(dataAux.shape) |
|
397 | dsDict['nDim'] = len(dataAux.shape) | |
396 | dsDict['shape'] = dataAux.shape |
|
398 | dsDict['shape'] = dataAux.shape | |
397 | dsDict['dsNumber'] = dataAux.shape[0] |
|
399 | dsDict['dsNumber'] = dataAux.shape[0] | |
@@ -588,10 +590,6 class HDFWriter(Operation): | |||||
588 | dtsets.append(ds) |
|
590 | dtsets.append(ds) | |
589 | data.append((dsInfo['variable'], i)) |
|
591 | data.append((dsInfo['variable'], i)) | |
590 |
|
592 | |||
591 | if self.uniqueChannel: #Deletes extra dimension created to avoid the creation of multiple channels |
|
|||
592 | dataAux = getattr(self.dataOut, dsInfo['variable']) |
|
|||
593 | dataAux = dataAux[0] |
|
|||
594 |
|
||||
595 | fp.flush() |
|
593 | fp.flush() | |
596 |
|
594 | |||
597 | log.log('Creating file: {}'.format(fp.filename), self.name) |
|
595 | log.log('Creating file: {}'.format(fp.filename), self.name) | |
@@ -614,6 +612,8 class HDFWriter(Operation): | |||||
614 | ds[self.blockIndex] = getattr(self.dataOut, attr) |
|
612 | ds[self.blockIndex] = getattr(self.dataOut, attr) | |
615 | else: |
|
613 | else: | |
616 | ds[self.blockIndex] = getattr(self.dataOut, attr)[ch] |
|
614 | ds[self.blockIndex] = getattr(self.dataOut, attr)[ch] | |
|
615 | if self.uniqueChannel: #Deletes extra dimension created to avoid the creation of multiple channels | |||
|
616 | setattr(self.dataOut, attr, getattr(self.dataOut, attr)[0]) | |||
617 |
|
617 | |||
618 | self.fp.flush() |
|
618 | self.fp.flush() | |
619 | self.blockIndex += 1 |
|
619 | self.blockIndex += 1 |
General Comments 0
You need to be logged in to leave comments.
Login now