surface_form_error — 3D surface_fit op

Data kinds: image2dmeasurement

Call: import fullseye as fs; fs.ledger.surface_form_error(height, degree=1) (to call the implementation directly, import match3d; match3d.surface_form_error(height, degree=1); from the registry, ops3d.get("surface_form_error"))

Return value through the ledger: fullseye.ledger.surface_form_error(...) returns **only the declared out type measurement** (the underlying function also returns auxiliary values). When you need what was dropped, use fullseye.ledger.surface_form_error.raw(...) or call match3d.surface_form_error directly.

• Underlying return: (residual, rms, pv) → pv float

Usage

Height-field grid → the residual from an ideal (polynomial) surface = the form error (flatness deg 1 / sphericity deg 2). → (residual, rms, pv).

> The detailed description below is the original text — the summary and the headings are translated.

`(H,W) の高さ場に x = 列 indexy = 行 indexfit_poly_surface(degree)` を当て、

`residual = height − fit を返す。degree=1 は最小二乗平面(平面度=pv)、degree=2` は

2 次曲面(球面の近似。真の球ではない)。

返り値 `(residual (H,W) float64, rms, pv)`、単位は高さの単位(横方向は画素単位なので傾き

係数は「高さ/画素」)。NaN があると lstsq が失敗する(欠損は先に埋める)。2-D 以外の入力は

形の unpack で失敗する。

用途: 平面度・うねりの評価。`background_flatten` は同じ計算の「画像版」。点群の平面度は

`fit_plane_3d` の resid。

Background guides (the physics and conventions behind this op)

blas_threads_and_memory — 行列分解が遅い理由の知識 — BLAS スレッド・キャッシュ・メモリ配置

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.

Runnable examples (verified samples that actually call this op)

geometry_metrologypy -3.11 examples_3d/geometry_metrology.py

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

vol_gaussian_psf · fuse_to_voxel · fresnel_reflectance · snell_angle

Same category (surface_fit)

fit_poly_surface · eval_poly_surface · background_flatten


*Provenance: match3d.py — 3D 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.