surface_form_error — 3D surface_fit op

• Data kinds: image2d → measurement

• Call: import fullseye as fs; fs.ledger.surface_form_error(height, degree=1) (implementation को सीधे call करना हो तो import match3d; match3d.surface_form_error(height, degree=1), registry से लेना हो तो ops3d.get("surface_form_error"))

• Ledger के ज़रिए return value: fullseye.ledger.surface_form_error(...) केवल घोषित out type measurement का value लौटाता है (मूल function सहायक जानकारी भी लौटाता है)। जो हिस्सा छोड़ दिया गया है उसकी ज़रूरत हो तो fullseye.ledger.surface_form_error.raw(...) का उपयोग करें, या match3d.surface_form_error को सीधे call करें।

• मूल function का return: (residual, rms, pv) → pv float

उपयोग

height field grid → ideal surface (polynomial) से residual = form error (flatness deg1/sphericity deg2)। → (residual, rms, pv)।

(H,W) के height field पर x = column index, y = row index के साथ fit_poly_surface(degree) fit करता है, और residual = height − fit लौटाता है। degree=1 least squares plane है (flatness = pv), degree=2 2nd-order surface है (sphere का सन्निकटन, असली sphere नहीं)। लौटाता है (residual (H,W) float64, rms, pv), इकाई height की इकाई है (क्षैतिज दिशा pixel में है, इसलिए tilt coefficient "height/pixel" होते हैं)। NaN होने पर lstsq विफल होता है (missing मान पहले भरें)। 2-D के अलावा इनपुट shape के unpack पर विफल होता है।

उपयोग: flatness और waviness का मूल्यांकन। background_flatten इसी गणना का "image संस्करण" है। point cloud की flatness के लिए fit_plane_3d का resid।

पृष्ठभूमि guides (इस op के पीछे की physics और conventions)

• blas_threads_and_memory — Matrix decompositions धीमे क्यों हैं — BLAS threads, caches, memory layout

संदर्भ (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 के स्रोत।

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

• geometry_metrology — py -3.11 examples_3d/geometry_metrology.py

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

vol_gaussian_psf · fuse_to_voxel · fresnel_reflectance · snell_angle

इसी category के (surface_fit)

fit_poly_surface · eval_poly_surface · background_flatten


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

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