Data processing for Ionworks software.
Project description
Ionworks data
Package to extract, transform, and validate battery data for use in Ionworks software.
Package overview
ionworksdata is organized into the following modules:
- Read: read raw data from files
- Transform: transform time series data into Ionworks-compatible format
- Steps: label steps for easy processing or visualization
Data format
The data is processed to be compatible with the Ionworks software. Documentation for the data format can be found in the Knowledge base.
Data processing
Processing time series data
Time series data can be extracted from a cycler file using the read.time_series function, which takes the filename and optionally the reader name (e.g. csv, biologic_mpt, maccor, neware, repower). If the reader is not specified, it will be automatically detected from the file. The function returns a Polars DataFrame.
# With explicit reader
data = iwdata.read.time_series("path/to/file.mpt", "biologic_mpt")
# With auto-detection (reader is optional)
data = iwdata.read.time_series("path/to/file.mpt")
The function automatically performs several processing steps and adds columns to the output:
Data Processing Steps
-
Reader-specific processing (varies by reader):
- Column renaming to standardized names (e.g., "Voltage" → "Voltage [V]")
- Numeric coercion (removing thousands separators, converting strings to numbers)
- Dropping message/error rows (for some readers)
- Parsing timestamp columns and computing time if needed
- Converting time units (e.g., hours to seconds)
- Fixing unsigned current (if current is always positive, negate during charge)
- Validating and fixing decreasing times (if
time_offset_fixoption is set)
-
Standard data processing (applied to all readers):
- Removing rows with null values in current or voltage columns
- Converting numeric columns to float64
- Resetting time to start at zero
- Offsetting duplicate timestamps by a small amount (1e-6 seconds) to preserve all data points
- Setting discharge current to be positive (charge current remains negative)
-
Post-processing:
- Adding
Step count: Cumulative step count (always present) - Adding
Discharge capacity [A.h]: Discharge capacity in ampere-hours (always present) - Adding
Charge capacity [A.h]: Charge capacity in ampere-hours (always present) - Adding
Discharge energy [W.h]: Discharge energy in watt-hours (always present) - Adding
Charge energy [W.h]: Charge energy in watt-hours (always present)
- Adding
Output Columns
The output always includes:
Time [s]: Time in secondsCurrent [A]: Current in amperesVoltage [V]: Voltage in voltsStep count: Cumulative step countDischarge capacity [A.h]: Discharge capacity in ampere-hoursCharge capacity [A.h]: Charge capacity in ampere-hoursDischarge energy [W.h]: Discharge energy in watt-hoursCharge energy [W.h]: Charge energy in watt-hours
Optional columns (if present in source data):
Step from cycler: Step number from cycler fileCycle from cycler: Cycle number from cycler fileTemperature [degC]: Temperature in degrees CelsiusFrequency [Hz]: Frequency in hertz
For information on the expected and returned columns, see the reader documentation. Additional columns can be added by passing a dictionary to the extra_column_mappings argument.
data = iwdata.read.time_series(
"path/to/file.mpt", "biologic_mpt", extra_column_mappings={"My new column": "Old column name"}
)
Processing step data
Given a processed time series data, the step summary data can be extracted as follows:
steps = iwdata.steps.summarize(data)
This function identifies distinct steps within battery cycling data by detecting changes in the "Step count" column (which must be present in the input data). For each identified step, it extracts and calculates relevant metrics (voltage, current, capacity, energy, etc.) and determines the step type.
The output always includes:
Cycle count: Cumulative cycle count (defaults to 0 if no cycle information is available)Cycle from cycler: Cycle number from cycler file (only if provided in the input data)Discharge capacity [A.h]: Discharge capacity for the stepCharge capacity [A.h]: Charge capacity for the stepDischarge energy [W.h]: Discharge energy for the stepCharge energy [W.h]: Charge energy for the stepStep from cycler: Step number from cycler file (only if provided in the input data)
Note: The step_column and cycle_column parameters have been removed. The function now always uses "Step count" for step identification and "Cycle from cycler" (if available) for cycle tracking.
Alternatively, the time series and step data can be extracted together using the read.time_series_and_steps function.
# With explicit reader
data, steps = iwdata.read.time_series_and_steps("path/to/file.mpt", "biologic_mpt")
# With auto-detection (reader is optional)
data, steps = iwdata.read.time_series_and_steps("path/to/file.mpt")
Labeling steps
Steps can be labeled using the functions in the steps module. For example, the following code labels the steps as cycling and pulse (charge and discharge).
options = {"cell_metadata": {"Nominal cell capacity [A.h]": 5}}
steps = iwdata.steps.label_cycling(steps, options)
for direction in ["charge", "discharge"]:
options["current direction"] = direction
steps = iwdata.steps.label_pulse(steps, options)
Measurement details
The function ionworksdata.read.measurement_details can be used to return a measurement_details dictionary, which has keys "measurement", "time_series", and "steps". You need to first create the measurement dictionary (which contains details about the test, such as its name), and then pass it to the function along with the reader name and filename, and any additional arguments. The function will return the updated measurement details dictionary, which includes information extracted from the file, such as the start time, and the cycler name. This function also automatically labels the steps with some sensible defaults (custom labels can be added by passing a list of dictionaries to the labels argument).
measurement_details = iwdata.read.measurement_details(
"path/to/file.mpt",
measurement,
"biologic_mpt",
options={"cell_metadata": {"Nominal cell capacity [A.h]": 5}},
)
measurement = measurement_details["measurement"]
time_series = measurement_details["time_series"]
steps = measurement_details["steps"]
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 ionworksdata-0.4.1.tar.gz.
File metadata
- Download URL: ionworksdata-0.4.1.tar.gz
- Upload date:
- Size: 63.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a677d7fe22a8ba2ae1709163c31299206e5e39947fffde8e02db9c1ac6a7ee2f
|
|
| MD5 |
79da8868e71fdbf76de7393221b41150
|
|
| BLAKE2b-256 |
19f8962c99fde20cca37f7a99e2b34e47baa125e32e042d67b1723ca46c89c88
|
Provenance
The following attestation bundles were made for ionworksdata-0.4.1.tar.gz:
Publisher:
publish.yml on ionworks/ionworksdata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ionworksdata-0.4.1.tar.gz -
Subject digest:
a677d7fe22a8ba2ae1709163c31299206e5e39947fffde8e02db9c1ac6a7ee2f - Sigstore transparency entry: 908821974
- Sigstore integration time:
-
Permalink:
ionworks/ionworksdata@54dc36492190606df70091fd4873b444215b4efb -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/ionworks
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54dc36492190606df70091fd4873b444215b4efb -
Trigger Event:
release
-
Statement type:
File details
Details for the file ionworksdata-0.4.1-py3-none-any.whl.
File metadata
- Download URL: ionworksdata-0.4.1-py3-none-any.whl
- Upload date:
- Size: 79.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c63105bf699ddc671875c8785697fc6a1c3f15dfad2a8844333c44f4583e14da
|
|
| MD5 |
7fbab1757a9c2c78ffb5bf3ff375ee3c
|
|
| BLAKE2b-256 |
eb6715f3f905050f30623cf160e9d3e8fe5e78a955609169f0911e0d4fe82bde
|
Provenance
The following attestation bundles were made for ionworksdata-0.4.1-py3-none-any.whl:
Publisher:
publish.yml on ionworks/ionworksdata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ionworksdata-0.4.1-py3-none-any.whl -
Subject digest:
c63105bf699ddc671875c8785697fc6a1c3f15dfad2a8844333c44f4583e14da - Sigstore transparency entry: 908821981
- Sigstore integration time:
-
Permalink:
ionworks/ionworksdata@54dc36492190606df70091fd4873b444215b4efb -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/ionworks
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54dc36492190606df70091fd4873b444215b4efb -
Trigger Event:
release
-
Statement type: