Skip to content

Commit

Permalink
eclab.mpr: Implement Constant Voltage and Constant Current tech…
Browse files Browse the repository at this point in the history
…niques (#188)

* Implement coV and coC

* Tests.

* Docs update.
  • Loading branch information
PeterKraus committed Oct 10, 2024
1 parent bd8fc92 commit 034e18b
Show file tree
Hide file tree
Showing 13 changed files with 254 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/source/version.5_2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Developed in the `ConCat Lab <https://tu.berlin/en/concat>`_ at Technische Unive

New features in ``yadg-5.2`` are:

- Implemented support for merged/appended files in :mod:`~yadg.extractors.eclab.mpr`. Test files taken from the data available at https://zenodo.org/doi/10.5281/zenodo.12165685. Thanks to Arnd Koeppe for bringing the issue up.
- Implemented support for the Modular Potentio technique in :mod:`~yadg.extractors.eclab.mpr`. Thanks to Graham Kimbell and Clea Burgel (from Empa) for providing test data.

- Implemented support for merged/appended files in :mod:`~yadg.extractors.eclab.mpr`. Test files taken from the data available at https://zenodo.org/doi/10.5281/zenodo.12165685. Thanks to Arnd Koeppe from KIT for bringing the issue up.
- Implemented support for the Modular Potentio technique in :mod:`~yadg.extractors.eclab.mpr`. Thanks to Graham Kimbell and Clea Burgel from Empa for providing test data.
- Implemented support for the Constant Current and Constant Voltage techniques in :mod:`~yadg.extractors.eclab.mpr`. Thanks to Carla Terboven from HZB for providing test data.

Other changes in ``yadg-5.2`` are:

Expand Down
79 changes: 77 additions & 2 deletions src/yadg/extractors/eclab/techniques.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
**eclabtechniques**: Parameters for implemented techniques.
-----------------------------------------------------------
**techniques**: Parameters for implemented techniques.
------------------------------------------------------
Implemented techniques:
Expand All @@ -17,6 +17,8 @@
- PEIS - Potentio Electrochemical Impedance Spectroscopy
- WAIT - Wait
- ZIR - IR compensation (PEIS)
- MP - Modular Potentio
- CoV - Constant Voltage
The module also implements resolution determination for parameters of techniques,
in :func:`get_resolution`.
Expand Down Expand Up @@ -1064,6 +1066,77 @@
)
]

# ~~~~~~~~~~~~~ Constant Voltage ~~~~~~~~~~~~~
_cov_params_dtypes = [
(
np.dtype(
[
("tR", "<f4"),
("dER/dt", "<f4"),
("dER", "<f4"),
("dtR", "<f4"),
("Ei", "<f4"),
("Ei_vs", "<u4"),
("ti", "<f4"),
("Imax", "<f4"),
("Imax_unit", "|u1"),
("Imin", "<f4"),
("Imin_unit", "|u1"),
("dQM", "<f4"),
("dQM_unit", "<u4"),
("record", "|u1"),
("dI", "<f4"),
("dI_unit", "|u1"),
("dQ", "<f4"),
("dQ_unit", "|u1"),
("dt", "<f4"),
("dta", "<f4"),
("E_range_min", "<f4"),
("E_range_max", "<f4"),
("I_range", "|u1"),
("I_range_min", "|u1"),
("I_range_max", "|u1"),
("I_range_init", "|u1"),
("bandwidth", "|u1"),
("goto_Ns", "<u4"),
("nc_cycles", "<u4"),
]
),
{"11.50"},
)
]

# ~~~~~~~~~~~~~ Constant Current ~~~~~~~~~~~~~
_coc_params_dtypes = [
(
np.dtype(
[
("tR", "<f4"),
("dER/dt", "<f4"),
("dER", "<f4"),
("dtR", "<f4"),
("Is", "<f4"),
("Is_unit", "|u1"),
("Is_vs", "|u4"),
("ts", "<f4"),
("EM", "<f4"),
("dQM", "<f4"),
("dQM_unit", "|u1"),
("record", "|u1"),
("dEs", "<f4"),
("dts", "<f4"),
("E_range_min", "<f4"),
("E_range_max", "<f4"),
("I_range", "|u1"),
("bandwidth", "|u1"),
("goto_Ns", "<u4"),
("nc_cycles", "<u4"),
]
),
{"11.50"},
)
]


# Maps the technique byte to its corresponding dtype.
technique_params_dtypes = {
Expand All @@ -1080,6 +1153,8 @@
0x32: ("ZIR", _zir_params_dtypes),
0x33: ("CVA", _cva_params_dtypes),
0x6C: ("LSV", _lsv_params_dtype),
0x75: ("coV", _cov_params_dtypes),
0x76: ("coC", _coc_params_dtypes),
0x77: ("GCPL", _gcpl_params_dtypes),
0x7F: ("MB", _mb_params_dtypes),
}
Expand Down
2 changes: 2 additions & 0 deletions tests/test_x_eclab.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def _datadir(tmpdir, request):
("ca.mpr", "ca.mpt", "en_US"),
("ca.issue_134.mpr", "ca.issue_134.mpt", "en_US"),
("ca.issue_149.mpr", "ca.issue_149.mpt", "de_DE"),
("coc.issue_185.mpr", "coc.issue_185.mpt", "en_US"),
("cov.issue_185.mpr", "cov.issue_185.mpt", "en_US"),
("cp.mpr", "cp.mpt", "en_US"),
("cp.issue_61.mpr", "cp.issue_61.mpt", "en_US"),
("cp.issue_149.mpr", "cp.issue_149.mpt", "de_DE"),
Expand Down
2 changes: 2 additions & 0 deletions tests/test_x_eclab_mpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"ca.mpr",
"ca.issue_134.mpr",
"ca.issue_149.mpr",
"coc.issue_185.mpr",
"cov.issue_185.mpr",
"cp.mpr",
"cp.issue_61.mpr",
"cp.issue_149.mpr",
Expand Down
Binary file added tests/test_x_eclab_mpr/coc.issue_185.mpr
Binary file not shown.
Binary file added tests/test_x_eclab_mpr/coc.issue_185.mpr.pkl
Binary file not shown.
Binary file added tests/test_x_eclab_mpr/cov.issue_185.mpr
Binary file not shown.
Binary file added tests/test_x_eclab_mpr/cov.issue_185.mpr.pkl
Binary file not shown.
2 changes: 2 additions & 0 deletions tests/test_x_eclab_mpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
("ca.mpt", "en_GB"),
("ca.issue_134.mpt", "en_GB"),
("ca.issue_149.mpt", "de_DE"),
("coc.issue_185.mpt", "en_US"),
("cov.issue_185.mpt", "en_US"),
("cp.mpt", "en_GB"),
("cp.issue_61.mpt", "en_GB"),
("cp.issue_149.mpt", "de_DE"),
Expand Down
80 changes: 80 additions & 0 deletions tests/test_x_eclab_mpt/coc.issue_185.mpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
EC-Lab ASCII FILE
Nb header lines : 56

Constant Current

Run on channel : 1 (SN 41593)
User :
CE vs. WE compliance from -10 V to 10 V
Electrode connection : standard
Potential control : Ewe
Ewe ctrl range : min = -2.50 V, max = 2.50 V
Safety Limits :
Do not start on E overload
Acquisition started on : 10/09/2024 13:36:20.501
Loaded Setting File : NONE
Saved on :
File : Dummy_001_02_CstC_C01.mpr
Directory : D:\Data\EC_Lab\20241009_Dummy_Measurement\
Host : 192.168.178.89
Device : SP-150 (SN 1581)
Address : USB
EC-Lab for windows v11.50 (software)
Internet server v11.50 (firmware)
Command interpretor v11.50 (firmware)
Electrode material :
Initial state :
Electrolyte :
Comments :
Electrode surface area : 0.001 cm�
Characteristic mass : 0.001 g
Equivalent Weight : 0.000 g/eq.
Density : 0.000 g/cm3
Volume (V) : 0.001 cm�
Cycle Definition : Charge/Discharge alternance
tR (h:m:s) 0:00:10.0000
dER/dt (mV/h) 0.0
dER (mV) 0.00
dtR (s) 1.0000
Is 10.000
unit Is �A
vs. <None>
ts (h:m:s) 0:01:0.0000
EM (V) pass
dQM 166.667
unit dQM nA.h
record <Ewe>
dEs (mV) 0.00
dts (s) 5.0000
E range min (V) -2.500
E range max (V) 2.500
I Range 10 mA
Bandwidth 5
goto Ns' 0
nc cycles 0

mode ox/red error control changes Ns changes counter inc. time/s control/mA <Ewe/V> I/mA dq/mA.h dQ/mA.h (Q-Qo)/mA.h I Range Ns Q charge/discharge/mA.h half cycle Energy charge/W.h Energy discharge/W.h Capacitance charge/�F Capacitance discharge/�F step time/s Q discharge/mA.h Q charge/mA.h Capacity/mA.h Efficiency/% cycle number P/W
3 1 0 1 0 0 7.004999823038816E+001 0.0000000E+000 2.7996334E-003 0.0000000E+000 0.000000000000000E+000 2.193574110666911E-008 2.193574110666911E-008 14 0 0.000000000000000E+000 0 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.0000000E+000 0.000000000000000E+000 0.0000000E+000
3 1 0 1 0 0 7.104999820512603E+001 0.0000000E+000 2.7689057E-005 0.0000000E+000 0.000000000000000E+000 2.193574110666911E-008 2.193574110666911E-008 14 0 0.000000000000000E+000 0 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.0000000E+000 0.000000000000000E+000 0.0000000E+000
3 1 0 1 0 0 7.204999817986391E+001 0.0000000E+000 6.6496032E-006 0.0000000E+000 0.000000000000000E+000 2.193574110666911E-008 2.193574110666911E-008 14 0 0.000000000000000E+000 0 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.0000000E+000 0.000000000000000E+000 0.0000000E+000
3 1 0 1 0 0 7.304999815460178E+001 0.0000000E+000 4.7553276E-006 0.0000000E+000 0.000000000000000E+000 2.193574110666911E-008 2.193574110666911E-008 14 0 0.000000000000000E+000 0 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.0000000E+000 0.000000000000000E+000 0.0000000E+000
3 1 0 1 0 0 7.404999812933966E+001 0.0000000E+000 5.2823639E-006 0.0000000E+000 0.000000000000000E+000 2.193574110666911E-008 2.193574110666911E-008 14 0 0.000000000000000E+000 0 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.0000000E+000 0.000000000000000E+000 0.0000000E+000
3 1 0 1 0 0 7.504999810407753E+001 0.0000000E+000 7.1346303E-006 0.0000000E+000 0.000000000000000E+000 2.193574110666911E-008 2.193574110666911E-008 14 0 0.000000000000000E+000 0 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.0000000E+000 0.000000000000000E+000 0.0000000E+000
3 1 0 1 0 0 7.604999807881541E+001 0.0000000E+000 8.0015670E-006 0.0000000E+000 0.000000000000000E+000 2.193574110666911E-008 2.193574110666911E-008 14 0 0.000000000000000E+000 0 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.0000000E+000 0.000000000000000E+000 0.0000000E+000
3 1 0 1 0 0 7.704999805355328E+001 0.0000000E+000 1.0426698E-005 0.0000000E+000 0.000000000000000E+000 2.193574110666911E-008 2.193574110666911E-008 14 0 0.000000000000000E+000 0 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.0000000E+000 0.000000000000000E+000 0.0000000E+000
3 1 0 1 0 0 7.804999802829116E+001 0.0000000E+000 8.2383513E-006 0.0000000E+000 0.000000000000000E+000 2.193574110666911E-008 2.193574110666911E-008 14 0 0.000000000000000E+000 0 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.0000000E+000 0.000000000000000E+000 0.0000000E+000
3 1 0 1 0 0 7.904999800302903E+001 0.0000000E+000 6.4548294E-006 0.0000000E+000 0.000000000000000E+000 2.193574110666911E-008 2.193574110666911E-008 14 0 0.000000000000000E+000 0 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.0000000E+000 0.000000000000000E+000 0.0000000E+000
3 1 0 0 0 0 8.004979797777196E+001 1.0000001E-002 2.7853313E-003 0.0000000E+000 0.000000000000000E+000 2.193574110666911E-008 2.193574110666911E-008 11 0 0.000000000000000E+000 0 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.0000000E+000 0.000000000000000E+000 0.0000000E+000
1 1 0 0 0 0 8.004999797776691E+001 1.0000001E-002 1.1801375E-002 7.1624932E-003 3.979162882185645E-010 2.233365739488767E-008 2.233365739488767E-008 11 0 3.979162882185645E-010 0 4.695959366186530E-015 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 8.004999797776691E+001 0.000000000000000E+000 3.979162882185645E-010 3.979162882185645E-010 0.0000000E+000 0.000000000000000E+000 8.4527265E-008
1 1 0 0 0 0 8.504999785145628E+001 1.0000001E-002 6.0750589E-002 1.1742689E-002 1.633020433260956E-005 1.635253799000445E-005 1.635253799000445E-005 11 0 1.633060224889777E-005 0 9.920742239762448E-010 0.000000000000000E+000 1.201044223003425E+003 0.000000000000000E+000 8.504999785145628E+001 0.000000000000000E+000 1.633060224889777E-005 1.633060224889777E-005 0.0000000E+000 0.000000000000000E+000 7.1337524E-007
1 1 0 0 0 0 9.004999772514566E+001 1.0000001E-002 6.0831778E-002 1.1551847E-002 1.622040689534818E-005 3.257294488535262E-005 3.257294488535262E-005 11 0 3.255100914424596E-005 0 1.978790411272084E-009 0.000000000000000E+000 2.390019885154790E+003 0.000000000000000E+000 9.004999772514566E+001 0.000000000000000E+000 3.255100914424596E-005 3.255100914424596E-005 0.0000000E+000 0.000000000000000E+000 7.0271938E-007
1 1 0 0 0 0 9.504999759883503E+001 1.0000001E-002 6.0908530E-002 1.0979323E-002 1.615890295110229E-005 4.873184783645492E-005 4.873184783645492E-005 11 0 4.870991209534825E-005 0 2.963005434941121E-009 0.000000000000000E+000 3.570878367814556E+003 0.000000000000000E+000 9.504999759883503E+001 0.000000000000000E+000 4.870991209534825E-005 4.870991209534825E-005 0.0000000E+000 0.000000000000000E+000 6.6873440E-007
1 1 0 0 0 0 1.000499974725244E+002 1.0000001E-002 6.1063219E-002 1.1233779E-002 1.617372496695154E-005 6.490557280340646E-005 6.490557280340646E-005 11 0 6.488363706229979E-005 0 3.950625142408938E-009 0.000000000000000E+000 4.741622859443015E+003 0.000000000000000E+000 1.000499974725244E+002 0.000000000000000E+000 6.488363706229979E-005 6.488363706229979E-005 0.0000000E+000 0.000000000000000E+000 6.8597069E-007
1 1 0 0 0 0 1.050499973462138E+002 1.0000001E-002 6.1066717E-002 1.1361006E-002 1.615439343990551E-005 8.105996624331198E-005 8.105996624331198E-005 11 0 8.103803050220530E-005 0 4.937120913446855E-009 0.000000000000000E+000 5.921747621798722E+003 0.000000000000000E+000 1.050499973462138E+002 0.000000000000000E+000 8.103803050220530E-005 8.103803050220530E-005 0.0000000E+000 0.000000000000000E+000 6.9377933E-007
1 1 0 0 0 0 1.100499972199032E+002 1.0000001E-002 6.1097283E-002 1.1042936E-002 1.614706724876952E-005 9.720703349208148E-005 9.720703349208148E-005 11 0 9.718509775097482E-005 0 5.923662849413569E-009 0.000000000000000E+000 7.097269408617773E+003 0.000000000000000E+000 1.100499972199032E+002 0.000000000000000E+000 9.718509775097482E-005 9.718509775097482E-005 0.0000000E+000 0.000000000000000E+000 6.7469335E-007
1 1 0 0 0 0 1.150499970935925E+002 1.0000001E-002 6.1230902E-002 1.2187985E-002 1.615791340167117E-005 1.133649468937527E-004 1.133649468937527E-004 11 0 1.133430111526460E-004 0 6.913026455436878E-009 0.000000000000000E+000 8.254880295884552E+003 0.000000000000000E+000 1.150499970935925E+002 0.000000000000000E+000 1.133430111526460E-004 1.133430111526460E-004 0.0000000E+000 0.000000000000000E+000 7.4628127E-007
1 1 0 0 0 0 1.200499969672819E+002 1.0000001E-002 6.1320059E-002 1.1615461E-002 1.617954916206913E-005 1.295444960558218E-004 1.295444960558218E-004 11 0 1.295225603147151E-004 0 7.905157364671749E-009 0.000000000000000E+000 9.416268723454155E+003 0.000000000000000E+000 1.200499969672819E+002 0.000000000000000E+000 1.295225603147151E-004 1.295225603147151E-004 0.0000000E+000 0.000000000000000E+000 7.1226071E-007
1 1 0 0 0 0 1.250499968409713E+002 1.0000001E-002 6.1369993E-002 1.2124371E-002 1.621003077546548E-005 1.457545268312873E-004 1.457545268312873E-004 11 0 1.457325910901806E-004 0 8.899966836529993E-009 0.000000000000000E+000 1.058406249373966E+004 0.000000000000000E+000 1.250499968409713E+002 0.000000000000000E+000 1.457325910901806E-004 1.457325910901806E-004 0.0000000E+000 0.000000000000000E+000 7.4407257E-007
1 1 0 0 0 0 1.300499967146607E+002 1.0000001E-002 6.1269518E-002 1.2442441E-002 1.620370474048994E-005 1.619582315717772E-004 1.619582315717772E-004 11 0 1.619362958306705E-004 0 9.892760015599140E-009 0.000000000000000E+000 1.178476912058502E+004 0.000000000000000E+000 1.300499967146607E+002 0.000000000000000E+000 1.619362958306705E-004 1.619362958306705E-004 0.0000000E+000 0.000000000000000E+000 7.6234232E-007
1 1 0 0 0 0 1.350499965883500E+002 1.0000001E-002 6.1242804E-002 1.1106550E-002 1.619716312229219E-005 1.781553946940694E-004 1.781553946940694E-004 11 0 1.781334589529627E-004 0 1.088471970093993E-008 0.000000000000000E+000 1.297050856418503E+004 0.000000000000000E+000 1.350499965883500E+002 0.000000000000000E+000 1.781334589529627E-004 1.781334589529627E-004 0.0000000E+000 0.000000000000000E+000 6.8019625E-007
1 1 0 0 0 0 1.400497964620445E+002 1.0000001E-002 6.1097510E-002 1.1233779E-002 1.616237840770433E-005 1.943177731017737E-004 1.943177731017737E-004 11 0 1.942958373606671E-004 0 1.187220077989850E-008 0.000000000000000E+000 1.418904422734404E+004 0.000000000000000E+000 1.400497964620445E+002 0.000000000000000E+000 1.942958373606671E-004 1.942958373606671E-004 0.0000000E+000 0.000000000000000E+000 6.8635592E-007
Binary file added tests/test_x_eclab_mpt/coc.issue_185.mpt.pkl
Binary file not shown.
Loading

0 comments on commit 034e18b

Please sign in to comment.