dtof op• 데이터 종류: counts → measurement
• 호출: import photoncount; photoncount.dtof_depth(hist, bin_ps=100.0, mode='peak', offset_ps=0.0, subtract_background=False)(또는 opsphoton.get("dtof_depth"))
광자 도달 시각 히스토그램으로부터의 거리: `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:
• `"peak"` — the centre of the fullest bin. Quantised to the bin grid;
the error is uniform in `+-half a bin (+-0.75 cm` at 100 ps).
• `"centroid"` — the first moment of the whole histogram. Exact for a
symmetric pulse *with no background*, and badly biased toward the middle
of the window with one — pass `subtract_background=True`.
• `"parabolic"` — a parabola through the peak bin and its two neighbours.
Sub-bin, cheap, and biased for a Gaussian pulse.
• `"gaussian"` — the same parabola fitted to the log of those three
samples, which is the exact vertex for a Gaussian pulse.
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.
• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.
• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.
• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.
• photon_timeresolved — py -3.11 examples/photon_timeresolved.py
• poc_dtof_ranging — py -3.11 examples/poc_dtof_ranging.py
measurement 를 입력으로 받는 것)—
dtof)dtof_cube_simulate · dtof_cube_depth
*Provenance: photoncount.py — PHOTON 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.