varmodel_alignment — SPC variation op

• 資料種類:video → table

• 呼叫: import fullseye as fs; fs.ledger.varmodel_alignment(stack, max_misalign_px=0.5)(要直接呼叫實作,import varmodel; varmodel.varmodel_alignment(stack, max_misalign_px=0.5);從台帳取用則 opsspc.get("varmodel_alignment"))

用法

每個良品相對於該組典型位置的平移偏差,以及距容許值的餘量(table)。

> 以下的詳細說明為原文 —— 摘要與標題已翻譯。

Each image of stack (n, H, W) is phase-correlated (filters_freq.phase_correlation_fft) against a reference built from the stack itself (the most typical sample, then the registered mean); the integer peak is refined to 1/20 px by an upsampled DFT (Guizar-Sicairos et al. 2008). Offsets are relative to the median offset, so a common shift of every sample is not a misalignment. Returns offset (n, 2) = (row, col) in px (positive = the sample sits further down / right than the typical one), abs_offset (n,) = the larger of the two, margin_px = max_misalign_px - abs_offset (negative = this sample breaks the tolerance), ok (all margins >= 0), worst (index of the most shifted sample) and psr (peak-to- sidelobe ratio of the correlation), shift_sd_px (Cramér–Rao lower bound of the offset's

spread: noise variance over the structural gradient energy of the registered mean; the window makes the real spread a few times larger) and observable. A featureless or pure-noise stack has no structure, so its offsets cannot be measured (observable=False, offsets reported as 0, shift_sd_px capped at the image size) — and for the same reason a shift cannot fatten its band, so such a stack is not refused.

Why it matters: a per-pixel spread learned from a misaligned stack is inflated wherever the image has gradient (edges), so the tolerance band gets fatter and real defects there are missed.

Raises ValueError on an empty stack, a stack that is not (n, H, W) / a list of equal 2-D images, non-finite values, or max_misalign_px <= 0.

參考(範例資料、文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

• 演算法的正典(作者、年份)與用途見上面的族使用指南。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• poc_good_sample_variation_model — py -3.11 examples/poc_good_sample_variation_model.py

型別可銜接的下一個運算子(可接受 table 作為輸入)

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

同類別(variation)

varmodel_band_k · varmodel_fit · varmodel_calibrate · varmodel_score


*Provenance: varmodel.py — SPC 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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