CaliPytion - Tool to create, apply, and document calibration models for concentration calculation
Overview
CaliPytion is a Python package for the creation, application, and documentation of calibration models for concentration calculations from a measured standard. This package allows for comparing different calibration models and selecting the best one based on various statistical metrics like R2, AIC, or RMSD. The selected model can then calculate the concentration of unknown samples from their measured signals. Furthermore, the calibration standard containing the calibration model and information on the used substance and measurement conditions can be exported in JSON and AnIML format for reuse and documentation.
Key Functionalities
- 📈 Model Fitting and Visualization:
Automatically fits different polynomial models to the data and provides interactive plots for visually comparing these models. - 🎯 Model Selection:
After fitting, a model overview is generated, allowing the user to select the best model based on the desired metric. - 🚷 Avoid Extrapolation:
It prevents the use of models outside the calibrated concentration range. However, by user choice, the model can be extrapolated to calculate concentrations outside the calibration range. - 🧪 Compatible with EnzymeML Documents:
CaliPytion can be used to convert the measured signals of an EnzymeML document into concentrations. - 📂 FAIR Data:
Calibration models are stored together with the standard data. Constituting a complete record of the calibration process, this data can be saved as a JSON or AnIML file.
Installation
CaliPytion can be installed via pip:
pip install calipytion
or directly from the source code:
pip install git+https://github.com/FAIRChemistry/CaliPytion.git
Minimal Example
from calipytion import Calibrator
# standard data
concentrations = [0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5]
absorption = [0, 0.489, 1.056, 1.514, 1.988, 2.462, 2.878, 3.156]
# unknown data
unknowns = [0.3, 1, 1.345]
# initialize the calibrator
calibrator = Calibrator(
molecule_id="s0",
molecule_name="ABTS",
conc_unit="mmol / l",
concentrations=concentrations,
signals=absorption,
)
# fit and visualize model
calibrator.fit_models()
calibrator.visualize()
# choose cubic model
cubic_model = calibrator.get_model("cubic")
# calculate concentrations
print(calibrator.calculate_concentrations(cubic_model, unknowns))
# -> [0.30018883573518623, 0.9823197194444907, 1.3193203297973393]
Model Overview
| Model Name | AIC | R squared | RMSD | Equation | Relative Parameter Standard Errors |
|---|---|---|---|---|---|
| cubic | -56 | 0.9996 | 0.0205 | a * s0 + b * s0**2 + c * s0**3 | a: 4.6%, b: 67.4%, c: 33.6% |
| quadratic | -49 | 0.9991 | 0.0318 | a * s0 + b * s0**2 + c | a: 4.0%, b: 20.0%, c: 115.2% |
| linear | -37 | 0.9929 | 0.0891 | a * s0 | a: 1.7% |
Metadata
Release files for calipytion 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| calipytion-1.0.2.tar.gz | 1.3 MB | With provenance | Details for calipytion-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| calipytion-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for calipytion-1.0.2-py3-none-any.whl |
Total release size: 1.4 MB
Release files / calipytion-1.0.2.tar.gz
| Download URL | calipytion-1.0.2.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dcb1256c55cdb5ebac823432794d8a41f24fcbc0e177557dc9b5b0dd4a8554c2
|
|
BLAKE2b-256 checksum How to use checksums |
8fb6fc9574c4e0aaa3ca3fc1b0baa5a9abd5552296cc62849fdd3dd7684d475c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2025.
Transparency logRelease files / calipytion-1.0.2-py3-none-any.whl
| Download URL | calipytion-1.0.2-py3-none-any.whl |
|---|---|
| Size | 24.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90cf3387d5f312afd7b8e36e5ecda5222aaf24b397b540f3a4e5c5ce4e62ff0d
|
|
BLAKE2b-256 checksum How to use checksums |
ac661f00a3809eb9ae75f1e73c27e13392f04c7dccd6037642847de26c6fab82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2025.
Transparency logSecurity for calipytion 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for calipytion-1.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.