-
Notifications
You must be signed in to change notification settings - Fork 0
CLI Reference
Calvin Yang edited this page Jun 1, 2026
·
1 revision
python grr_tool.py [options]
| Flag | Short | Default | Description |
|---|---|---|---|
--input |
-i |
required | Input CSV (Part, Operator, Trial1, Trial2, ...) |
--output |
-o |
auto | PDF report output path |
--dashboard |
-d |
none | HTML dashboard output path |
--title |
GR&R Study Report | Report/dashboard title | |
--equipment |
-e |
Unspecified Gage | Equipment identifier |
--operator |
Quality Engineering | Name of QE or team | |
--generate-sample |
off | Generate synthetic 10x3x3 CSV before analysis | |
--version |
-v |
Show version and exit |
| Flag | Description |
|---|---|
--tolerance |
Full engineering tolerance range (e.g. 0.050 for +/-0.025 spec) |
--usl |
Upper spec limit — use with --lsl for asymmetric specs |
--lsl |
Lower spec limit — use with --usl
|
Tolerance from --usl/--lsl = USL - LSL. Also computes ndc_tol = 1.41 * (tolerance / GRR).
--study-type {crossed,nested,linearity,bias}
| Value | Description |
|---|---|
crossed |
Standard AIAG crossed GR&R (default) |
nested |
Nested/destructive GR&R — each operator measures unique parts |
linearity |
Linearity study — requires --reference-values
|
bias |
Bias study — requires --reference-values (single value) |
Comma-separated known reference values (one per unique part for linearity; one value for bias).
# Linearity (10 parts)
python grr_tool.py --input data.csv --study-type linearity \
--reference-values "9.97,9.975,9.98,9.985,9.99,9.995,10.0,10.005,10.01,10.015" \
--tolerance 0.060
# Bias
python grr_tool.py --input data.csv --study-type bias \
--reference-values "10.000" --tolerance 0.060--attribute
Switches to Attribute Agreement Analysis. Trial values must be 0 or 1.
Computes: within-operator agreement %, between-operator agreement %, kappa per operator,
and effectiveness % (requires --reference-csv).
| Effectiveness | Verdict |
|---|---|
| >= 90% | Acceptable |
| 80-90% | Marginal |
| < 80% | Unacceptable |
Two-column CSV (Part, Reference) with known correct result (0 or 1) per part.
--run-order COLUMN_NAME
Enables time-series run chart and Nelson rules 1, 2, 5, 6 detection.
| Rule | Description |
|---|---|
| 1 | Any point beyond 3 sigma |
| 2 | 9 consecutive points on same side of mean |
| 5 | 2 of 3 consecutive points beyond 2 sigma (same side) |
| 6 | 4 of 5 consecutive points beyond 1 sigma (same side) |
--compare file1.csv file2.csv ...
Generates a PDF with side-by-side table and bar charts for %GRR, ndc, EV%, AV%, PV%.
python grr_tool.py \
--compare before.csv after.csv --output improvement.pdf# Standard study — PDF + dashboard with tolerance
python grr_tool.py --input data.csv --output report.pdf --dashboard dash.html \
--equipment "Mitutoyo 293-340-30 SN-1234" --tolerance 0.050
# Asymmetric tolerance
python grr_tool.py --input data.csv --output report.pdf --usl 10.025 --lsl 9.975
# Nested / destructive
python grr_tool.py --input destructive.csv --study-type nested
# Attribute go/no-go
python grr_tool.py --input gonogo.csv --attribute --reference-csv known.csv
# Quarterly comparison
python grr_tool.py --compare q1.csv q2.csv q3.csv --output quarterly.pdf