fullseye

dtof_depth — PHOTON dtof op

使い方

Distance from a photon arrival-time histogram: d = c*t/2.

Direct time-of-flight. The light travels to the target and back, so the one-way distance is half the round-trip time times the speed of light. bin_ps is the width of one time bin (a 100 ps bin is 1.50 cm of depth).

Four estimators, from crudest to sharpest:

Measured on a noiseless simulated return at 2.4371 m (256 bins x 100 ps, 500 ps IRF), absolute error: peak 1.29 mm, centroid 4.4e-16 m, parabolic 0.067 mm, gaussian 9.4e-9 m — three orders of magnitude between the crudest and the sharpest.

With Poisson noise (200 signal + 200 ambient photons, seed 0) the same four give 13.7 mm, 146.5 mm (with subtract_background=True), 8.5 mm and 8.0 mm. Two honest readings of that: once shot noise dominates the sub-bin estimators buy about 1.6x, not three orders of magnitude, and the centroid collapses because a median-subtracted ambient floor still leaves noise across the whole window that drags the first moment toward the centre. Use "gaussian" or "parabolic" on noisy data; use "centroid" only when the background is genuinely gone.

offset_ps is a system delay to remove: t_flight = t_measured - offset_ps, so a positive offset makes the answer closer. Returns the distance in metres as a float.

Raises ValueError: negative, non-finite, non-1-D or all-zero hist, a non-positive bin_ps, an unknown mode, a non-finite offset_ps, a flat histogram in a peak-based mode (argmax would silently pick bin 0 and report the first bin’s depth), a peak in the first or last bin with a sub-bin mode (there is no neighbour to fit to — use "peak"), a degenerate three-sample fit, and — instead of returning a negative distance — an offset_ps larger than the measured arrival time.

詳しい使い方ガイド

参考(サンプルデータ・文献)

実行できる例(この op を実際に呼ぶ検証済みサンプル)

型が繋がる次の op(measurement を入力に取れる)

同カテゴリ(dtof)

dtof_cube_simulate · dtof_cube_depth


Provenance: photoncount.py — PHOTON operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。

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