Cell Specifications#
Cell specifications sit at the top of the Ionworks data hierarchy:
Cell Specification — defines a cell type (manufacturer, chemistry, form factor, electrode properties, etc.)
Cell Instance — a specific physical cell linked to a specification (see Cell Instances)
Cell Measurement — time-series data recorded from testing an instance (see Cell Measurements)
Every instance and measurement traces back to a specification, so creating one is usually the first step in any workflow.
Creating a specification#
Pass a dictionary of properties to client.cell_spec.create():
cell_spec = client.cell_spec.create({
"name": "NCM622/Graphite Coin Cell",
"form_factor": "R2032",
"manufacturer": "Custom Cells",
"ratings": {
"capacity": {"value": 0.002, "unit": "A*h"},
"voltage_min": {"value": 2.5, "unit": "V"},
"voltage_max": {"value": 4.2, "unit": "V"},
},
"cathode": {
"properties": {"loading": {"value": 12.3, "unit": "mg/cm**2"}},
"material": {"name": "NCM622", "manufacturer": "BASF"},
},
"anode": {
"properties": {"loading": {"value": 6.5, "unit": "mg/cm**2"}},
"material": {"name": "Graphite", "manufacturer": "Customcells"},
},
})
print(cell_spec.id)
If you are running a script that may be executed more than once,
create_or_get() returns the existing specification when one with the same
name already exists instead of raising a 409 Conflict error:
cell_spec = client.cell_spec.create_or_get({
"name": "NCM622/Graphite Coin Cell",
# ...
})
Listing specifications#
specs = client.cell_spec.list()
for spec in specs:
print(f"{spec.name} — {spec.form_factor}")
Retrieving a specification#
Fetch by ID:
spec = client.cell_spec.get(spec_id)
Updating a specification#
update() merges the provided fields into the existing specification:
updated = client.cell_spec.update(spec_id, {
"ratings": {"capacity": {"value": 0.0025, "unit": "A*h"}}
})
Deleting a specification#
client.cell_spec.delete(spec_id)
Note
Deleting a specification also removes all linked instances and measurements.
Next steps#
With a specification in place, create physical cell records in Cell Instances.