Skip to main content

EIS Fitting

EIS Fitting is a desktop application for exploring, cleaning, and fitting electrochemical impedance spectroscopy (EIS) data exported by BioLogic as .mpt (PEIS) files. It combines an interactive Nyquist plot with circuit parameter editing, cycle-aware analysis, DRT-assisted outlier detection, and batch fitting, so spectra can be reviewed and fitted without leaving the GUI.

The application:

  • Supports multiple files and multiple measurement cycles
  • Displays spectra beside an editable equivalent-circuit parameter table
  • Lets you include or exclude individual points while preserving cycle state
  • Runs fitting and outlier detection in the background so the GUI stays responsive
  • Uses bayes-drt2 ridge analysis to identify outliers and initialize circuit fits
  • Compares measured and fitted points at identical frequencies with residual connectors
  • Provides a sortable spectra explorer for cycle and acquisition metadata
  • Exports fitted parameters and spectrum metadata to CSV and a ready-to-run Python script

Installation

Requirements

  • Windows, macOS, or Linux with a desktop environment
  • Python 3.14 or newer
  • uv, the environment and dependency manager used by this project

Install from GitHub

In PowerShell, Terminal, or a shell:

git clone https://github.com/jaroslav-herman/EIS_fitting.git
cd EIS_fitting
uv sync

uv sync creates the project environment and installs the versions recorded in uv.lock, including the required EIS and DRT libraries. Re-run it after pulling changes to update the environment.

Start the application

From the repository directory, run:

uv run python main.py

To open a BioLogic file immediately and select a cycle:

uv run python main.py PEIS_at_N2_flow_80_sccm_automated_01_PEIS.mpt --cycle 1

On Windows, run_gui.cmd can also be double-clicked. It checks that uv is available and starts the application from the repository directory.

If uv is not available, install it using the official instructions linked above, then open a new terminal and repeat uv sync.

Run

The command-line entry point also accepts options for the initial control channel, outlier threshold, and equivalent-circuit model:

uv run python main.py PEIS_at_N2_flow_80_sccm_automated_01_PEIS.mpt --cycle 1 --threshold 1.0 --circuit "R0-L0-p(R1,CPE1)"

GUI controls

  • Click a point: toggle include/exclude
  • Cycle arrows or selector: move between cycles
  • Spectra explorer: select a spectrum or sort rows by source file, cycle, voltage, current, point count, or frequency limits
  • Fitting model: select a preset or enter an impedance.py circuit string, then set it
  • Apply to current cycle: use the frequency range only for the displayed spectrum
  • Apply to all cycles: use the frequency range for every spectrum in the file
  • Outliers: current: run the bayes-drt2 ridge analysis on active points only, apply its outlier mask without reactivating excluded points, and initialize the EEC fit from its ohmic resistance, inductance, and strongest DRT peaks
  • Outliers: all cycles: perform the same active-point analysis and EEC initialization for every spectrum in the background
  • Fit spectrum: fit included points with the parameter table values
  • Batch fit from current: fit toward higher cycles, using each result to initialize the next
  • Export to Python: save fitted parameters and spectrum metadata from all loaded files to CSV, create a ready-to-run pandas script, and open it in VS Code or another available editor
  • Reset points: include all points and clear detected outliers

The File menu contains additive multi-file data import, project load/save, mask saving, fit-parameter and Python-workspace exports, and exit commands. Import accepts several .mpt files at once and keeps previously loaded spectra.

The Fit menu fits the selected spectrum or batch-fits upward/downward through the explorer's visible order. Metadata-limited batches use the last clicked numeric explorer column and stop at its nearest available target value.

Outlier detection never runs automatically. Cycle state is retained while the GUI is open.

Keyboard shortcuts:

  • Alt+A: copy fitted values from the previous cycle into the current initial values
  • Alt+D: copy fitted values from the next cycle into the current initial values
  • Alt+S: fit the selected spectrum
  • Ctrl+O: import another .mpt data file
  • Ctrl+Shift+O: load an EIS fitting project
  • Ctrl+S: save the EIS fitting project

Code structure

  • eis_model.py: GUI-independent project and per-cycle state
  • eis_services.py: file loading, outlier detection, and fitting operations
  • eis_project.py: versioned project persistence and fit CSV export
  • eis_gui.py: Tk interface, plot rendering, and event coordination
  • main.py: command-line entry point

Download files

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

Source Distribution

eisyfit-0.1.2.tar.gz (254.6 kB view details)

Uploaded Source

Built Distribution

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

eisyfit-0.1.2-py3-none-any.whl (277.5 kB view details)

Uploaded Python 3

File details

Details for the file eisyfit-0.1.2.tar.gz.

File metadata

  • Download URL: eisyfit-0.1.2.tar.gz
  • Upload date:
  • Size: 254.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for eisyfit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1f83bc51d59dce53b608cab6dfdf5ec3b2e73492325c30dd792c963276f06420
MD5 71ae85a7337d5865abee37db0b5c49cd
BLAKE2b-256 97f06d36e2d398b025b9aa9af804f21debd5bc4cfcf65f140a15d09d482d9240

See more details on using hashes here.

File details

Details for the file eisyfit-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: eisyfit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 277.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for eisyfit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e64828be1b9e56bf95f92068b17bef1b4eb56ad2b79e4e32c838b8dc7707568f
MD5 25d20d2bc502830b8f80427831fc9b31
BLAKE2b-256 85c3c54073ca7fa9acdb1a6f27f230614dabd9e01205f2aa399286f46de039cb

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.4

2 files

0.1.3

2 files

This release

0.1.2 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page