photon_statistics — PHOTON counting op

• 資料種類:image2d → table

• 呼叫: import fullseye as fs; fs.ledger.photon_statistics(counts)(要直接呼叫實作,import photoncount; photoncount.photon_statistics(counts);從台帳取用則 opsphoton.get("photon_statistics"))

用法

光子計數影格的卜瓦松統計:它真的是散粒雜訊受限的嗎?

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

Returns a dict: mean · variance (population, ddof=0) · fano_factor = variance / mean (1 for a Poisson process) · snr_poisson = sqrt(mean) (the theoretical photon-limited SNR) · snr_measured = mean / std (what this frame actually achieved) · total_counts · n_samples · zero_fraction (the fraction of pixels that saw no photon at all — the honest measure of "photon starved"; exp(-lambda) for a flat field) · max_counts.

The Fano factor is evidence of Poisson statistics only on a flat field. On a structured scene the scene's own spatial variance dominates and the ratio is large and meaningless — this op computes the number, it cannot tell you which situation you are in. Measured on the test scenes: a flat lambda = 100 field (512x512, seed 0) gives 1.001089; the same detector looking at a linear ramp from 20 to 180 photons gives 22.4102. Both are "correct" and only one of them means anything.

Raises ValueError: negative, non-finite or non-2-D *counts*, fewer than 2 pixels (no variance), an all-zero frame (fano_factor would be 0/0 — say "no photons were detected" instead of returning NaN), and a frame with exactly zero variance (snr_measured would be inf; for n >= 2 a constant frame is not a Poisson realisation but a synthetic constant, i.e. an input mistake).

詳細使用指南

• photon_timeresolved 族使用指南

參考(範例資料、文獻)

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

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

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

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

• photon_timeresolved — py -3.11 examples/photon_timeresolved.py

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

—

同類別(counting)

photon_sample · photon_uncertainty


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

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