mfgQC¶
Auditable SPC, capability, and gage R&R for manufacturing — by Brantner Solutions.
mfgQC is a quality-control library for manufacturing practitioners — not statisticians or programmers. It does the statistics, data handling, and canonical charts so you can bring the domain knowledge. Every number it reports is checked against its own assumptions and carries a verifiable record of how it was computed.
import pandas as pd, mfgqc
qc = (mfgqc.load(df, measure="width", subgroup="lot", subgroup_size=5)
.spec(lower=1.0, upper=2.0, target=1.5))
print(qc.capability()) # Cp/Cpk + Pp/Ppk + an assumption report
print(qc.control_chart()) # the right chart for your subgroup size, with run rules
print(qc.gage_rr()) # ANOVA gage R&R with the AIAG verdict
Why mfgQC¶
Statistical guardrails¶
Every analysis checks its own assumptions and reports the result. It warns and recommends — it never silently switches methods. Auto-correction is opt-in.
Practitioner-oriented¶
No stats or programming background assumed in the public surface. Errors say what's missing and why, naming the exact role or spec limit an analysis still needs.
Auditable by construction¶
Data and result objects are immutable and carry a hash-chained provenance history, so the full lineage from raw data to final number can be reconstructed and verified.
What it covers¶
| Area | Methods |
|---|---|
| Capability | Cp/Cpk (within-σ), Pp/Ppk (overall σ), Cpm, with CIs; Box-Cox / Clements / Johnson for non-normal |
| Control charts | I-MR, X̄-R, X̄-S, p/np/c/u, EWMA, CUSUM, short-run; Nelson & Western Electric run rules |
| Measurement systems | ANOVA gage R&R, bias, linearity, stability, attribute agreement (kappa) |
| Hypothesis testing | assumption-routing t / variance / proportion tests, ANOVA, post-hoc, non-parametrics |
| Regression & DOE | OLS, model selection, logistic, NLS; full/fractional factorials with alias structure |
| Power & sampling | sample size for t / ANOVA / proportion / variance; ANSI/ASQ Z1.4 & Z1.9 acceptance plans |
| Reliability | life-distribution fitting with censoring, Kaplan-Meier, system reliability, MTBF, availability |
The differentiator: auditability¶
Open qcc or Minitab and the lineage from raw data to the reported Cpk lives in
your memory and your spreadsheet. In mfgQC it lives in the result object:
cap = qc.transform("boxcox").capability()
[s["operation"] for s in cap.lineage()]
# ['load', 'spec', 'transform', 'capability', 'assumption:normality']
digest = cap.provenance_digest() # SHA-256 over the computation
cap.verify_provenance(digest) # True — flips to False if any step was edited
This is what makes the docs you're reading themselves auditable: every method in the Reference states its formula, its assumptions, and the source standard it is pinned to.
- :material-rocket-launch: Get started — install, load data, run your first analysis.
- :material-book-open-variant: Reference — the formula, assumptions, and citation behind every method.
- :material-shield-check: The audit workflow — record, export, and verify a result's lineage.
- :material-github: Source on GitHub — MIT licensed.