Skip to content

cellpy logo

cellpy

A library for analysing data from battery and cell cycling tests.

cellpy package Documentation Status Downloads DOI

cellpy reads data from battery cycling instruments and turns it into one consistent format. It also calculates the derived quantities for you (capacities, coulombic efficiencies, incremental capacity), so you don't have to write that bookkeeping yourself.

import cellpy
from cellpy.utils import example_data

c = example_data.raw_file()  # a small Arbin file, downloaded once
c.data.summary["charge_capacity_gravimetric"]  # mAh/g, one row per cycle
import cellpy

c = cellpy.get("my_cell.res", instrument="arbin_res", mass=0.85)  # mass in mg
c.data.summary["charge_capacity_gravimetric"]  # mAh/g, one row per cycle

Where to start

  • New to cellpy?


    Install it and take a guided tour on data that ships with cellpy: load, plot and export a cell, then do the same with your own file.

    Your first hour

  • Have data to load?


    Worked examples from a single file to a whole batch, and one page for each of the other instruments.

    Tutorials

  • Know what you want to do?


    One page of tasks phrased as questions ("how do I get areal capacity?"), each with a short answer.

    How do I…?

  • Something not working?


    A file won't load, or a number looks wrong: fixes listed by symptom and error message.

    Troubleshooting

You can also look up what the frames and columns mean or the API reference, or use cellpy from an AI agent.

Supported instruments

Tester instrument=
Arbin arbin_res (.res), arbin_sql, arbin_sql_7, arbin_sql_csv, arbin_sql_xlsx, arbin_sql_h5
Maccor maccor_txt (several export models)
Neware neware_nda, neware_txt, neware_xlsx
PEC pec_csv
BioLogic biologics_mpr
Battery Data Format (BatMo) batmo_bdf
Anything else custom (describe the layout in a YAML file)

cellpy.print_instruments() prints the list for your installed version. If your tester isn't on it, see Other file formats, Writing a custom loader, or write an instrument loader plugin from your own package.

Upgrading from cellpy 1.x

Version 2 changed the frames, the column names and the file format. What you already know still applies, but some names are different now. The migration guide covers what changed and what to do about it. The release history lists every change.

Citing cellpy

If cellpy saved you time in a paper, thesis or report, please cite it. Citations are how open-source tools like this stay visible and funded. More about the project is under About.