diff --git a/docs/API/api_cellcycling_read_input.md b/docs/API/api_cellcycling_read_input.md index 3db5845..4fc013c 100644 --- a/docs/API/api_cellcycling_read_input.md +++ b/docs/API/api_cellcycling_read_input.md @@ -16,3 +16,9 @@ .. autoclass:: echemsuite.cellcycling.read_input.FileManager :members: ``` + +## The `quickload_folder` function + +```{eval-rst} +.. autofunction:: echemsuite.cellcycling.read_input.quickload_folder +``` \ No newline at end of file diff --git a/docs/Examples/plot-cycles.md b/docs/Examples/plot-cycles.md index 442cdd9..bfb8297 100644 --- a/docs/Examples/plot-cycles.md +++ b/docs/Examples/plot-cycles.md @@ -77,7 +77,7 @@ from echemsuite.cellcycling.read_input import FileManager from echemsuite.graphicaltools import ColorShader, Palette # Read a single set of .DTA files using the `fetch_from_folder` method -path = "../utils/gamry_cellcycling/step_0,1A" # Set here the path to the folder containing the files +path = "../utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE" # Set here the path to the folder containing the files manager = FileManager() manager.fetch_from_folder(path, extension=".DTA") cellcycling = manager.get_cellcycling() @@ -128,8 +128,8 @@ def quickload_folder(folder: str, extension: str) -> CellCycling: # Define a dictionary encoding the name of the experiment and the corresponding cellcycling object experiments = {} -experiments["0.1A"] = quickload_folder("../utils/gamry_cellcycling/step_0,1A", ".DTA") -experiments["0.3A"] = quickload_folder("../utils/gamry_cellcycling/step_0,3A", ".DTA") +experiments["0.1A"] = quickload_folder("../utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE", ".DTA") +experiments["0.3A"] = quickload_folder("../utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE", ".DTA") # Select a color palette and set the font size palette = Palette("matplotlib") @@ -189,8 +189,8 @@ def quickload_folder(folder: str, extension: str) -> CellCycling: # Define a dictionary encoding the name of the experiment and the corresponding cellcycling object experiments = {} experiments["Experiment A"] = quickload_folder("../utils/biologic_single_cycling", ".mpt") -experiments["Experiment B"] = quickload_folder("../utils/gamry_cellcycling/step_0,1A", ".DTA") -experiments["Experiment C"] = quickload_folder("../utils/gamry_cellcycling/step_0,3A", ".DTA") +experiments["Experiment B"] = quickload_folder("../utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE", ".DTA") +experiments["Experiment C"] = quickload_folder("../utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE", ".DTA") # Select a color palette and set the font size palette = Palette("pastel") @@ -245,8 +245,8 @@ def quickload_folder(folder: str, extension: str) -> CellCycling: # Define a dictionary encoding the name of the experiment and the corresponding cellcycling object experiments = {} experiments["Experiment A"] = quickload_folder("../utils/biologic_single_cycling", ".mpt") -experiments["Experiment B"] = quickload_folder("../utils/gamry_cellcycling/step_0,1A", ".DTA") -experiments["Experiment C"] = quickload_folder("../utils/gamry_cellcycling/step_0,3A", ".DTA") +experiments["Experiment B"] = quickload_folder("../utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE", ".DTA") +experiments["Experiment C"] = quickload_folder("../utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE", ".DTA") # Select a color palette and set the font size palette = Palette("pastel") diff --git a/docs/Examples/plot-rate-experiments.md b/docs/Examples/plot-rate-experiments.md index e92cd3c..bef99d5 100644 --- a/docs/Examples/plot-rate-experiments.md +++ b/docs/Examples/plot-rate-experiments.md @@ -18,7 +18,11 @@ A rate experiment can be constructed directly from a Biologic battery module fil * [Plot a single set of data from a Biologic Battery module file](Examples-plot-rate-experiments-battmodule) * [Plot a single set of data from an ARBIN `.csv` file](Examples-plot-rate-experiments-ARBIN) * [Plot a single set of data from a user defined experiment](Examples-plot-rate-experiments-user-defined) +* [Plot a single set of data from a GAMRY folder tree](Examples-plot-rate-experiments-GAMRY-tree) +* [Plot multiple efficiency series on the same axis for a single experiment](Examples-plot-rate-experiments-multiple-efficiencies) * [Plot more than one experiment in the same figure](Examples-plot-rate-experiments-comparison) +* [Plot multiple efficiency series on the same axis for multiple experiments](Examples-plot-rate-experiments-multiple-efficiencies-many-experiment) + (Examples-plot-rate-experiments-battmodule)= @@ -127,19 +131,12 @@ The following script can be used to generate a `RateExperiment` object starting ```{code-cell} python import matplotlib.pyplot as plt from echemsuite.cellcycling.cycles import CellCycling -from echemsuite.cellcycling.read_input import FileManager +from echemsuite.cellcycling.read_input import quickload_folder from echemsuite.cellcycling.experiments import RateExperiment -# Simple helper function defined to load a cellcycling experiment in a single line -def quickload_folder(folder: str, extension: str) -> CellCycling: - manager = FileManager() - manager.fetch_from_folder(folder, extension) - cellcycling = manager.get_cellcycling() - return cellcycling - # Manually read the cell-cycling steps recorded, at different currents, in the .DTA files -step_1 = quickload_folder("../utils/gamry_cellcycling/step_0,1A", ".DTA") -step_2 = quickload_folder("../utils/gamry_cellcycling/step_0,3A", ".DTA") +step_1 = quickload_folder("../utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE", ".DTA") +step_2 = quickload_folder("../utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE", ".DTA") # Define an experiment from the data just obtained and set the electrolyte volume experiment = RateExperiment(current_steps=[0.1, 0.3], cellcycling_steps=[step_1, step_2]) @@ -181,6 +178,138 @@ plt.tight_layout() plt.show() ``` +(Examples-plot-rate-experiments-GAMRY-tree)= +## Plot a single set of data from a GAMRY folder tree + +In the previous example an experiment has been created from a set of `.DTA` files generated by a GAMRY instrument. That example can, however, be greatly simplified if the data-files are organized in a "standard" GAMRY folder structure. Such a structure is identified as follows: + +* A `basefolder` contains a set of subfolders associated to different current steps. +* Each subfolder contains a `CHARGE_DISCHARGE` folder in which all the `.DTA` files are stored. + +This is the case for the file structure used in the previous example that is structured as follows: + +``` +gamry_cellcycling + ├── step_0,1A + │   ├── 0,1A Cycling.DTA + │   └── CHARGE_DISCHARGE + │   ├── 0,1A Charge_#10.DTA + │   ├── ... + │   └── 0,1A D-Charge_#9.DTA + └── step_0,3A + ├── 0,3 Cycling.DTA + └── CHARGE_DISCHARGE +    ├── 0,3A Charge_#10.DTA +    ├── ... +    └── 0,3A D-Charge_#9.DTA +``` + +The `gamry_cellcycling` represents the `basefolder` while the `step_0,1A` and `step_0,3A` folders represents the folders containin the `CHARGE_DISCHARGE` data-folders. + +This file structure can be easily loaded using the `from_GAMRY_folder_tree` classmethod of the `RateExperiment` class. As before the volumetric capacity and coulombic efficiencies are then plotted on a double y-axis graph. In this case the color of the markers has been set manually to `#00FFDD` and a transparency of 20% (`alpha=0.8`) has been set. + +```{code-cell} python +import matplotlib.pyplot as plt +from echemsuite.cellcycling.cycles import CellCycling +from echemsuite.cellcycling.experiments import RateExperiment + +# Define an experiment from the data just obtained and set the electrolyte volume +experiment = RateExperiment.from_GAMRY_folder_tree("../utils/gamry_cellcycling") +volume = 0.1 + +# Set the color to be used in the plot +color = "#00FFDD" + +# Extract the data that needs to be plotted +N = experiment.numbers +Q = experiment.capacity +CE = experiment.coulomb_efficiencies + +# Compute on the fly the volumetric capacity in Ah/L starting from the capacity list (in mAh) +VC = [q/(1000*volume) if q is not None else None for q in Q] + +# Setup the figure and define a second y-axis +plt.rcParams.update({'font.size': 18}) +fig, ax1 = plt.subplots(figsize=(10, 6)) +ax2 = ax1.twinx() + +# Plot the volumetric capacity on the main axis +ax1.scatter(N, VC, s=100, c=color, marker="s", edgecolors="black", alpha=0.8, zorder=3) +ax1.set_ylabel("◼ Volumetric capacity (Ah/L)", size=20) +ax1.set_ylim((0, 7.5)) +ax1.grid(which="major", c="#DDDDDD") +ax1.grid(which="minor", c="#EEEEEE") + +# Plot the coulombic efficiency on the secondary axis +ax2.scatter(N, CE, s=100, c=color, marker="o", edgecolors="black", alpha=0.8, zorder=3) +ax2.set_ylabel("● Coulumbic efficiency (%)", size=20) +ax2.set_ylim((20, 110)) + +# Set the x-label of the plot +ax1.set_xlabel("Cycle number", size=20) + +# Show the plot +plt.tight_layout() +plt.show() +``` + +(Examples-plot-rate-experiments-multiple-efficiencies)= +## Plot multiple efficiency series on the same axis + +Often it can be useful to plot more than one efficiency value on the same axis. This poses a new challenge since the marker used in the plot cannot be easily associated to the data series printed as an axis label. To achieve the desired result a legend should be included merging the data from both axes. An example script, reading data from a Biologic battery module, to do so is reported in what follows: + +```{code-cell} python +import matplotlib.pyplot as plt +from echemsuite.cellcycling.experiments import RateExperiment + +# Define a Rate experiment (in this case from a Biologic battery module file) +experiment = RateExperiment.from_Biologic_battery_module("../utils/biologic_battery_module.mpt") +volume = 0.05 + +# Set the color to be used in the plot +color = "#FF8C00" + +# Extract the data that needs to be plotted +N = experiment.numbers +Q = experiment.capacity +CE = experiment.coulomb_efficiencies +EE = experiment.energy_efficiencies + +# Compute on the fly the volumetric capacity in Ah/L starting from the capacity list (in mAh) +VC = [q/(1000*volume)if q is not None else None for q in Q] + +# Setup the figure and define a second y-axis +plt.rcParams.update({'font.size': 18}) +fig, ax1 = plt.subplots(figsize=(10, 6)) +ax2 = ax1.twinx() + +# Plot the volumetric capacity on the main axis +s1=ax1.scatter(N, VC, s=100, c=color, marker="s", edgecolors="black", alpha=0.8, zorder=3, label="Experiment") +ax1.set_ylabel("◼ Volumetric capacity (Ah/L)", size=20) +ax1.set_ylim((10, 110)) +ax1.grid(which="major", c="#DDDDDD") +ax1.grid(which="minor", c="#EEEEEE") + +# Plot the coulombic and energy efficiencies on the secondary axis +s2=ax2.scatter(N, CE, s=100, c=color, marker="o", edgecolors="black", alpha=0.8, zorder=3, label="Experiment - CE") +s3=ax2.scatter(N,EE, s=100, c=color, marker="d", edgecolors="black", alpha=0.8, zorder=3, label="Experiment - EE") +ax2.set_ylabel("Efficiency (%)", size=20) +ax2.set_ylim((-20, 130)) + +# Set the x-label of the plot +ax1.set_xlabel("Cycle number", size=20) + +# Merge the ledend entries for both axes and print them in the primary axis legend +labs = [l.get_label() for l in (s1, s2, s3)] +ax1.legend((s1, s2, s3), labs, loc=3) + +# Show the plot +plt.tight_layout() +plt.show() + +``` + + (Examples-plot-rate-experiments-comparison)= ## Plot more than one experiment in the same figure @@ -189,23 +318,11 @@ More than one experiment can be plotted on the same figure to compare performanc ```{code-cell} python import matplotlib.pyplot as plt from echemsuite.cellcycling.cycles import CellCycling -from echemsuite.cellcycling.read_input import FileManager from echemsuite.cellcycling.experiments import RateExperiment from echemsuite.graphicaltools import Palette -# Simple helper function defined to load a cellcycling experiment in a single line -def quickload_folder(folder: str, extension: str) -> CellCycling: - manager = FileManager() - manager.fetch_from_folder(folder, extension) - cellcycling = manager.get_cellcycling() - return cellcycling - -# Manually read the cell-cycling steps recorded, at different currents, in the .DTA files -step_1 = quickload_folder("../utils/gamry_cellcycling/step_0,1A", ".DTA") -step_2 = quickload_folder("../utils/gamry_cellcycling/step_0,3A", ".DTA") - # Define an experiment from the data just obtained and define a second one using the Biologic battery module file -experiment_1 = RateExperiment(current_steps=[0.1, 0.3], cellcycling_steps=[step_1, step_2]) +experiment_1 = RateExperiment.from_GAMRY_folder_tree("../utils/gamry_cellcycling") experiment_2 = RateExperiment.from_Biologic_battery_module("../utils/biologic_battery_module.mpt") # Group the experiments in a dictionary and define a volume list for the electrolytes @@ -219,7 +336,7 @@ palette = Palette("matplotlib") # Setup the figure and define a second y-axis plt.rcParams.update({'font.size': 18}) -fig, ax1 = plt.subplots(figsize=(10, 8)) +fig, ax1 = plt.subplots(figsize=(10, 6)) ax2 = ax1.twinx() for i, (name, experiment) in enumerate(experiments.items()): @@ -256,6 +373,78 @@ ax2.set_ylim((10, 110)) ax1.legend(loc=4) # Show the plot +plt.tight_layout() +plt.show() +``` + +(Examples-plot-rate-experiments-multiple-efficiencies-many-experiment)= +## Plot multiple efficiency series on the same axis for multiple experiments + +Often it can be useful to plot more than one efficiency value on the same axis for multiple experiments. This poses a new challenge since the marker used in the plot cannot be easily associated to the data series printed as an axis label. To achieve the desired result a legend should be included merging the data from both axes. An example script, reading data from a Biologic battery module, to do so is reported in what follows. Please notice also the use of `ncols` in the call to `legend` allowing us to set a two column format of the legend shown. + +```{code-cell} python +import matplotlib.pyplot as plt +from echemsuite.cellcycling.experiments import RateExperiment +from echemsuite.graphicaltools import Palette + +# Define a Rate experiment (in this case from a Biologic battery module file) and the electrolyte volume +experiments = {} +experiments["ARBIN"] = RateExperiment.from_ARBIN_csv_file("../utils/arbin_sample.CSV") +experiments["Biologic"] = RateExperiment.from_Biologic_battery_module("../utils/biologic_battery_module.mpt") +volume = 0.1 + +# Create a palette object to easily handle color schemes +palette = Palette("bold") + +# Setup the figure and define a second y-axis +plt.rcParams.update({'font.size': 18}) +fig, ax1 = plt.subplots(figsize=(10, 6)) +ax2 = ax1.twinx() + +# Iterate over each experiment and plot the required scatters +scatters = [] +for i, (name, experiment) in enumerate(experiments.items()): + + color = palette[i].HEX + + # Extract the data that needs to be plotted + N = experiment.numbers + Q = experiment.capacity + CE = experiment.coulomb_efficiencies + EE = experiment.energy_efficiencies + + # Compute on the fly the volumetric capacity in Ah/L starting from the capacity list (in mAh) + VC = [q/(1000*volume)if q is not None else None for q in Q] + + # Plot the volumetric capacity on the main axis + s1=ax1.scatter(N, VC, s=100, c=color, marker="s", edgecolors="black", alpha=0.8, zorder=3, label=f"{name}") + + # Plot the coulombic and energy efficiencies on the secondary axis + s2=ax2.scatter(N, CE, s=100, c=color, marker="o", edgecolors="black", alpha=0.8, zorder=3, label=f"{name} - CE") + s3=ax2.scatter(N,EE, s=100, c=color, marker="d", edgecolors="black", alpha=0.8, zorder=3, label=f"{name} - EE") + + # Append all the scatters to the scatters list + scatters.append(s1) + scatters.append(s2) + scatters.append(s3) + +# Apply settings to the main y-axis +ax1.set_ylabel("◼ Volumetric capacity (Ah/L)", size=20) +ax1.set_ylim((0, 60)) +ax1.grid(which="major", c="#DDDDDD") +ax1.grid(which="minor", c="#EEEEEE") + +# Apply settings to the secondary y-axis +ax2.set_ylabel("Efficiency (%)", size=20) +ax2.set_ylim((-50, 130)) + +# Set the x-label of the plot +ax1.set_xlabel("Cycle number", size=20) + +# Show the plot +labs = [l.get_label() for l in scatters] +ax1.legend(scatters, labs, loc=3, ncol=2) + plt.tight_layout() plt.show() ``` \ No newline at end of file diff --git a/docs/Guide/CellCycling/analyzing-experiments.ipynb b/docs/Guide/CellCycling/analyzing-experiments.ipynb index bd26570..4838209 100644 --- a/docs/Guide/CellCycling/analyzing-experiments.ipynb +++ b/docs/Guide/CellCycling/analyzing-experiments.ipynb @@ -19,8 +19,9 @@ "* Directly constructued by the user, by providing a list of current values and a list of the corresponding `CellCycling` objects\n", "* Constructed from a Bilogic Battery module file using the `from_Biologic_battery_module` classmethod.\n", "* Constructed from a ARBIN datafile formatted as a `.csv` table using the `from_ARBIN_csv_file` classmethod.\n", + "* Constructed from a GAMRY \"standard\" folder tree using the `from_GAMRY_folder_tree` classmethod.\n", "\n", - "A ARBIN `.csv` file can be loaded following the code:" + "An ARBIN `.csv` file can be loaded following the code:" ] }, { @@ -155,13 +156,6 @@ "plt.tight_layout()\n", "plt.show() " ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "In similar manner a ARBIN `.csv` file can be easily loaded following this" - ] } ], "metadata": { diff --git a/docs/intro.md b/docs/intro.md index e6944b7..efe2744 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -1,6 +1,6 @@ # GES-echem-suite Documentation -Version: [0.2.1b](ReleaseNotes) +Version: [0.2.1b2](ReleaseNotes) The `GES-echem-suite` library is a small collection of tools for the manipulation and analysis of electrochemical data. The library allows to load, organize, and process the data-files collected during electrochemical experiments such as battery cycling and cyclic voltammetries. diff --git a/docs/release-notes.md b/docs/release-notes.md index d79795c..5b9ceba 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,6 +1,13 @@ (ReleaseNotes)= # Release notes +* Version 0.2.1b2 + * Added classmethod to `RateExperiment` to load ARBIN `.csv` files. + * Added timestamp propery to `CellCycling` class to more easily track the start of the experiment. + * Added a `quickload_folder` method to the `cellcycling.read_input` module. + * Added classmethod to `RateExperiment` to load GAMRY standard folder format. + * Update to the documentation with more examples and new types of plot + * Version 0.2.1b * Added a graphicaltools module to help the user in the creation of graphs and plots * Defined a simple `Color` class to hold, manipulate and carry around RGB color values. diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Cycling.DTA b/docs/utils/gamry_cellcycling/step_0,1A/0,1A Cycling.DTA new file mode 100644 index 0000000..22db02b --- /dev/null +++ b/docs/utils/gamry_cellcycling/step_0,1A/0,1A Cycling.DTA @@ -0,0 +1,105 @@ +EXPLAIN +TAG PWR800_CYCLICCHARGEDISCHARGE +TITLE LABEL Capacity Curve Test Identifier +DATE LABEL 23/7/2022 Date +TIME LABEL 20:25:33 Time +NOTES NOTES 1 Notes... + +PSTAT PSTAT IFC1010-29239 Potentiostat +CAPACITY QUANT 1,00000E+000 Capacity (A-hr) +CYCLES IQUANT 20 Cycles (#) +FIRSTSTEP SELECTOR 0 First Step +CELLTYPE SELECTOR 1 Cell Type +WORKINGCONNECTION SELECTOR 0 Working Connection +MAXCHARGETIME VARIABLEANDUNITS 8,64000E+004 s 2,40000E+001 hour(s) Max Charge Time +CHARGEMODE MULTIPARAM 0 1,00000E-001 Charge Mode Constant Current Amp(s) +CHARGECURRENT QUANT 0,1 Charge Current (A) +VOLTAGEFINISH TWOPARAM F 1,00000E-003 3,60000E+003 Voltage Finish I (A) < Max Time(s) +SAMPLETIME QUANT 5,00000E+000 Sample Period (s) +CHARGESTOPAT1 MULTIPARAM 2 9,00000E-001 Stop At 1 |Voltage| > Limit V +CHARGESTOPAT2 MULTIPARAM 0 0,00000E+000 Stop At 2 None N/A +IRCOMP TOGGLE F IR Measure +EOC QUANT -0,0196608 Open Circuit (V) +MAXDISCHARGETIME VARIABLEANDUNITS 8,64000E+004 s 2,40000E+001 hour(s) Max Discharge Time +DISCHARGEMODE MULTIPARAM 0 1,00000E-001 Discharge Mode Constant Current Amp(s) +VOLTAGEFINISH TWOPARAM F 1,00000E-003 3,60000E+003 Voltage Finish I (A) < Max Time(s) +DISCHARGESTOPAT1 MULTIPARAM 1 2,00000E-001 Stop At 1 |Voltage| < Limit V +DISCHARGESTOPAT2 MULTIPARAM 0 0,00000E+000 Stop At 2 None N/A +LOOPEND1 MULTIPARAM 0 0,00000E+000 Loop End 1 None N/A +LOOPEND2 MULTIPARAM 0 0,00000E+000 Loop End 2 None N/A +PSTATMODEL IQUANT 64 Pstat Model +PSTATSECTION LABEL IFC1010-29239 Pstat Section +PSTATSERIALNO LABEL 29239 Pstat Serial Number +CTRLMODE IQUANT 0 Control Mode +ELECTROMETER IQUANT 0 RE=0 or CS=1 +IESTAB IQUANT 0 I/E Stability +CASPEED IQUANT 4 Control Amp Speed +CONVENTION IQUANT 1 Current Convention +ICHRANGE IQUANT 2 Ich Range +ICHRANGEMODE TOGGLE T Ich Auto Range +ICHOFFSETENABLE TOGGLE F Ich Offset Enable +ICHOFFSET QUANT 0 Ich Offset (V) +ICHFILTER IQUANT 1 Ich Filter +VCHRANGE IQUANT 1 Vch Range +VCHRANGEMODE TOGGLE T Vch Auto Range +VCHOFFSETENABLE TOGGLE F Vch Offset Enable +VCHOFFSET QUANT 0 Vch Offset (V) +VCHFILTER IQUANT 1 Vch Filter +IERANGELOWERLIMIT IQUANT 4 I/E Range Lower Limit +IERANGEMODE TOGGLE T I/E AutoRange +IERANGE IQUANT 12 I/E Range +ACHSELECT IQUANT 0 Ach Select +ACHRANGE IQUANT 2 Ach Range +ACHOFFSETENABLE TOGGLE F Ach Offset Enable +ACHOFFSET QUANT 0 Ach Offset (V) +ACHFILTER IQUANT 1 Ach Filter +SENSECABLEID IQUANT 13 Sense Cable ID +PWRCABLEID IQUANT 13 Power Cable ID +DCCALDATE LABEL 8/10/2021 DC Calibration Date +ACCALDATE LABEL 7/8/2021 AC Calibration Date +FRAMEWORKVERSION LABEL 7.8.4 Framework Version +INSTRUMENTVERSION LABEL 4.42 Instrument Version +CAPACITYCURVE TABLE + Pt Time Type Cycle Charge Duration Vstart Vend Energy Tstart Tend Over + # s # # C s V V J deg C deg C bits + 1 13615 0 1 1361,267 13614,63 0,5960405 0,8860051 951,99 1408,852 1408,373 ........... + 2 27895 1 1 1428,435 14280,6 0,6750165 0,229876 -699,6599 1408,41 1408,683 ........... + 3 42145 0 2 1424,731 14249,21 0,5290374 0,8764417 972,508 1408,534 1408,504 ........... + 4 54974 1 2 1283,274 12829,61 0,6700336 0,2243865 -622,4946 1408,503 1408,503 ........... + 5 67763 0 3 1279,098 12788,51 0,5325876 0,867619 872,9965 1408,314 1408,201 ........... + 6 79313 1 3 1154,892 11549,84 0,6607866 0,2239404 -552,7123 1408,202 1408,734 ........... + 7 90827 0 4 1151,232 11513,67 0,536359 0,8557066 782,2231 1408,524 1408,576 ........... + 8 101245 1 4 1042,1 10418,48 0,6559205 0,2215048 -495,7988 1408,536 1408,624 ........... + 9 111622 0 5 1037,835 10376,42 0,5430673 0,8524351 706,1701 1408,509 1408,361 ........... + 10 121018 1 5 939,8732 9396,273 0,6451499 0,2192161 -439,8879 1408,285 1408,349 ........... + 11 130386 0 6 936,6339 9368,135 0,5480531 0,8423993 639,6252 1408,136 1408 ........... + 12 138895 1 6 851,1331 8509,025 0,6351488 0,2185209 -392,6482 1408 1408,188 ........... + 13 147384 0 7 848,6566 8487,965 0,5520365 0,83772 580,5559 1407,917 1408,096 ........... + 14 155107 1 7 772,3492 7723,847 0,6277666 0,2176878 -353,1324 1408,016 1408,25 ........... + 15 162810 0 8 770,3314 7702,753 0,5559925 0,8341654 527,2747 1408,075 1408,16 ........... + 16 169839 1 8 703,0345 7028,625 0,620562 0,2175663 -320,1966 1408,169 1408,33 ........... + 17 176852 0 9 701,0606 7011,642 0,557551 0,8303377 479,2796 1408,008 1408,422 ........... + 18 183229 1 9 637,5994 6376,454 0,6154347 0,2149995 -288,9839 1408,453 1408,428 ........... + 19 189592 0 10 636,1555 6362,488 0,5633824 0,8283423 435,8223 1408,278 1408,506 ........... + 20 195391 1 10 580,0658 5799,187 0,6067213 0,2167097 -261,1663 1408,424 1408,479 ........... + 21 201175 0 11 578,3499 5784,427 0,5650367 0,8265138 397,3695 1408,329 1408,194 ........... + 22 206440 1 11 526,5587 5264,215 0,5934514 0,2160292 -233,8584 1408,135 1408,303 ........... + 23 211693 0 12 525,4079 5253,175 0,5696882 0,8248509 362,3588 1408,133 1408,172 ........... + 24 216475 1 12 478,3295 4782,159 0,5822647 0,2149173 -210,3052 1408,199 1408,366 ........... + 25 221251 0 13 477,5267 4775,97 0,5748308 0,8234565 330,5604 1408,287 1408,172 ........... + 26 225600 1 13 434,857 4348,938 0,5737101 0,2150051 -189,1687 1408,199 1408,227 ........... + 27 229941 0 14 433,9344 4340,003 0,5787352 0,9003973 301,5422 1408,069 1408,082 ........... + 28 233905 1 14 396,4193 3964,477 0,5651498 0,2151393 -170,6256 1408,025 1408,195 ........... + 29 237862 0 15 395,6937 3956,293 0,582041 0,8277339 275,9163 1407,961 1407,999 ........... + 30 241481 1 15 361,9335 3619,617 0,5580278 0,2149048 -154,1935 1407,959 1408,115 ........... + 31 245096 0 16 361,5585 3614,96 0,5845825 0,8190832 252,7936 1408,006 1408 ........... + 32 248411 1 16 331,4078 3314,372 0,5542865 0,2146162 -140,3683 1407,976 1408,193 ........... + 33 251720 0 17 330,859 3309,073 0,5861328 0,8194665 231,5228 1407,919 1407,945 ........... + 34 254751 1 17 303,0469 3030,692 0,5507751 0,2132164 -127,3295 1407,949 1407,998 ........... + 35 257774 0 18 302,4108 3023,595 0,5895481 0,8181413 212,189 1407,738 1407,886 ........... + 36 260542 1 18 276,7416 2767,588 0,5464231 0,2140881 -114,8784 1407,905 1408,096 ........... + 37 263307 0 19 276,502 2764,57 0,5934181 0,8167789 194,6277 1407,876 1407,801 ........... + 38 265839 1 19 253,2347 2532,492 0,5429562 0,2140257 -103,8193 1407,798 1407,899 ........... + 39 268370 0 20 253,0152 2530,578 0,5940219 0,827719 178,5629 1407,756 1407,727 ........... + 40 270692 1 20 232,1247 2321,395 0,5403312 0,2134112 -94,09203 1407,762 1407,999 ........... +STOPREASON LABEL Cycle Limit Stop Reason diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#1.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#1.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#1.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#1.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#10.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#10.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#10.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#10.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#11.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#11.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#11.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#11.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#12.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#12.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#12.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#12.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#13.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#13.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#13.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#13.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#14.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#14.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#14.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#14.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#15.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#15.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#15.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#15.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#16.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#16.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#16.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#16.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#17.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#17.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#17.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#17.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#18.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#18.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#18.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#18.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#19.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#19.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#19.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#19.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#2.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#2.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#2.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#2.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#20.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#20.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#20.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#20.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#3.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#3.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#3.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#3.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#4.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#4.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#4.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#4.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#5.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#5.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#5.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#5.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#6.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#6.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#6.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#6.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#7.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#7.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#7.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#7.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#8.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#8.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#8.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#8.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#9.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#9.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A Charge_#9.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A Charge_#9.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#1.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#1.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#1.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#1.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#10.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#10.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#10.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#10.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#11.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#11.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#11.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#11.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#12.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#12.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#12.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#12.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#13.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#13.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#13.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#13.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#14.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#14.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#14.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#14.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#15.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#15.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#15.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#15.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#16.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#16.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#16.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#16.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#17.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#17.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#17.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#17.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#18.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#18.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#18.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#18.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#19.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#19.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#19.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#19.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#2.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#2.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#2.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#2.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#20.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#20.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#20.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#20.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#3.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#3.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#3.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#3.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#4.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#4.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#4.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#4.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#5.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#5.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#5.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#5.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#6.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#6.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#6.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#6.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#7.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#7.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#7.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#7.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#8.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#8.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#8.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#8.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#9.DTA b/docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#9.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,1A/0,1A D-Charge_#9.DTA rename to docs/utils/gamry_cellcycling/step_0,1A/CHARGE_DISCHARGE/0,1A D-Charge_#9.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3 Cycling.DTA b/docs/utils/gamry_cellcycling/step_0,3A/0,3 Cycling.DTA new file mode 100644 index 0000000..bc372c0 --- /dev/null +++ b/docs/utils/gamry_cellcycling/step_0,3A/0,3 Cycling.DTA @@ -0,0 +1,85 @@ +EXPLAIN +TAG PWR800_CYCLICCHARGEDISCHARGE +TITLE LABEL Capacity Curve Test Identifier +DATE LABEL 22/7/2022 Date +TIME LABEL 16:37:47 Time +NOTES NOTES 1 Notes... + +PSTAT PSTAT IFC1010-29239 Potentiostat +CAPACITY QUANT 2,00000E+000 Capacity (A-hr) +CYCLES IQUANT 10 Cycles (#) +FIRSTSTEP SELECTOR 0 First Step +CELLTYPE SELECTOR 1 Cell Type +WORKINGCONNECTION SELECTOR 0 Working Connection +MAXCHARGETIME VARIABLEANDUNITS 4,32000E+004 s 1,20000E+001 hour(s) Max Charge Time +CHARGEMODE MULTIPARAM 0 3,00000E-001 Charge Mode Constant Current Amp(s) +CHARGECURRENT QUANT 0,3 Charge Current (A) +VOLTAGEFINISH TWOPARAM F 1,00000E-003 3,60000E+003 Voltage Finish I (A) < Max Time(s) +SAMPLETIME QUANT 5,00000E+000 Sample Period (s) +CHARGESTOPAT1 MULTIPARAM 2 9,00000E-001 Stop At 1 |Voltage| > Limit V +CHARGESTOPAT2 MULTIPARAM 0 0,00000E+000 Stop At 2 None N/A +IRCOMP TOGGLE F IR Measure +EOC QUANT -0,0196608 Open Circuit (V) +MAXDISCHARGETIME VARIABLEANDUNITS 4,32000E+004 s 1,20000E+001 hour(s) Max Discharge Time +DISCHARGEMODE MULTIPARAM 0 3,00000E-001 Discharge Mode Constant Current Amp(s) +VOLTAGEFINISH TWOPARAM F 1,00000E-003 3,60000E+003 Voltage Finish I (A) < Max Time(s) +DISCHARGESTOPAT1 MULTIPARAM 1 2,00000E-001 Stop At 1 |Voltage| < Limit V +DISCHARGESTOPAT2 MULTIPARAM 0 0,00000E+000 Stop At 2 None N/A +LOOPEND1 MULTIPARAM 0 0,00000E+000 Loop End 1 None N/A +LOOPEND2 MULTIPARAM 0 0,00000E+000 Loop End 2 None N/A +PSTATMODEL IQUANT 64 Pstat Model +PSTATSECTION LABEL IFC1010-29239 Pstat Section +PSTATSERIALNO LABEL 29239 Pstat Serial Number +CTRLMODE IQUANT 0 Control Mode +ELECTROMETER IQUANT 0 RE=0 or CS=1 +IESTAB IQUANT 0 I/E Stability +CASPEED IQUANT 4 Control Amp Speed +CONVENTION IQUANT 1 Current Convention +ICHRANGE IQUANT 2 Ich Range +ICHRANGEMODE TOGGLE T Ich Auto Range +ICHOFFSETENABLE TOGGLE F Ich Offset Enable +ICHOFFSET QUANT 0 Ich Offset (V) +ICHFILTER IQUANT 1 Ich Filter +VCHRANGE IQUANT 1 Vch Range +VCHRANGEMODE TOGGLE T Vch Auto Range +VCHOFFSETENABLE TOGGLE F Vch Offset Enable +VCHOFFSET QUANT 0 Vch Offset (V) +VCHFILTER IQUANT 1 Vch Filter +IERANGELOWERLIMIT IQUANT 4 I/E Range Lower Limit +IERANGEMODE TOGGLE T I/E AutoRange +IERANGE IQUANT 12 I/E Range +ACHSELECT IQUANT 0 Ach Select +ACHRANGE IQUANT 2 Ach Range +ACHOFFSETENABLE TOGGLE F Ach Offset Enable +ACHOFFSET QUANT 0 Ach Offset (V) +ACHFILTER IQUANT 1 Ach Filter +SENSECABLEID IQUANT 13 Sense Cable ID +PWRCABLEID IQUANT 13 Power Cable ID +DCCALDATE LABEL 8/10/2021 DC Calibration Date +ACCALDATE LABEL 7/8/2021 AC Calibration Date +FRAMEWORKVERSION LABEL 7.8.4 Framework Version +INSTRUMENTVERSION LABEL 4.42 Instrument Version +CAPACITYCURVE TABLE + Pt Time Type Cycle Charge Duration Vstart Vend Energy Tstart Tend Over + # s # # C s V V J deg C deg C bits + 1 2022 0 1 606,733 2021,855 0,7828082 0,8862329 506,9768 1408,579 1408,655 ........... + 2 6328 1 1 1292,238 4305,97 0,5269501 0,2371166 -459,6035 1408,486 1408,864 ........... + 3 10738 0 2 1323,531 4409,985 0,690457 0,8903232 1051,462 1408,783 1408,734 ........... + 4 14995 1 2 1277,566 4257,005 0,5082713 0,2391366 -451,4034 1408,747 1408,629 ........... + 5 19293 0 3 1289,715 4297,905 0,6964434 0,8923084 1029,682 1408,659 1408,842 ........... + 6 23467 1 3 1252,569 4173,717 0,4917842 0,2413853 -439,2256 1408,814 1409,146 ........... + 7 27728 0 4 1278,876 4261,18 0,6981552 0,8939655 1021,538 1409,083 1409,234 ........... + 8 31854 1 4 1238,064 4125,974 0,4929759 0,2358392 -437,2758 1409,244 1408,798 ........... + 9 36029 0 5 1252,79 4174,829 0,7017861 0,8945607 1002,092 1409,059 1409,187 ........... + 10 40065 1 5 1211,056 4035,969 0,4833447 0,2351396 -424,5301 1409,187 1409,193 ........... + 11 44150 0 6 1225,946 4084,833 0,705383 0,8950153 982,286 1408,944 1409,141 ........... + 12 48093 1 6 1183,285 3942,884 0,4763663 0,2399907 -412,4732 1409,001 1408,97 ........... + 13 52077 0 7 1195,461 3983,817 0,7078361 0,8956763 959,75 1408,786 1408,984 ........... + 14 55911 1 7 1150,59 3833,917 0,4690264 0,2389952 -398,8906 1408,891 1408,852 ........... + 15 59783 0 8 1162,004 3871,797 0,7118465 0,8955721 934,7368 1408,849 1408,874 ........... + 16 63543 1 8 1128,198 3759,838 0,4636965 0,2400063 -389,2631 1408,783 1409,009 ........... + 17 67369 0 9 1148,211 3825,828 0,7140074 0,8962296 923,7224 1408,866 1409,045 ........... + 18 71088 1 9 1116,043 3718,825 0,4637381 0,2377521 -385,7463 1408,91 1409,044 ........... + 19 74851 0 10 1129,14 3762,8 0,7145124 0,8959066 907,9191 1408,924 1409,011 ........... + 20 78499 1 10 1094,208 3646,565 0,4618044 0,2340831 -378,5841 1409,013 1408,992 ........... +STOPREASON LABEL Cycle Limit Stop Reason diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#1.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#1.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#1.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#1.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#10.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#10.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#10.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#10.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#2.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#2.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#2.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#2.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#3.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#3.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#3.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#3.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#4.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#4.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#4.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#4.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#5.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#5.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#5.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#5.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#6.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#6.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#6.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#6.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#7.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#7.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#7.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#7.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#8.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#8.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#8.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#8.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#9.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#9.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A Charge_#9.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A Charge_#9.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#1.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#1.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#1.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#1.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#10.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#10.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#10.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#10.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#2.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#2.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#2.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#2.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#3.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#3.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#3.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#3.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#4.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#4.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#4.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#4.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#5.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#5.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#5.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#5.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#6.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#6.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#6.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#6.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#7.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#7.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#7.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#7.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#8.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#8.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#8.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#8.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#9.DTA b/docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#9.DTA similarity index 100% rename from docs/utils/gamry_cellcycling/step_0,3A/0,3A D-Charge_#9.DTA rename to docs/utils/gamry_cellcycling/step_0,3A/CHARGE_DISCHARGE/0,3A D-Charge_#9.DTA diff --git a/docs/utils/gamry_cellcycling/step_0,3A/Plot V vs capacity.py b/docs/utils/gamry_cellcycling/step_0,3A/Plot V vs capacity.py new file mode 100644 index 0000000..24587e4 --- /dev/null +++ b/docs/utils/gamry_cellcycling/step_0,3A/Plot V vs capacity.py @@ -0,0 +1,91 @@ +from echemsuite.cellcycling import read_cycles, build_cycles, time_adjust +import matplotlib.pyplot as plt + +import numpy as np + +################################################################################ +# OPENING FILES # +################################################################################ + +# Make a new empty list for each different experiment +experiment_1 = [ + r"C:/Users/EnekoAzàceta/Green Energy Storage/GES_Ricerca - Documenti/Projects/RD/XXXXYYYY - Ti Standardization/20220722-0,7TiOSO4 in 3H2SO4 vs 0,5FeCl2 in 3H2SO4/0,3 Cycling/CHARGE_DISCHARGE/0,3A Charge_#1.DTA", + r"C:/Users/EnekoAzàceta/Green Energy Storage/GES_Ricerca - Documenti/Projects/RD/XXXXYYYY - Ti Standardization/20220722-0,7TiOSO4 in 3H2SO4 vs 0,5FeCl2 in 3H2SO4/0,3 Cycling/CHARGE_DISCHARGE/0,3A D-Charge_#1.DTA", + # r"", + # r"", + # r"", + # r"", + # r"", + # r"", + ] + + +################################################################################ +# READING FILES # +################################################################################ + +# Make a "cycles" list for each different experiment. Remember, use +# build_cycles() for .DTA files +# read_cycles() for .mpt files + +cycles_1 = build_cycles(experiment_1) + + +################################################################################ +# CREATING PLOT # +################################################################################ + +plt.title("CH/DCH Profiles vs. H2 pressure") # plot title +plt.xlabel("Capacity (mAh)", + fontsize =14, + fontweight="bold") # x axis label +plt.ylabel("Voltage vs. Ref (V)", + fontsize =14, + fontweight="bold") # y axis label + +# Create separate plots for each experiment. They will all be shown in the same graph! +# +# NOTE: if you want to display all the cycles, set each plots_X variable to: +# +# plots_X = range(cycles_X.number_of_cycles) +# +# If instead you want to select specific cycles, use +# +# plots_X = [a, b, c] +# +# where a, b, c are the number of the cycles you want to display +# +# plots_1 = [0, 1, 2] + +# V = 20 #Volume elettrolita (mL) +# plots_1 = range(cycles_1.number_of_cycles) +# for i in plots_1: +# plt.plot( +# cycles_1[i].Q/V, cycles_1[i].voltage, label=f"Cycle #{cycles_1[i].number}", +#) + +# lst_colore = ["#696969","#000000","#696969","#000000"] +# lst_shapes = [":","-","-.","-"] +# V = 1 #Volume elettrolita (mL) +for cycle in cycles_1: + plt.plot( + cycle.Q, + cycle.voltage, label=f"Cycle #{cycle.number+1}", + # ls= lst_shapes.pop(0), + # c=lst_colore.pop(0) + ) + +plt.xticks(np.arange(0, 1500, 100)) +plt.xlim(0, ) +plt.yticks(np.arange(0,2.0,0.2)) +#plt.ylim(0.6, 1.8) +################################################################################ +# ADDITIONAL PLOT SETTINGS # +################################################################################ + +plt.grid(which="major", c="#DDDDDD") +plt.grid(which="minor", c="#EEEEEE") +plt.legend() #da impostare posizione/taglia/font... +plt.tight_layout() + +plt.show() diff --git a/echemsuite/cellcycling/cycles.py b/echemsuite/cellcycling/cycles.py index 1bd2ab4..b877559 100644 --- a/echemsuite/cellcycling/cycles.py +++ b/echemsuite/cellcycling/cycles.py @@ -58,6 +58,7 @@ def __len__(self): def __repr__(self): return f""" + ├─ timestamp: {self.timestamp} ├─ total number of cycles: {len(self._cycles)} ├─ number of visible cycles: {len(self)} └─ reference cycle: {self.reference}""" @@ -96,6 +97,21 @@ def unhide(self, unhide_indices: List[int]) -> None: self.get_numbers() + @property + def timestamp(self) -> datetime: + """ + The timestamp at which the measurement has been started. If the first cycle is complete, + the timestamp will be that of its charge halfcycle else the timestamp of the discharge + halfcycle will be returned. + + Returns + ------- + datetime + The timestamp object encoding the start of the measurement. + """ + first_cycle = self._cycles[0] + return first_cycle.charge.timestamp if first_cycle.charge is not None else first_cycle.discharge.timestamp + @property def capacity_retention(self) -> List[float]: """ diff --git a/echemsuite/cellcycling/experiments.py b/echemsuite/cellcycling/experiments.py index f92431c..8d67c8c 100644 --- a/echemsuite/cellcycling/experiments.py +++ b/echemsuite/cellcycling/experiments.py @@ -2,12 +2,15 @@ from typing import List, Tuple, Dict from datetime import datetime, timedelta from copy import deepcopy -from os.path import isfile +from warnings import warn +from os import listdir +from os.path import isfile, isdir, join import openpyxl import pandas as pd import numpy as np +from echemsuite.cellcycling.read_input import quickload_folder from echemsuite.cellcycling.cycles import CellCycling, Cycle, HalfCycle @@ -282,21 +285,29 @@ def from_Biologic_battery_module(cls, path: str) -> RateExperiment: return obj @classmethod - def from_ARBIN_csv_file(cls, csv_path: str, variation_threshold: float = 1.) -> RateExperiment: + def from_ARBIN_csv_file( + cls, + csv_path: str, + variation_threshold: float = 1.0, + current_digits: int = 3, + ) -> RateExperiment: """ Classmethod dedicated to the construction of a RateExperiment object starting from a ARBIN csv file. Please - notice that the ARBIN .csv files do not specify the current associated to each step explicitly, as such the + notice that the ARBIN .csv files do not specify the current associated to each step explicitly, as such the average current per halfcycle will be used in the definition of the various rate steps. The division of the cell-cyclicing objects in different rate steps is generated automatically by the method using a fixed percentage threshold value. When the percentage variation threshold is exceeded the cell-cycling object is - moved to a new current step. + moved to a new current step. The current steps of the experiments are computed automatically as averages and + rounded to a user specified number of digits (default: 3) Arguments --------- csv_path: str The path to the `.csv` file generated from the ARBIN battery cycler. variation_threshold: float - The threshold (in percentage) to be used in the indetification of a new current step (default: 1%) + The threshold (in percentage) to be used in the indetification of a new current step (default: 1%). + current_digits: int + Number of digits to be kept in saving the average current values computed form the data-files (default: 3). Raises ------ @@ -399,7 +410,7 @@ def parse_arbin_timestamp(timestamp_str: str) -> datetime: # If the relative error exceeds the 1% threshold or we reached the end of the halfcycles list trigger the # creation of the cell-cycling object corresponding to the current step - if relative_error > 1 or hidx == len(halfcycles) - 1: + if relative_error > variation_threshold or hidx == len(halfcycles) - 1: # If a charge halfcycle is left in the buffer conclude the cycle buffer with the last charge if charge is not None: cycle = Cycle(number=len(cycles_buffer) + 1, charge=charge, discharge=None) @@ -425,12 +436,87 @@ def parse_arbin_timestamp(timestamp_str: str) -> datetime: charge = None # Format the current steps list by rounding the current values to the third decimal place - current_steps = [round(i, 3) for i in current_steps] + current_steps = [round(i, current_digits) for i in current_steps] # Creat a RateExperiment object with the obtained data ad return it obj = cls(current_steps=current_steps, cellcycling_steps=cellcycling_steps) return obj + @classmethod + def from_GAMRY_folder_tree(cls, basefolder: str, current_digits: int = 3) -> RateExperiment: + """ + Classmethod dedicated to the construction of a RateExperiment object starting from a folder tree generated by + GAMRY instruments during multi-step cycling experiments. The folder structure expected is the following: a + `basefolder` containing a set of step data-folders (with variable names) each of which contains a `CHARGE_DISCHARGE` + folder containing the desired .DTA files encoding the charge/discharge cell-cycling at a given current. + The current steps of the experiments are computed automatically as averages and rounded to a user specified + number of digits (default: 3) + + Arguments + --------- + basefolder: str + The path to the `basefolder` containing the data-folders for each step. + current_digits: int + Number of digits to be kept in saving the average current values computed form the data-files (default: 3). + + Raises + ------ + ValueError + Exception raised if the specified basefolder does not exist + RuntimeError + Exception raised if no cell-cycing data is found in the specified path. + """ + # Check if the specified basefolder exists + if not isdir(basefolder): + raise ValueError(f"The folder '{basefolder}' does not exist.") + + # Define an empty list to store all the cell-cycling experimental data + cellcycling_steps: List[CellCycling] = [] + + # Cycle over the content of the basefolder + for folder_name in listdir(basefolder): + # Define an hypotetical search path for the CHARGE_DISCHARGE target folder + path = join(join(basefolder, folder_name), "CHARGE_DISCHARGE") + + # Check if the folder containing the data is found + if not isdir(path): + continue + + # Try to load the data from the CHARGE_DISCHARGE folder if the load fails (e.g. the folder is empty) + # return a warning messange to the user + cellcycling: CellCycling = None + try: + cellcycling = quickload_folder(path, ".DTA") + except: + warn(f"Failed to load file from {path}. The folder will be skipped") + else: + cellcycling_steps.append(cellcycling) + + # Check if data has been loaded, if not raise an exception + if cellcycling_steps == []: + raise RuntimeError("No valid GAMRY cell-cycling data has been found in the specified folder.") + + # Sort the cell-cycling objects based on their timestamp + cellcycling_steps.sort(key=lambda x: x.timestamp) + + # Evaluate the current value for each step computing the average current during the charge and discharge halfcyles + current_steps: List[float] = [] + for cellcycling in cellcycling_steps: + iavg: float = 0 + nsamples: int = 0 + for cycle in cellcycling: + for halfcycle in [cycle.charge.current, cycle.discharge.current]: + for current in halfcycle: + iavg += abs(current) + nsamples += 1 + + iavg = round(iavg / nsamples, current_digits) + current_steps.append(iavg) + + # Create a RateExperiment object and return it + obj = cls(current_steps=current_steps, cellcycling_steps=cellcycling_steps) + return obj + @property def capacity_retention(self) -> List[float]: """ diff --git a/echemsuite/cellcycling/read_input.py b/echemsuite/cellcycling/read_input.py index 25eba49..80b408f 100644 --- a/echemsuite/cellcycling/read_input.py +++ b/echemsuite/cellcycling/read_input.py @@ -733,3 +733,26 @@ def get_cellcycling(self, custom_order: List[str] = [], clean: bool = False) -> cycles = self.get_cycles(custom_order=custom_order, clean=clean) return CellCycling(cycles) + + + +def quickload_folder(folder: str, extension: str, clean: bool = False) -> CellCycling: + """ + Simple helper function to be used in scripting to quicky load cell-cycling data from a user-specified folder. + The function uses the `fetch_from_folder` method of the file manager class and applies all the default options. + If a custom order needs to be specified, the function cannot be used. + + Arguments + --------- + folder: str + The path to the folder where the data are stored. + extension: str + The extension of the file to be loaded. + clean: bool + If set to True, will activate the clean option in the `get_cellcycling` method used to generate the output + CellCycling object + """ + manager = FileManager() + manager.fetch_from_folder(folder, extension) + cellcycling = manager.get_cellcycling() + return cellcycling \ No newline at end of file diff --git a/meta.yaml b/meta.yaml index 2ef03bc..742cc0f 100644 --- a/meta.yaml +++ b/meta.yaml @@ -1,5 +1,5 @@ {% set name = "GES-echem-suite" %} -{% set version = "0.2.1b" %} +{% set version = "0.2.1b2" %} @@ -20,12 +20,12 @@ build: requirements: host: - - python>=3.7 + - python>=3.8 - pip - setuptools run: - - python>=3.7 + - python>=3.8 - numpy - pandas>=1.3.0 - scipy diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..b5caed1 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,30 @@ +[metadata] +name = GES-echem-suite + +[options] +packages = + echemsuite + echemsuite.cellcycling + echemsuite.cyclicvoltammetry +install_requires = + numpy + pandas>=1.3.0 + scipy + matplotlib + openpyxl + palettable + +python_requires = >=3.8 +package_dir = =. +zip_safe = no + +[options.extras_require] +testing = + pytest>=6.0 + pytest-cov>=2.0 + mypy>=0.910 + flake8>=3.9 + tox>=3.24 + +[flake8] +max-line-length = 160 \ No newline at end of file diff --git a/setup.py b/setup.py index 475e118..4e374f8 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setuptools.setup( name="GES-echem-suite", - version="0.2.1b", + version="0.2.1b2", description="", long_description="", packages=["echemsuite"], diff --git a/tox.ini b/tox.ini index df22848..a054430 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,11 @@ [tox] -minversion = 3.7.0 -envlist = py37, py38, py39, py310 +minversion = 3.8.0 +envlist = py38, py39, py310 isolated_build = true skipsdist = True [gh-actions] python = - 3.7: py37 3.8: py38 3.9: py39 3.10: py310