From b96fedac05b4cd3cbe6dd4e028c2001ce95e5a64 Mon Sep 17 00:00:00 2001 From: dennissheberla Date: Tue, 4 Aug 2015 12:32:48 -0400 Subject: [PATCH 1/3] Improved compatibility with .mpt files Fixes bugs in reading new fields and non-ascii chars in .mpt files --- galvani/BioLogic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galvani/BioLogic.py b/galvani/BioLogic.py index 4143fb2..c6a3dbd 100644 --- a/galvani/BioLogic.py +++ b/galvani/BioLogic.py @@ -38,7 +38,7 @@ def fieldname_to_dtype(fieldname): return (fieldname, np.float_) # N.B. I'm not sure what 'Ns' is as in the only file I have with that # header it never has any value other than '0' - elif fieldname in ("cycle number", "I Range", "Ns"): + elif fieldname in ("cycle number", "I Range", "Ns", "half cycle"): return (fieldname, np.int_) elif fieldname in ("dq/mA.h", "dQ/mA.h"): return ("dQ/mA.h", np.float_) From 9109285b58260bc87d9f0cecd2220221bf4c4ed5 Mon Sep 17 00:00:00 2001 From: dennissheberla Date: Thu, 6 Aug 2015 12:57:47 -0400 Subject: [PATCH 2/3] Improved compatibility with new .mpr files Temporary removed mpr file LOG MODULE support --- galvani/BioLogic.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/galvani/BioLogic.py b/galvani/BioLogic.py index c6a3dbd..946f3cb 100644 --- a/galvani/BioLogic.py +++ b/galvani/BioLogic.py @@ -36,8 +36,6 @@ def fieldname_to_dtype(fieldname): "|Ewe|/V", "|I|/A", "Phase(Z)/deg", "|Z|/Ohm", "Re(Z)/Ohm", "-Im(Z)/Ohm"): return (fieldname, np.float_) - # N.B. I'm not sure what 'Ns' is as in the only file I have with that - # header it never has any value other than '0' elif fieldname in ("cycle number", "I Range", "Ns", "half cycle"): return (fieldname, np.int_) elif fieldname in ("dq/mA.h", "dQ/mA.h"): @@ -167,10 +165,6 @@ def VMPdata_dtype_from_colIDs(colIDs): flags_dict['counter inc.'] = (np.uint8(0x80), np.bool_) else: raise NotImplementedError("flag %d not implemented" % colID) - elif colID in (131,): - dtype_dict['flags2'] = ' Date: Sun, 13 Dec 2015 13:06:34 -0500 Subject: [PATCH 3/3] Improved compatibility with .mpr files Added new ColD #9 'Ece/V' --- galvani/BioLogic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/galvani/BioLogic.py b/galvani/BioLogic.py index 946f3cb..e5bdb17 100644 --- a/galvani/BioLogic.py +++ b/galvani/BioLogic.py @@ -178,6 +178,8 @@ def VMPdata_dtype_from_colIDs(colIDs): # 76 is , 8 is either I or ?? elif colID in (8, 76): dtype_dict['I/mA'] = '