dtof_cube_simulate — PHOTON dtof op

資料種類:depthhistcube

呼叫:import photoncount; photoncount.dtof_cube_simulate(depth, bins=256, bin_ps=100.0, reflectivity=None, signal_photons=20.0, ambient_photons=5.0, irf_fwhm_ps=200.0, seed=0, noise=True)(或 opsphoton.get("dtof_cube_simulate"))

用法

合成 SPAD 陣列產生的 `(H, W, T)` 光子直方圖立方體。

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

The per-pixel version of :func:tcspc_simulate: every pixel of the *depth*

map (metres, one-way distance) gets a Gaussian return at its own round-trip

time `2d/c`, scaled by *signal_photons* times that pixel's *reflectivity*,

on a uniform ambient pedestal of `ambient_photons/bins` per bin, Poisson

sampled with `numpy.random.default_rng(seed)`.

The output is the cube that :func:dtof_cube_depth inverts, and the axis

order is (H, W, T) with time LAST — the same layout a SPAD array streams.

That is not the `(D, H, W) of a :mod:volops` voxel volume; the two are

both 3-D float arrays and swapping them silently produces a plausible-wrong

depth map, which is why :func:dtof_cube_depth checks and says so.

`noise=False` returns the exact expectation cube (no sampling).

Ground truth: with `noise=False` the per-pixel centroid of the cube returns

the input depth map to an RMS error of 3.2e-16 m (pinned in the tests) — the

pulse integral is analytic, so the only error is float round-off.

Raises `ValueError`: a non-2-D, non-finite or non-positive *depth*, a

*reflectivity* that is negative or not the same shape as *depth*, a *bins*

outside `[2, MAX_BINS]`, non-positive *bin_ps* / *irf_fwhm_ps*, negative

photon budgets, a non-integer *seed*, a cube over

:data:MAX_CUBE_ELEMENTS (`H*W*bins` grows fast — 512x512x256 is 8x the

cap), and any depth whose round-trip time falls outside the time window

(which a real sensor would alias into a short distance).

詳細使用指南

photon_timeresolved 族使用指南

參考(範例資料・文獻)

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

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

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

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

photon_timeresolvedpy -3.11 examples/photon_timeresolved.py

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

dtof_cube_depth

同類別(dtof)

dtof_depth · dtof_cube_depth


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

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