Skip to content

lexolf/cycler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cycler

About

A pair of scripts that takes an .xlsx file generated by NEWARE BTS (Battery Testing System) Software and separates the data into CSV files easily readable by data analysis programs like Origin, and then plots selected data based on generated CSV files.

Requirements

The scripts require Python 3 (tested with Python 3.8.0 32-bit and 64-bit versions).

The required libraries:

  • pandas (for creating dataframes from xlsx and converting them to csv)
  • xlrd (for reading xlsx files)

The scripts are intended for laboratory internal use and thus is in very crude form.

Use

Use: run either of the scripts in the folder with XLSX files that need to be converted.

script.py:

The function record_to_csv renders recorded curves into separate csv file.

The function cycle_to_csv renders recorded capacities into separate csv file.

The function xlsx_to_csv(file, mode="compact") uses three modes ("full", "compact" and "ultracompact") with the "full" version converting whole sheets and "ultracompact" version leaving only strictly essential data (capacity, cycles, voltage), "compact" version leaves out 'unnecessary' columns like Temperature, Energy, etc. which are not used in our experimental setups. The "full" mode is recommended if plot.py is intended to use, and it is set by default.

The parameters must be changed manually as of now, there is no direct command prompt for that.

plot.py:

The function plot_cycle plots a Cycle Number vs Specific Capacity graph on the left y axis, and Coulombic Efficiency on the right y axis.

The function plot_record plots a Specific Capacity vs Potential graph for all cycles in file (currently only such option, choice of cycles in the works).

There are currently no options to restrict plotting to individual cycles (by index or by selected c-rate/current density). This is a work in progress and I intend to add this functionality.

There is no difference between scripts in .py filetype and Jupyter Notebook (which is easier for testing purposes and thus remains for my convenience).

plot_record.py

The function plot_record is a modified one from plot.py script. The parameters interval, start, and end define the range of plotting cycles.

To-Dos

  1. Add an option to choose cycles by index for plotting recorded curves (avoid cluttering). [Done using parameters in plot_record.py]
  2. Add an option to choose range of cycles for plotting cycle data (e.g., separate c-rate from record or exclude first cycles). [Done using parameters in plot_record.py]
  3. Add functionality that auto-detects if the file is "resource"-type or "c-rate"-type and label the intervals on graphs accordingly.
  4. Display the mass of electrodes on graph (maybe in title).
  5. Display the used current densities on graph (likely in legend).
  6. Extract values from data: cycle and rate stability (%), maximum specific capacity (mA*h/g), polarisation (difficult!), plateau voltages (difficult!).
  7. Make it possible to plot data from several cells on one graph.
  8. Make the scripts more user-friendly.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published