ts_shape.events.quality.gauge_repeatability
| Name | Description |
|---|---|
GaugeRepeatabilityEvents | Quality: Gauge Repeatability & Reproducibility (Gauge R&R) |
GaugeRepeatabilityEvents
GaugeRepeatabilityEvents(
dataframe: pd.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"
) -> None
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.
| Name | Description |
|---|---|
repeatability | Equipment Variation (EV) — within-part variation. |
reproducibility | Appraiser Variation (AV) — between-operator variation. |
gauge_rr_summary | Full Gauge R&R summary table. |
measurement_bias | Compare average measurements to known reference values. |
| Name | Type | Description | Default |
|---|---|---|---|
dataframe | DataFrame | Long-format timeseries frame (one row per sample, uuid identifies the signal). | required |
signal_uuid | str | UUID of the measurement signal. | required |
part_column | str | Column holding the part (or check standard) id. | 'value_string' |
value_column | str | Column holding the measured values. | 'value_double' |
operator_column | str | None | Column holding the operator/station id, used for reproducibility. None (default) when there is none. | None |
event_uuid | str | UUID stamped on emitted events. | 'quality:gauge_rr' |
time_column | str | Timestamp column. | 'systime' |
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.
| Name | Type | Description | Default |
|---|---|---|---|
n_trials | int | None | Expected number of trials per part. If None, auto-detected from data. | None |
| 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.
| 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).
| Name | Type | Description | Default |
|---|---|---|---|
tolerance_range | float | None | Total tolerance range (USL - LSL). If provided, %GRR is also computed relative to tolerance. | None |
| 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: grr_pct (after pct_GRR), pv_pct (after |
DataFrame | pct_PV), grr_tolerance_pct (after pct_GRR_tolerance); each holds |
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.
| 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 |
| Type | Description |
|---|---|
DataFrame | DataFrame with columns: part, measured_mean, reference, |
DataFrame | bias, bias_pct. |