Skip to content

Commit

Permalink
Merge branch 'master' into yuyu-step-time
Browse files Browse the repository at this point in the history
  • Loading branch information
chatcannon authored Nov 30, 2022
2 parents e1ff99a + e5a1b84 commit 1025923
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion galvani/BioLogic.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ def fieldname_to_dtype(fieldname):
elif fieldname in ("ox/red", "error", "control changes", "Ns changes",
"counter inc."):
return (fieldname, np.bool_)
elif fieldname in ("x", "control/V/mA", "Temperature/°C", "Efficiency/%"):
elif fieldname in ("time/s", "P/W", "(Q-Qo)/mA.h", "x", "control/V",
"control/mA", "control/V/mA", "(Q-Qo)/C", "dQ/C",
"freq/Hz", "|Ewe|/V", "|I|/A", "Phase(Z)/deg",
"|Z|/Ohm", "Re(Z)/Ohm", "-Im(Z)/Ohm"):
return (fieldname, np.float_)
elif fieldname in ("Q charge/discharge/mA.h", "step time/s",
"Q charge/mA.h", "Q discharge/mA.h",
"Temperature/°C", "Efficiency/%", "Capacity/mA.h")
return (fieldname, np.float_)
elif fieldname in ("cycle number", "I Range", "Ns", "half cycle"):
return (fieldname, np.int_)
Expand Down Expand Up @@ -238,6 +245,11 @@ def MPTfileCSV(file_or_path):
495: ('|I h5|/A', '<f4'),
496: ('|I h6|/A', '<f4'),
497: ('|I h7|/A', '<f4'),
498: ('Q charge/mA.h', '<f8'),
499: ('Q discharge/mA.h', '<f8'),
500: ('step time/s', '<f8'),
501: ('Efficiency/%', '<f8'),
502: ('Capacity/mA.h', '<f8'),
}

# These column IDs define flags which are all stored packed in a single byte
Expand Down

0 comments on commit 1025923

Please sign in to comment.