fullseye

tb_tcspc_irf_convolve — 2D typed op

tb_tcspc_irf_convolve: input → output

図は合成の入力 128×128 で実際に走らせた出力。左が入力、右が出力。点群は上から見た散布(明るさ = z)、1-D 列は折れ線、体積は z 方向の最大値投影、動画は中央フレーム、複素画像は振幅、絵にならない返り値は値そのもの。

つまみ a を振る(0.1 / 0.5 / 0.9、もう一方は既定):

tb_tcspc_irf_convolve: knob a sweep

つまみ b を振る(0.1 / 0.5 / 0.9、もう一方は既定):

tb_tcspc_irf_convolve: knob b sweep

段階(前置きの op → この op。左から順):

tb_tcspc_irf_convolve: stages

別の画像でも(合成シーン / 写真 / 硬貨。上段が入力、下段がその出力。つまみは既定):

tb_tcspc_irf_convolve: other inputs

使い方

Blur an arrival-time histogram by the instrument response (timing jitter).

The temporal analogue of a PSF convolution: a detector's timing uncertainty
(SPAD jitter + TDC quantisation + laser pulse width) smears every arrival
time by the instrument response function, here a Gaussian of full width at
half maximum *irf_fwhm_ps*. The kernel is the **exact bin integral** of that
Gaussian (erf differences), normalised to sum 1, truncated at
``+-truncate*sigma`` and forced to odd length so the convolution is centred.

Ground truth: convolving a unit spike in the middle of a 256-bin window with
``irf_fwhm_ps = 500`` at ``bin_ps = 50`` leaves the centroid **exactly**
where it was (measured shift 0.0 ps — the kernel is symmetric) and gives a
profile whose measured FWHM is 501.22 ps. That 0.24% excess over 500 is the
*measurement*, not the kernel: :func:`tcspc_stats` finds the half-maximum
crossings by linear interpolation between bins, which slightly overestimates
the width of a Gaussian.

Total counts are preserved *except* at the window edges, where
``mode='same'`` discards the tail that falls outside — measured loss exactly
0 for that centred spike, but a genuine loss for a pulse within a few sigma
of either end.

Returns a float64 1-D histogram of the same length as *hist*.

**Raises** ``ValueError``: negative, non-finite or non-1-D *hist*, a
non-positive *bin_ps* / *irf_fwhm_ps* / *truncate*, an IRF sigma below
1e-3 bins (the kernel would be a delta and the op a no-op — say so instead
of pretending to blur), and a kernel that would be longer than the
:data:`MAX_BINS` cap.

Typed bridge of the photon op tcspc_irf_convolve into the 2-D evolution registry: the same implementation, called under the op(v, a, b) convention. a drives bin_ps (default 100) and b drives irf_fwhm_ps (default 200).

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

Studio で試す

下のプログラムは実際に走ることを確かめてある(図と同じ入力)。Studio のヘルプではこのブロックがボタンになり、その場で読み込んで実行できる。

img_to_counts 0.50 0.50
tb_tcspc_irf_convolve 0.50 0.50

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

次の例は元の台帳 op tcspc_irf_convolve を呼ぶもの。この橋渡し op は同じ実装を fn(v, a, b) 規約に合わせただけなので、挙動はそのまま当てはまる(呼び出し形だけ違う)。

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

identity · tb_spad_deadtime_apply · tb_spad_deadtime_correct · tb_tcspc_coates_correct · tb_tcspc_background_subtract · tb_dtof_depth · tb_countrate_to_counts · tb_counts_to_countrate

同カテゴリ(typed)

tb_points_to_voxel · tb_estimate_point_normals · tb_iss_keypoints · tb_project_points · tb_render_point_depth · tb_statistical_outlier_removal · tb_radius_outlier_removal · tb_voxel_grid_downsample


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

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