varmodel_score — SPC variation op

• Data kinds: image2d × table → table

• Call: import fullseye as fs; fs.ledger.varmodel_score(image, model, mask=None, align='check') (implementation को सीधे call करना हो तो import varmodel; varmodel.varmodel_score(image, model, mask=None, align='check'), registry से लेना हो तो opsspc.get("varmodel_score"))

उपयोग

एक image को varmodel_fit model से मिलाना: sigma में z map, band से बाहर का map और हर region की व्याख्या (table)।

> नीचे का विस्तृत विवरण मूल text में है — सारांश और headings का अनुवाद हो चुका है।

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).

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• poc_good_sample_variation_model — py -3.11 examples/poc_good_sample_variation_model.py

• poc_patch_anomaly — py -3.11 examples/poc_patch_anomaly.py

वे अगले ops जिनसे type जुड़ता है (table को input के रूप में लेते हैं)

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

इसी category के (variation)

varmodel_alignment · varmodel_band_k · varmodel_fit · varmodel_calibrate


*Provenance: varmodel.py — SPC operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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