diff --git a/BioLogic.py b/BioLogic.py index 5575a21..c211986 100644 --- a/BioLogic.py +++ b/BioLogic.py @@ -5,6 +5,7 @@ __all__ = ['MPTfileCSV', 'MPTfile'] import re import csv +from os import SEEK_SET, SEEK_CUR import numpy as np @@ -28,7 +29,7 @@ def fieldname_to_dtype(fieldname): return ("control/V/mA", np.float_) else: raise ValueError("Invalid column header: %s" % fieldname) - + def MPTfile(file_or_path): """Opens .mpt files as numpy record arrays @@ -119,3 +120,77 @@ def MPTfileCSV(file_or_path): raise ValueError("Unrecognised headers for MPT file format") return mpt_csv, comments + + +VMPmodule_hdr = np.dtype([('shortname', 'S10'), + ('longname', 'S25'), + ('length', '