Skip to content

Commit

Permalink
11.50 mpt pass
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterKraus committed Jun 30, 2024
1 parent b89d985 commit 0c0af72
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 12 deletions.
13 changes: 13 additions & 0 deletions src/yadg/extractors/eclab/common/mpt_columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,26 @@
"(Q-Qo)/mA.h": ("(Q-Qo)", "mA·h"),
"<Ece>/V": ("<Ece>", "V"),
"<Ewe>/V": ("<Ewe>", "V"),
"<Ewe/V>": ("<Ewe>", "V"),
"<I>/mA": ("<I>", "mA"),
"|C|/nF": ("|C|", "nF"),
"|Conductivity|/mS/cm": ("|Conductivity|", "mS/cm"),
"|Ece|/V": ("|Ece|", "V"),
"|Energy|/W.h": ("|Energy|", "W·h"),
"|Ewe|/V": ("|Ewe|", "V"),
"|Ewe h2|/V": ("|Ewe h2|", "V"),
"|Ewe h3|/V": ("|Ewe h3|", "V"),
"|Ewe h4|/V": ("|Ewe h4|", "V"),
"|Ewe h5|/V": ("|Ewe h5|", "V"),
"|Ewe h6|/V": ("|Ewe h6|", "V"),
"|Ewe h7|/V": ("|Ewe h7|", "V"),
"|I|/A": ("|I|", "A"),
"|I h2|/A": ("|I h2|", "A"),
"|I h3|/A": ("|I h3|", "A"),
"|I h4|/A": ("|I h4|", "A"),
"|I h5|/A": ("|I h5|", "A"),
"|I h6|/A": ("|I h6|", "A"),
"|I h7|/A": ("|I h7|", "A"),
"|M|": ("|M|", ""),
"|Permittivity|": ("|Permittivity|", ""),
"|Resistivity|/Ohm.cm": ("|Resistivity|", "Ω·cm"),
Expand Down
2 changes: 1 addition & 1 deletion src/yadg/extractors/eclab/common/techniques.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
("goto_Ns", "u4"),
("nc_cycles", "u4"),
]
)
),
]


Expand Down
20 changes: 10 additions & 10 deletions src/yadg/extractors/eclab/mpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,15 @@ def process_settings(data: bytes) -> tuple[dict, list]:
count=ns,
)
pardicts = [dict(zip(value.dtype.names, value.item())) for value in rawparams]
# print(f"{[i['set_I/C'] for i in pardicts]=}")
# print(f"{[i['Is'] for i in pardicts]=}")
# print(f"{[i['Is_unit'] for i in pardicts]=}")
# print(f"{[i['Is_vs'] for i in pardicts]=}")
# print(f"{[i['N'] for i in pardicts]=}")
# print(f"{[i['I_sign'] for i in pardicts]=}")
# print(f"{[i['t1'] for i in pardicts]=}")
# print(f"{[i['I_range'] for i in pardicts]=}")
# print(f"{[i['bandwidth'] for i in pardicts]=}")
# print(f"{[i['set_I/C'] for i in pardicts]=}")
# print(f"{[i['Is'] for i in pardicts]=}")
# print(f"{[i['Is_unit'] for i in pardicts]=}")
# print(f"{[i['Is_vs'] for i in pardicts]=}")
# print(f"{[i['N'] for i in pardicts]=}")
# print(f"{[i['I_sign'] for i in pardicts]=}")
# print(f"{[i['t1'] for i in pardicts]=}")
# print(f"{[i['I_range'] for i in pardicts]=}")
# print(f"{[i['bandwidth'] for i in pardicts]=}")
params = []
for pardict in pardicts:
for k, v in pardict.items():
Expand Down Expand Up @@ -409,7 +409,7 @@ def process_data(
data_dtype = np.dtype(list(zip(namelist, dtypelist)))
# Depending on module version, datapoints start at different offsets.
if version == 0:
offset = 0x3ef
offset = 0x3EF
elif version == 2:
offset = 0x195
elif version == 3:
Expand Down
2 changes: 1 addition & 1 deletion src/yadg/extractors/eclab/mpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def process_data(
sval = value.strip()
vals[name] = sval

Ns = vals.get("Ns", 0)
Ns = vals.get("Ns", 0)
Erange = Eranges[Ns] if isinstance(Eranges, list) else Eranges
Irstr = Iranges[Ns] if isinstance(Iranges, list) else Iranges
if "I Range" in vals:
Expand Down
5 changes: 5 additions & 0 deletions tests/test_x_eclab_mpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,22 @@
("ca.issue_149.mpt", "de_DE"),
("cp.mpt", "en_GB"),
("cp.issue_61.mpt", "en_GB"),
("cp.issue_149.mpt", "de_DE"),
("cv.mpt", "en_GB"),
("cv.issue_149.mpt", "de_DE"),
("cva.issue_135.mpt", "en_GB"),
("gcpl.mpt", "en_GB"),
("gcpl.issue_149.mpt", "de_DE"),
("geis.mpt", "en_GB"),
("geis.issue_149.mpt", "de_DE"),
("lsv.mpt", "en_GB"),
("mb.mpt", "en_GB"),
("mb.issue_95.mpt", "en_GB"),
("mb.issue_149.mpt", "de_DE"),
("ocv.mpt", "en_GB"),
("ocv.issue_149.mpt", "de_DE"),
("peis.mpt", "en_GB"),
("peis.issue_149.mpt", "de_DE"),
("wait.mpt", "en_GB"),
("zir.mpt", "en_GB"),
("vsp_ocv_with.mpt", "en_GB"),
Expand Down
Binary file added tests/test_x_eclab_mpt/cp.issue_149.mpt.pkl
Binary file not shown.
Binary file added tests/test_x_eclab_mpt/geis.issue_149.mpt.pkl
Binary file not shown.
Binary file added tests/test_x_eclab_mpt/mb.issue_149.mpt.pkl
Binary file not shown.
Binary file added tests/test_x_eclab_mpt/ocv.issue_149.mpt.pkl
Binary file not shown.
Binary file added tests/test_x_eclab_mpt/peis.issue_149.mpt.pkl
Binary file not shown.

0 comments on commit 0c0af72

Please sign in to comment.