Skip to content

wl5e/d-value-zvalue-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

D-value / Z-value Calculator

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.

Features

  • 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 pytest for testing)

Installation

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 environment

No extra packages are needed for the tool itself. The CI uses pytest (see requirements.txt).

Usage

1. Compute D‑value from a single run

Create a CSV file (run.csv) with at least two columns:

time,logN
0,6.000
2,5.000
4,4.000
6,3.000

Run:

python main.py dvalue run.csv

Output:

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

2. Compute Z‑value from multiple temperatures

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.301

Run:

python main.py zvalue multi_temp.csv

The 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.

License

MIT – see LICENSE file.

About

Calculate D-value and Z-value from biological indicator kill data for sterilization validation, compliant with GMP.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages