varmodel_band_k — SPC variation op

• Data kinds: none → table (an op determined by its arguments alone — it takes no image or data input)

• Call: import fullseye as fs; fs.ledger.varmodel_band_k(n=20, far=0.001, spread='std', df_prior=None) (to call the implementation directly, import varmodel; varmodel.varmodel_band_k(n=20, far=0.001, spread='std', df_prior=None); from the registry, opsspc.get("varmodel_band_k"))

Usage

Half-width k (in spread units) of the tolerance band for a declared two-sided per-pixel false-alarm rate (table).

A new good pixel x is flagged when |x - center| > k * spread. Under per-pixel independent normal good samples:

• std: (x - mean)/(s * sqrt(1+1/n)) ~ t_{n-1} so k = t_{n-1}^-1(1 - far/2) * sqrt(1+1/n).

• pooled: one variance pooled over many pixels (degrees of freedom df_prior; None = infinite) → normal quantile.

• moderated: empirical-Bayes shrunk variance with df_prior = d0 prior degrees of freedom (Smyth 2004) → t_{n-1+d0}.

• mad: median / MAD centre and spread → no closed form, but the ratio is a pivot, so k is a Monte-Carlo quantile that depends on (n, far) only (fixed seed; mc_far_rel_se is the relative standard error of the achieved rate). Needs n >= 5 and far >= 1e-3.

The threshold comes from the distribution, never from test defects. Returns k, df (0 for mad: no t quantile is involved), far, n, spread, source, mc_far_rel_se.

Raises ValueError for n < 2 (mad: n < 5), far outside [1e-9, 0.5), an unknown spread or a non-positive df_prior.

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• (none yet)

Ops the type connects to (they accept table as input)

msa_anova_table · msa_gauge_rr · msa_bias_linearity · msa_attribute_agreement · gum_standard_uncertainty · gum_propagate · gum_expanded · gum_monte_carlo

Same category (variation)

varmodel_alignment · varmodel_fit · varmodel_calibrate · varmodel_score


*Provenance: varmodel.py — SPC operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.