Improved compatibility with .mpt files

Fixes bugs in reading new fields and non-ascii chars in .mpt files
This commit is contained in:
dennissheberla
2015-08-04 12:32:48 -04:00
committed by Chris Kerr
parent 3423fe7dc9
commit b96fedac05

View File

@@ -38,7 +38,7 @@ def fieldname_to_dtype(fieldname):
return (fieldname, np.float_) return (fieldname, np.float_)
# N.B. I'm not sure what 'Ns' is as in the only file I have with that # 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' # 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_) return (fieldname, np.int_)
elif fieldname in ("dq/mA.h", "dQ/mA.h"): elif fieldname in ("dq/mA.h", "dQ/mA.h"):
return ("dQ/mA.h", np.float_) return ("dQ/mA.h", np.float_)