diff --git a/mdf4reader.py b/mdf4reader.py index b3b3b3d..6a11b36 100644 --- a/mdf4reader.py +++ b/mdf4reader.py @@ -994,7 +994,6 @@ def read4( self, fileName=None, info = None, multiProc = False, channelList=None p.join() del Q # free memory - fid.close() # close file # After all processing of channels, # prepare final class data with all its keys for dataGroup in list(info['DGBlock'].keys()): @@ -1066,8 +1065,8 @@ def read4( self, fileName=None, info = None, multiProc = False, channelList=None self[name]['masterType']=info['CNBlock'][dataGroup][channelGroup][channel]['cn_sync_type'] if masterDataGroup: #master channel exist self.masterChannelList[masterDataGroup[dataGroup]].append(name) - - + + fid.close() # close file if convertAfterRead: self.convertAllChannel4() @@ -1379,13 +1378,19 @@ def convertChannelData4(channel, channelName, convert_tables, multiProc=False, Q ---------------- channelName : dict channel dict containing keys like 'data', 'unit', 'comment' and potentially 'conversion' dict + channelName : str + name of channel convert_tables : bool activates computation intensive loops for conversion with tables. Default is False + multiProc : bool, default False + flag to put data in multiprocess queue + Q : Queue class, default None + Queue used for multiprocessing Returns ----------- - numpy array - returns numpy array converted to physical values according to conversion type + dict + returns dict with channelName key containing numpy array converted to physical values according to conversion type """ vect = channel['data'] if 'conversion' in channel: # there is conversion property diff --git a/mdfreader.pdf b/mdfreader.pdf index 2324baf..8262f21 100644 Binary files a/mdfreader.pdf and b/mdfreader.pdf differ diff --git a/setup.py b/setup.py index 93b46e7..c083e96 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/development.html#single-sourcing-the-version - version='0.0.', + version='0.0.3', description='A Measured Data Format file parser', long_description=long_description,