OSS Python toolkit for TOYO battery cycler data (charge/discharge, dQ/dV, cycle stats). Installable from PyPI into Origin's embedded Python.
Project description
echemplot
OSS Python toolkit for TOYO battery cycler data.
Reads output from TOYO System battery charge/discharge testers, computes cycle capacity, Coulombic efficiency, dQ/dV curves, and summary statistics. Pure Python, installable from PyPI — including into OriginLab's embedded Python.
- PyPI: https://pypi.org/project/echemplot/
- Docs: https://tomooki.github.io/toyo-battery/
- Changelog: CHANGELOG.md
Status: pre-alpha (0.1.x). Public API is unstable and may change without deprecation until a future stable release.
Installation
# Core library only (numpy, pandas, scipy)
pip install echemplot
# Pick one or more extras:
pip install "echemplot[plot]" # Matplotlib plotting
pip install "echemplot[plotly]" # Plotly + Kaleido (static image export)
pip install "echemplot[cli]" # echemplot CLI (typer + rich)
pip install "echemplot[gui]" # Tk desktop app (matplotlib)
# Everything non-Origin in one shot
pip install "echemplot[all]"
The [origin] extra has no runtime deps — the echemplot.origin submodule
imports originpro lazily, so it only works inside Origin's embedded Python
(see below).
Quick start
from echemplot import Cell
cell = Cell.from_dir("path/to/cell_dir")
cell.chdis_df.to_csv("chdis.csv") # charge/discharge V-Q curves per cycle
cell.cap_df.to_csv("cycle.csv") # per-cycle capacity + Coulombic efficiency
cell.dqdv_df.to_csv("dqdv.csv") # dQ/dV per cycle
Cell.from_dir() auto-detects three TOYO layouts: 連続データ.csv (native
export), 連続データ_py.csv (pre-normalized), or 6-digit raw files with a
*.PTN pattern file. Mass is read from the PTN file unless you pass
mass=... (grams).
CLI
Install with pip install "echemplot[cli]". All subcommands accept one or
more cell directories plus the shared options --mass, --encoding,
--column-lang.
# {name}_chdis.csv / {name}_cap.csv / {name}_dqdv.csv per cell
echemplot process cell_A cell_B --out ./csvs
# chdis / cycle / dqdv PNGs (one figure per kind, one Axes per cell)
echemplot plot cell_A cell_B --out ./pngs \
--kinds chdis,cycle,dqdv --cycles 1,10,50
# Single stat_table CSV spanning all cells at the given target cycles
echemplot stats cell_A cell_B --cycles 10,50 --out stats.csv
GUI
Install with pip install "echemplot[gui]" and launch:
python -m echemplot.gui
Tk app for interactive directory selection, plot-kind toggles, per-axis ranges, and Savitzky–Golay window tuning for dQ/dV.
Plotting from Python
Matplotlib and Plotly backends expose the same three functions — pick by import path:
from echemplot import Cell
from echemplot.plotting.matplotlib_backend import plot_chdis, plot_cycle, plot_dqdv
# or: from echemplot.plotting.plotly_backend import plot_chdis, plot_cycle, plot_dqdv
cells = [Cell.from_dir(p) for p in ("cell_A", "cell_B")]
fig = plot_cycle(cells)
fig.savefig("cycle.png", dpi=150, bbox_inches="tight") # matplotlib
# fig.write_image("cycle.png") # plotly
Installing into Origin's embedded Python
Open Origin, then in the Origin Python console:
import subprocess
import sys
subprocess.check_call(
[sys.executable, "-m", "pip", "install", "echemplot[origin]"]
)
The [origin] extra pulls in matplotlib so the Tk GUI works out of the box;
the three .otpu graph templates ship inside the wheel. After install, one
line opens the directory picker and pushes results into the active Origin
project:
from echemplot.origin import launch_gui
launch_gui()
For scripted use, echemplot.origin.push_to_origin(cells, ...) populates
the current Origin project with per-cell worksheets, template graphs, and a
stat sheet. It imports originpro lazily, so the submodule is importable
outside Origin (push_to_origin itself raises there).
To run the same Tk GUI outside Origin (matplotlib Toplevel previews,
no Origin write-back), install the [gui] extra and call
from echemplot.gui import launch_gui; launch_gui() instead.
See docs/ORIGIN_SETUP.md for the full workflow.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file echemplot-0.2.2.tar.gz.
File metadata
- Download URL: echemplot-0.2.2.tar.gz
- Upload date:
- Size: 175.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2b8be5a5d8e1f9e0ca41c6861dcdc92e944a32484d0c38e0ad02a933e820ef2
|
|
| MD5 |
88e1ccd5f662751a74e7f14af9a9a8f2
|
|
| BLAKE2b-256 |
61167036d49682a463ada857c37ac06e973f1e748a47dd56685addc6972c653c
|
Provenance
The following attestation bundles were made for echemplot-0.2.2.tar.gz:
Publisher:
publish.yml on tomooki/toyo-battery
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
echemplot-0.2.2.tar.gz -
Subject digest:
d2b8be5a5d8e1f9e0ca41c6861dcdc92e944a32484d0c38e0ad02a933e820ef2 - Sigstore transparency entry: 1397316219
- Sigstore integration time:
-
Permalink:
tomooki/toyo-battery@7b08da0c76f9ab09d28ad559de9cf83c06ed173a -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/tomooki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7b08da0c76f9ab09d28ad559de9cf83c06ed173a -
Trigger Event:
push
-
Statement type:
File details
Details for the file echemplot-0.2.2-py3-none-any.whl.
File metadata
- Download URL: echemplot-0.2.2-py3-none-any.whl
- Upload date:
- Size: 128.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e948efe55b2725f69130da0c400499b2bf8eba0b87b21783f0bc56a4bdba2055
|
|
| MD5 |
bed0fc45982b1b7b3fd6abf0bff7fb9e
|
|
| BLAKE2b-256 |
0d007c3cec4a26a7839c0b643c4801f11ad643e724e01b3f02b3aaac34282fd5
|
Provenance
The following attestation bundles were made for echemplot-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on tomooki/toyo-battery
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
echemplot-0.2.2-py3-none-any.whl -
Subject digest:
e948efe55b2725f69130da0c400499b2bf8eba0b87b21783f0bc56a4bdba2055 - Sigstore transparency entry: 1397316281
- Sigstore integration time:
-
Permalink:
tomooki/toyo-battery@7b08da0c76f9ab09d28ad559de9cf83c06ed173a -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/tomooki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7b08da0c76f9ab09d28ad559de9cf83c06ed173a -
Trigger Event:
push
-
Statement type: