gauge_repeatability
gauge_repeatability ¤
GaugeRepeatabilityEvents ¤
GaugeRepeatabilityEvents(
dataframe: DataFrame,
signal_uuid: str,
*,
part_column: str = "value_string",
value_column: str = "value_double",
operator_column: str | None = None,
event_uuid: str = "quality:gauge_rr",
time_column: str = "systime"
)
Bases: Base
Quality: Gauge Repeatability & Reproducibility (Gauge R&R)
Measurement System Analysis (MSA) for inline sensors. Evaluates repeatability (within-part, same sensor) and reproducibility (across operators/stations) using repeated measurements of reference parts or check standards.
Methods: - repeatability: Equipment Variation (EV) per part. - reproducibility: Appraiser Variation (AV) across operators. - gauge_rr_summary: Full Gauge R&R table with %GRR and ndc. - measurement_bias: Compare measurements to known reference values.
repeatability ¤
repeatability(n_trials: int | None = None) -> pd.DataFrame
Equipment Variation (EV) — within-part variation.
Groups measurements by part, computes range-based or pooled standard deviation estimate of repeatability.
When operator_column is set, ranges and standard deviations are
taken within each operator x part cell and averaged per part (AIAG
average-and-range method). Pooling every operator's trials into one
range folded operator bias (reproducibility) into EV.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n_trials
|
int | None
|
Expected number of trials per part. If None, auto-detected from data. |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: part, mean, range, repeatability_std, EV. |
reproducibility ¤
reproducibility() -> pd.DataFrame
Appraiser Variation (AV) — between-operator variation.
Groups by operator_column, computes variation of part means across operators. Requires operator_column to be set.
AIAG average-and-range method: AV = sqrt((X_diff * K2)^2 -
EV^2 / (n * r)) with X_diff the range of operator means,
K2 = 1/d2* for the number of operators, n parts and r
trials. The EV^2 / (n * r) term removes the repeatability noise
already contained in the operator means; a negative radicand gives
AV = 0.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: operator, mean, reproducibility_std, AV. |
gauge_rr_summary ¤
gauge_rr_summary(
tolerance_range: float | None = None,
) -> pd.DataFrame
Full Gauge R&R summary table.
Computes EV, AV, GRR, PV, TV, %GRR, %PV, and number of distinct categories (ndc).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tolerance_range
|
float | None
|
Total tolerance range (USL - LSL). If provided, %GRR is also computed relative to tolerance. |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with single row: EV, AV, GRR, PV, TV, pct_GRR, |
DataFrame
|
pct_PV, ndc, and optionally pct_GRR_tolerance. |
DataFrame
|
Canonical twin columns: |
DataFrame
|
|
DataFrame
|
the same values as the deprecated column right before it, which is removed |
DataFrame
|
in the next major release. |
measurement_bias ¤
measurement_bias(
reference_values: dict[str, float],
) -> pd.DataFrame
Compare average measurements to known reference values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reference_values
|
dict[str, float]
|
Dict mapping part identifier to its true reference value, e.g. {"part_A": 10.0, "part_B": 20.0}. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: part, measured_mean, reference, |
DataFrame
|
bias, bias_pct. |