Equivalent circuit fitting with Zahner Analysis from Python

Zahner Analysis Python Library

The Python package zahner_analysis connects your scripts with Zahner Analysis. Equivalent circuit models are built and tried in the graphical user interface, where the Magic Wand tool finds suitable start values; Python then fits these models to any number of impedance spectra and reads the elements and parameters of the result for further processing, for example to compare a series of measurements.

Fitting and Simulation by Zahner Analysis

For fitting, the library does not calculate itself: it is a client for the REST interface of the optional Zahner Analysis module Remote Evaluation, which is selected when Zahner Analysis is installed. Zahner Analysis performs the fit, the simulation of a model and the Z-HIT evaluation, on the same computer or on another one in the network; on Windows the library starts it when it is not running. Fitting needs a licensed Zahner Analysis, version 3.2.1 or later.

Import, Plots and IM7 Data

Without Zahner Analysis, the library reads the measurement files of Zahner Lab and Thales: the .zmx files of the IM7, impedance spectra (.ism), cyclic voltammograms (.isc), current-voltage curves (.iss), polarizations (.isw) and sequencer data. With Zahner Analysis 3.3.9 or later, every impedance of a .zmx file, for example of each PAD4 channel, can be fitted on its own. Bode and Nyquist plots are drawn with Matplotlib, impedance spectra can be saved as .ism files again, and a short-open-load correction compensates the influence of the measurement setup.

Together with the measurement, the evaluation runs automatically: with Thales Remote, impedance spectra measured with Thales (ZENNIUM and IM6 series and older models) are evaluated right after the measurement; measurements of the IM7 come as .zmx files from zahner_link or Zahner Lab.

Installation, Examples and Documentation

The package is installed from PyPI with pip install zahner-analysis and needs Python 3.11 or later. The Zahner-Analysis-Python repository on GitHub holds the source code and the examples as Jupyter notebooks, each also as a plain Python file: the first fit, all fit options, series fits, Z-HIT, IM7 data with several channels and the setup compensation. The documentation describes every class and function; the REST interface is described as an OpenAPI specification.

The library is free software under the MIT License. Zahner Analysis itself is listed under Downloads below. Questions go to our support team, bug reports and wishes to the issue tracker on GitHub.

The key features at a glance:

  • Fits equivalent circuit models to impedance spectra from Python
  • Fit, simulation and Z-HIT through the REST interface of Zahner Analysis
  • Reads the .zmx files of the IM7 and the .ism, .isc, .iss and .isw files of Thales
  • Bode and Nyquist plots with Matplotlib
  • Examples for series fits, IM7 channels and setup compensation
  • pip install zahner-analysis: Python 3.11 or later, MIT License

Downloads

Interested and want to know more?

Our team is happy to answer your questions and to help you find the right solution for your application.

Contact us