variation opimage2d × table → tableimport fullseye as fs; fs.ledger.varmodel_score(image, model, mask=None, align='check') (実装を直接呼ぶなら import varmodel; varmodel.varmodel_score(image, model, mask=None, align='check')、台帳から引くなら opsspc.get("varmodel_score"))Score one image against a varmodel_fit model: z map in sigmas, out-of-band map and a per-region explanation (table).
z = (image - center) / spread on valid pixels (0 elsewhere); a pixel is out of band
when |z| > k. Out-of-band pixels are grouped into 8-connected regions; each region
reports area, peak_z (signed, the largest |z|), mean_abs_z, polarity
(bright / dark / mixed), centroid (row, col), bbox (r0, c0, r1, c1,
exclusive end) and peak_pos; regions are sorted by |peak_z| (rounded to 1e-9, ties by
label order). Also returns z, exceed, valid (scored pixels, image grid), n_exceed, n_valid, k, far,
expected_false = far * n_valid and count_pvalue = P(Binomial(n_valid, far) >=
n_exceed) — that p-value assumes independent pixels and is optimistic for spatially
correlated noise (reported, not used to decide).
Alignment: the image’s translation against the model centre is measured as in
varmodel_alignment and returned as offset. align="check" REFUSES an image
displaced by more than the model’s max_misalign_px; align="translate" registers it
to the model by a Fourier shift, computes z in model coordinates and maps z /
exceed back onto the image grid by the rounded offset (the wrapped border is invalid),
so the maps line up with masks drawn on the original image. mask is on the image grid.
Raises ValueError when image is empty / not 2-D / non-finite, its shape differs
from the model, model lacks the fitted keys, mask has the wrong shape, align is
unknown, or the image is misaligned (check) / displaced by more than a quarter of the
image (translate).
py -3.11 examples/poc_good_sample_variation_model.pypy -3.11 examples/poc_patch_anomaly.pytable を入力に取れる)msa_anova_table · msa_gauge_rr · msa_bias_linearity · msa_attribute_agreement · gum_standard_uncertainty · gum_propagate · gum_expanded · gum_monte_carlo
variation)varmodel_alignment · varmodel_band_k · varmodel_fit · varmodel_calibrate
Provenance: varmodel.py — SPC operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.