Skip to content

labqc

Laboratory quality calculations in Python. The calculations an ISO/IEC 17025 laboratory does every week, usually in spreadsheets, written as small, tested Python functions:

Module What it covers Reference
uncertainty GUM uncertainty budgets: Type A and B components, sensitivity coefficients (analytic or numerical), correlated inputs, Welch–Satterthwaite degrees of freedom, coverage factor, relative uncertainty; Monte Carlo propagation and a check of the GUM interval against it JCGM 100:2008 (GUM), JCGM 101:2008 (GUM S1)
validation Calibration linearity (ordinary or weighted) with confidence intervals and lack-of-fit test, LOD/LOQ, precision (RSD), intermediate precision by ANOVA, spike recovery, trueness against a CRM ICH Q2, Eurachem guide, ERM Application Note 1
proficiency z, zeta and En scores with interpretation; robust consensus mean (Algorithm A); z-score history across rounds ISO 13528, ISO/IEC 17043
control_charts Shewhart limits; Westgard rules 12s, 13s, 22s, R4s, 41s, 10x, also across two or three control levels; CUSUM and EWMA charts Westgard multirule QC; Montgomery, Introduction to Statistical Quality Control
emissions ppm ↔ mg/m³ at standard conditions, correction to reference O₂ and its uncertainty, wet ↔ dry, user-defined gases Stack-emission practice, e.g. EN 303-5 at 10 % O₂
conformity Decision rules for pass/fail statements with uncertainty: simple acceptance, guarded acceptance and rejection, non-binary statements with a guard band; probability of conformance; suggested report wording ILAC G8:09/2019, JCGM 106:2012
topdown Top-down uncertainty: u(Rw) from QC data (plus duplicates), u(bias) from PT rounds or a CRM, u_c and U Nordtest TR 537
outliers Grubbs tests for one and two outliers, Cochran's test for the largest variance; critical values at 5 % and 1 %; ok / straggler / outlier ISO 5725-2
comparison Method comparison: Bland–Altman bias and limits of agreement with confidence intervals; Deming regression (error ratio, jackknife intervals); Passing–Bablok regression with confidence intervals and linearity test Bland & Altman 1986; Linnet 1990; Passing & Bablok 1983
equipment Drift from successive calibration certificates, when the error reaches the tolerance, and a stated rule to shorten, keep or lengthen the interval ILAC-G24 / OIML D 10 (calibration history)
report Run records (inputs, settings, result, method, labqc version, UTC time, analyst) saved as JSON and reloaded; Excel workbook and one-page PDF reports ISO/IEC 17025 7.5 (technical records)

Every function is tested against hand-calculated values or textbook worked examples (152 library tests, plus 122 for the web app and its browser build), and the examples below run in CI.

Validated against reference cases

labqc 1.0 passes 91 reference cases with stated tolerances and sources: see the validation report and change control. A laboratory must still validate it for its own intended use before reporting results (ISO/IEC 17025 clause 7.11.2).

  • Try the web app in the browser: every module, with example data, no installation.
  • Install and Quick start get you to a first uncertainty budget.
  • The API reference documents every function, generated from the source code.
  • Worked examples show real lab cases with their output.