Skip to main content

A tool used to plot EIS data and other battery related data

Project description

eisplottingtools

This package was created during my civil service at EMPA. to process, plot and fit electrochemical impedance spectroscopy (EIS) data.

This package itself centered around the class EISFrame, which itself is a wrapper around a pandas.DataFrame. The EISFrame contains additional methods to plot, fit and manipulate EIS data and also other electrochemical data.

Installation

This package is currently not on PyPI.
To install and use this package fork or clone the repository on GitHub. Move to the folder where the repository is located on your local machine and open a Terminal.

To install run:

> py -m pip install .

to install and editable version use:

> py -m pip install -e .

Example Usage

Step 1: Import data & create EISFrame

To load data and to create an EISFramethe load_datafunction can be used.
The following file types are supported to load data from: csv, txt, mpr, mpt.

import eisplottingtool as ept

data = ept.load_data("Example_Data.mpr")

Step 2: Manipulate Data

An EISFrame is essentially a wrapper around a pandas.DataFrame with additional functionality.
Like a DataFrame the data in an EisFrame can be accessed directly with the index operator [...].

  • int for accessing cycles

Step 3: Define an equivalent circuit

To fit our data an equivalent circuit is needed, defined as a string.
To combine Elements are combined in series by a dash (-) is used. Elements in parallel are wrapped by p( , ).
An element is defined by a symbol made of letters followed by a digit. Implemented components are:

For example the following circuit would be defined as:

Implemented components

Name Symbol Parameters Default Bounds Units
Resistor R R (1e-6, 1e6) Ohm
Capacitance C C (1e-20, 1) Farad
Constant Phase Element CPE CPE_Q (1e-20, 1) Ohm^-1 s^n
CPE_n (0, 1)
Warburg element W W (0, 1e10) Ohm^-1 s^0.5
Warburg short element Ws Ws_R (0, 1e10) Ohm
Ws_T (1e-10, 1e10) s
Warburg open element Wo Wo_R (0, 1e10) Ohm
Wo_T (1e-10, 1e10) s
Warburg short element special Wss Wss_R (0, 1e10) Ohm
Wss_T (1e-10, 1e10) s
Wss_n (0, 1)
Warburg open element special Wos Wos_R (0, 1e10) Ohm
Wos_T (1e-10, 1e10) s
Wos_n (0, 1)

Step 4: Fit the data

Least_squares is a good fitting method but will get stuck in local minima. For this reason, the Nelder-Mead-Simplex algorithm is used to get out of these local minima. The fitting routine is inspired by Relaxis 3 fitting procedure. More information about it can be found on page 188 of revision 1.25 of Relaxis User Manual.

Step 5: visualize the data

Functions

Extended Backus–Naur form (EBNF) parser for a circuit string.

Implements an extended Backus–Naur form (EBNF) to parse a string that describes a circuit Already implemented circuit elements are located in CircuitComponents.py To use a component in the circuit string use its symbol. The symbol can be followed by a digit to differentiate similar components.

To put elements in series connect them through '-' Parallel elements are created by p(Elm1, Elm2,...)

The syntax of the EBNF is given by:

  • circuit = element | element-circuit - element = component | parallel - parallel = p(circuit {,circuit})
  • component = a circuit component defined in circuit_components

From this an equation for the impedance is generated and evaluated.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eisplottingtool-0.1.5.tar.gz (38.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eisplottingtool-0.1.5-py3-none-any.whl (43.5 kB view details)

Uploaded Python 3

File details

Details for the file eisplottingtool-0.1.5.tar.gz.

File metadata

  • Download URL: eisplottingtool-0.1.5.tar.gz
  • Upload date:
  • Size: 38.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for eisplottingtool-0.1.5.tar.gz
Algorithm Hash digest
SHA256 d999b8f1d8375b4b45c6bd05f3f1db1ddb54053f0e4ba03191b94222b20eefdc
MD5 ef5e288ad5014e4890aca6ff933046d6
BLAKE2b-256 d89efe235346aafc330507619c0e8fc65f24054bf7008d6bdecda95c2ca658ff

See more details on using hashes here.

File details

Details for the file eisplottingtool-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: eisplottingtool-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 43.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for eisplottingtool-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 90e18aabcdec1826494f63c625b1dbf9f8f6ab380fc50ee25ba305cdf7d9bcdd
MD5 5d8acc8d58d8e71d5576246dc204d757
BLAKE2b-256 1ebd47ad8d358578aaaca6c823276cdca3eecafcea4b0ab422a9028f71f256c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page