Skip to content

Commit

Permalink
mdf4reader: solved a bug in attachment reading. Updated API documenta…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
aymeric.rateau@gmail.com committed Feb 13, 2015
1 parent 16a0712 commit 93ff26f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions mdf4reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()):
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down
Binary file modified mdfreader.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 93ff26f

Please sign in to comment.