##// END OF EJS Templates
Bug fix in Reading Unit
Julio Valdez -
r821:375dfaaf810f
parent child
Show More
@@ -406,12 +406,10 class HDF5Reader(ProcessingUnit):
406 blocksPerFile = self.blocksPerFile
406 blocksPerFile = self.blocksPerFile
407
407
408 #Depending on what mode the data was stored
408 #Depending on what mode the data was stored
409 # if mode == 0: #Divided in channels
409 if mode == 0: #Divided in channels
410 # strds = 'channel'
410 arrayData = dataset.value.astype(numpy.float)[0][blockList]
411 # nDatas = nDim2
412 # newShapes = (blocksPerFile,nDim1,nDim0)
413 if mode == 1: #Divided in parameter
411 if mode == 1: #Divided in parameter
414 strds = 'param'
412 strds = 'table'
415 nDatas = nDim1
413 nDatas = nDim1
416 newShapes = (blocksPerFile,nDim2,nDim0)
414 newShapes = (blocksPerFile,nDim2,nDim0)
417 elif mode==2: #Concatenated in a table
415 elif mode==2: #Concatenated in a table
@@ -428,7 +426,7 class HDF5Reader(ProcessingUnit):
428 return arrayData
426 return arrayData
429
427
430 #------- One dimension ---------------
428 #------- One dimension ---------------
431 if nDims == 1:
429 if nDims == 0:
432 arrayData = dataset.value.astype(numpy.float)[0][blockList]
430 arrayData = dataset.value.astype(numpy.float)[0][blockList]
433
431
434 #------- Two dimensions -----------
432 #------- Two dimensions -----------
@@ -476,6 +474,8 class HDF5Reader(ProcessingUnit):
476 setattr(self.dataOut,listDataname[j],listData[j][blockIndex])
474 setattr(self.dataOut,listDataname[j],listData[j][blockIndex])
477 elif nShapes > 1:
475 elif nShapes > 1:
478 setattr(self.dataOut,listDataname[j],listData[j][blockIndex,:])
476 setattr(self.dataOut,listDataname[j],listData[j][blockIndex,:])
477 elif mode==0:
478 setattr(self.dataOut,listDataname[j],listData[j][blockIndex])
479 #Mode Meteors
479 #Mode Meteors
480 elif mode ==2:
480 elif mode ==2:
481 selectedData = self.__selectDataMode2(listData[j], blockIndex)
481 selectedData = self.__selectDataMode2(listData[j], blockIndex)
General Comments 0
You need to be logged in to leave comments. Login now