A command‑line tool for microbiologists in pharma / GMP environments to compute decimal reduction time (D‑value) and thermal resistance constant (Z‑value) from biological indicator survivor curves. Supports per‑temperature D‑value calculation, multi‑temperature Z‑value regression, and 95 % confidence intervals.
- Compute D‑value from time vs. log₁₀(N) data (linear regression)
- Compute Z‑value from D‑values at multiple temperatures (log₁₀(D) vs. T regression)
- Outputs slope, intercept, R², standard error, and 95 % confidence intervals
- Handles per‑temperature grouping automatically for Z‑value calculations
- Clear error messages for invalid data (non‑negative slope, insufficient points)
- Pure Python, no external dependencies (only
pytestfor testing)
Requires Python 3.8 or later.
git clone https://github.com/<your-org>/d-value-zvalue-calculator.git
cd d-value-zvalue-calculator
# (optional) create virtual environmentNo extra packages are needed for the tool itself. The CI uses pytest (see requirements.txt).
Create a CSV file (run.csv) with at least two columns:
time,logN
0,6.000
2,5.000
4,4.000
6,3.000Run:
python main.py dvalue run.csvOutput:
D-value Calculation Results
============================
D-value: 2.000 minutes
Slope: -0.500000 log10/min
Intercept: 6.0000
R²: 1.000000
Standard Error of D-value: 0.0000 min
95% Confidence Interval: [2.0000, 2.0000] minutes
Provide a CSV with temperature, time, and logN columns (each temperature can have multiple time points):
temperature,time,logN
121,0,5.301
121,2,4.301
121,4,3.301
131,0,5.301
131,0.2,4.301
131,0.4,3.301Run:
python main.py zvalue multi_temp.csvThe tool prints per‑temperature D‑values and the overall Z‑value.
Use --confidence to change the confidence level (default 0.95).
Use --dvalue-only with the zvalue subcommand to see only per‑temperature D‑values without Z‑value calculation.
MIT – see LICENSE file.