tcspc_simulate — PHOTON tcspc op

• Data kinds: कोई नहीं → counts (केवल arguments से तय होने वाला op — यह कोई image या data input नहीं लेता)

• Call: import fullseye as fs; fs.ledger.tcspc_simulate(distance_m=3.0, bins=256, bin_ps=100.0, signal_photons=50.0, ambient_photons=20.0, irf_fwhm_ps=200.0, seed=0, noise=True) (implementation को सीधे call करना हो तो import photoncount; photoncount.tcspc_simulate(distance_m=3.0, bins=256, bin_ps=100.0, signal_photons=50.0, ambient_photons=20.0, irf_fwhm_ps=200.0, seed=0, noise=True), registry से लेना हो तो opsphoton.get("tcspc_simulate"))

उपयोग

ज्ञात उत्तर के साथ single-pixel photon arrival-time histogram synthesise करता है।

> नीचे का विस्तृत विवरण मूल text में है — सारांश और headings का अनुवाद हो चुका है।

The generative model of a direct time-of-flight (dToF) / TCSPC measurement::

lambda_k = signal_photons * P(pulse in bin k) + ambient_photons / bins

N_k ~ Poisson(lambda_k)

where the pulse is a Gaussian of full width at half maximum *irf_fwhm_ps* centred at the round-trip time t0 = 2*distance_m/c, and P(pulse in bin k) is its exact integral over the bin (an erf difference, not a midpoint sample) — so with noise=False the returned histogram is an analytic ground truth, not an approximation of one. *ambient_photons* is the total background (sunlight, dark counts) spread uniformly over the window.

noise=False returns lambda_k itself (no sampling); noise=True draws one Poisson realisation from numpy.random.default_rng(seed).

Returns a float64 1-D histogram of length *bins*. The unambiguous range is c * bins * bin_ps / 2 — 3.84 m at the defaults (256 bins x 100 ps), with a bin resolution of 1.50 cm.

The pulse is not renormalised to the window: a target near the far edge genuinely loses the tail of its pulse, exactly as a real sensor does, and the total signal comes back slightly below *signal_photons*. Renormalising would have made the truncated pulse asymmetric and biased its centroid.

Raises ValueError: a non-positive *distance_m*, a *bins* outside [2, MAX_BINS], a non-positive *bin_ps* / *irf_fwhm_ps*, negative photon budgets, a non-integer or negative *seed*, a non-bool *noise*, and — instead of wrapping the pulse silently to a short distance — a *distance_m* whose round-trip time falls outside the bins * bin_ps window.

उपयोग की विस्तृत guide

• photon_timeresolved family guide

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

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

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

• photon_timeresolved — py -3.11 examples/photon_timeresolved.py

• poc_dtof_ranging — py -3.11 examples/poc_dtof_ranging.py

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

tcspc_coates_correct · tcspc_irf_convolve · tcspc_background_subtract · tcspc_stats · dtof_depth · lifetime_fit · lifetime_phasor

इसी category के (tcspc)

tcspc_irf_convolve · tcspc_background_subtract · tcspc_stats


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

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