mdfinfo3 module documentation

Measured Data Format blocks parser for version 3.x

Created on Thu Dec 9 12:57:28 2014

Platform and python version

With Unix and Windows for python 2.6+ and 3.2+

Author:Aymeric Rateau

Dependencies

Attributes

PythonVersion : float
Python version currently running, needed for compatibility of both python 2.6+ and 3.2+

mdfinfo3 module

class mdfreader.mdfinfo3.info3() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

Bases: dict

Methods

cleanDGinfo(dg) delete CN,CC and CG blocks related to data group
clear()
copy()
fromkeys($type, iterable[, value]) Returns a new dict with keys from iterable and values equal to value.
get(k[,d])
items()
keys()
listChannels3([fileName, fid]) reads data, channel group and channel blocks to list channel names
pop(k[,d]) If key is not found, d is returned if given, otherwise KeyError is raised
popitem() 2-tuple; but raise KeyError if D is empty.
readCGBlock(fid, dg[, minimal]) read all CG blocks and relying CN & CC
readinfo3(fid[, minimal]) read all file blocks except data
setdefault(k[,d])
update([E, ]**F) If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
values()
cleanDGinfo(dg)

delete CN,CC and CG blocks related to data group

Parameters:

dg : int

data group number

fid
fileName
filterChannelNames
listChannels3(fileName=None, fid=None)

reads data, channel group and channel blocks to list channel names

Returns:list of channel names

Attributes

fileName (str) file name
readCGBlock(fid, dg, minimal=0)

read all CG blocks and relying CN & CC

Parameters:

fid : float

file identifier

dg : int

datagroup number

channelSet : set

set of channel names to read

minimal : int

0 will load every metadata 1 will load DG, CG, CN and CC 2 will load only DG

readinfo3(fid, minimal=0)

read all file blocks except data

Parameters:

fid : float

file identifier

minimal : int

0 will load every metadata 1 will load DG, CG, CN and CC 2 will load only DG

mdfreader.mdfinfo3.read_cc_block(fid, pointer)

channel conversion block reading

mdfreader.mdfinfo3.read_ce_block(fid, pointer)

reads source block

mdfreader.mdfinfo3.read_cg_block(fid, pointer)

channel block reading

mdfreader.mdfinfo3.read_cn_block(fid, pointer)

channel block reading

mdfreader.mdfinfo3.read_dg_block(fid, pointer)

data group block reading

mdfreader.mdfinfo3.read_hd_block(fid, pointer, version=0)

header block reading

mdfreader.mdfinfo3.read_tx_block(fid, pointer)

reads text block