dtof op• 数据种类:depth → histcube
• 调用: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).
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者・年份)与用途见上面的族使用指南。
• photon_timeresolved — py -3.11 examples/photon_timeresolved.py
histcube 作为输入)dtof)*Provenance: photoncount.py — PHOTON 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.