ionworksdata library reads files from
common battery cyclers, auto-detects formats, and normalizes units, timestamps,
and column names.
Supported cyclers
ionworksdata auto-detects the file format when possible and produces a polars
DataFrame with the standard columns.
| Cycler | File types |
|---|---|
| Arbin | .csv, .xlsx, .res |
| BaSyTec | .csv |
| BioLogic | .mpt, .mpr, .txt |
| Maccor | .txt, .csv, .xls, .xlsx |
| Neware | .csv, .xls, .xlsx (multi-sheet supported; automatic Latin-1 fallback for CSVs) |
| Novonix | .csv |
| Repower | .csv |
| Generic CSV | .csv (any CSV with recognized column headers or custom mappings) |
| Generic Parquet | .parquet (any parquet file with recognized column headers or custom mappings) |
| BDF (Battery Data Format) | .bdf, .bdf.gz, .bdf.parquet, .csv |
Custom column mappings
If your CSV uses non-standard column names, map them to the standard names withextra_column_mappings. The reader skips auto-detection for any column
you explicitly map, so values are used as-is without rescaling.
Generic parquet files
For parquet files that don’t follow the BDF spec, use the generic parquet reader. It mirrors the CSV reader’s column-detection strategy — recognizing common aliases for voltage, current, time, and temperature — but skips text-parsing concerns since parquet is strongly typed and has unambiguous column names. No separator, encoding, or quote handling is needed. Use it when you have cycler data already exported to parquet (for example, from an internal pipeline or another tool) and want it normalized into the Ionworks data format. Any.parquet file (except .bdf.parquet) is auto-detected; you can also
select the reader explicitly:
extra_column_mappings
just like with the CSV reader:
BDF does not mandate a current sign convention. The reader normalises current
to the Ionworks convention (positive = discharge) on load, so third-party
BDF files that follow the opposite IEC convention are flipped automatically.
The writer emits whatever convention is in the input DataFrame — pass the
data through
transform.set_positive_current_for_discharge first if you
need to guarantee discharge-positive output.EIS and impedance data
| Instrument | File types |
|---|---|
| BioLogic | .mpt, .mpr, .txt (files containing impedance columns) |
| Gamry | .dta (ZCURVE table) |
Frequency [Hz], Z_Re [Ohm],
Z_Im [Ohm], Z_Mod [Ohm], and Z_Phase [deg].
Troubleshooting
Incorrect current sign convention
Problem: When uploading measurement data, you receive an error like:Current sign convention error: positive current appears to be charge, not discharge.Solution: Ionworks expects positive current = discharge and negative current = charge. If your cycler uses the opposite convention, convert the data before uploading:
Ambiguous current sign convention
Problem: When uploading measurement data, you receive an error like:Current sign convention error: the sign convention is ambiguous.This happens when all current values have the same sign, so the validator cannot determine whether positive means charge or discharge. Solution: Use the same transform — it uses voltage-response analysis (fitting an OCV-R equivalent circuit model under both sign conventions) to infer charge vs. discharge direction even when all currents share the same sign:
Unsigned (magnitude-only) current
Problem: When uploading measurement data, you receive an error like:
Current sign convention error: the current appears to be unsigned
(magnitude-only) but contains both charge and discharge steps. Sign it using
the cycler mode column via
ionworksdata.transform.set_positive_current_for_discharge(data) before
validation.
This fires when every non-rest current sample is positive yet the data clearly
contains both charge and discharge steps — a fingerprint of a cycler that
records current as a magnitude and encodes direction in a separate mode column
rather than in the sign of Current [A]. The issue is distinct from
ambiguous sign convention because it has
a concrete, deterministic fix: re-sign the current from the cycler’s own
charge/discharge labels.
Solution: Run set_positive_current_for_discharge. When it detects an
all-positive non-rest current alongside both charge and discharge steps, it
flips the sign of charge-step samples using the cycler mode column instead of
falling back to the voltage-response heuristic:
CURRENT_SIGN_UNSIGNED — branch on it explicitly if you
want to apply the auto-fix without prompting:
Swapped charge and discharge cumulative columns
Problem: When uploading withvalidate_strict=True, you receive an error
like:
Column ‘Discharge capacity [A.h]’ disagrees with the running integral of ‘max(I, 0)’ over time by up to 96.4% (exceeds 10% tolerance).…and the reported
Discharge capacity [A.h] looks like it tracks the charge
half-wave, with the same flipped behaviour on Charge capacity [A.h]. This
happens with some half-cell exports and cycler configurations that label the
two cumulative columns inversely.
Solution: Use fix_swapped_charge_discharge_columns to compare each
column against the trapezoidal integral of current (and power, for energy)
and rename the pair when the swapped assignment is within tolerance and the
as-is assignment is not.
Time [s], Step count, and Current [A] columns,
and uses Power [W] (or Voltage [V] * Current [A] when Power [W] is
absent) for the energy pair. The default tolerance is 10 % relative
error; pass a different value if your data needs a tighter or looser
threshold:
The function refuses to swap labels when positive current does not
correspond to discharge — without a known sign convention there is no way
to tell which column is which, and swapping would mask a real sign-
convention bug. Run
set_positive_current_for_discharge first.Time not cumulative
Problem: Time resets to 0 for each cycle. Solution: Track a cumulative time offset:Step count not cumulative
Problem: Step count resets for each cycle. Solution: Track a step count offset across cycles:Missing capacity columns
Problem: Capacity calculation fails. Solution: Ensure you haveTime [s], Current [A], and Voltage [V]
columns before calculating capacity.
Non-UTF-8 CSV files (e.g. Neware)
Problem: Reading a Neware CSV file fails with an encoding error. Solution: The Neware reader automatically falls back to Latin-1 if UTF-8 decoding fails, so no action is needed in most cases:Next steps
Data format
Full reference for recognized columns, units, and sign conventions.
Uploading data
Upload prepared data as cell specs, instances, and measurements.
ionworksdata API reference
Complete reference for
read, write, transform, steps, and load.ionworksdata on GitHub
Report issues or browse the source.