Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more column types to BioLogic.py #71

Merged
merged 1 commit into from
Nov 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions galvani/BioLogic.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ def fieldname_to_dtype(fieldname):
"counter inc."):
return (fieldname, np.bool_)
elif fieldname in ("time/s", "P/W", "(Q-Qo)/mA.h", "x", "control/V",
"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"):
"control/mA", "control/V/mA", "(Q-Qo)/C", "dQ/C",
chatcannon marked this conversation as resolved.
Show resolved Hide resolved
"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",
"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 @@ -232,6 +236,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