emva_general_sensitivity — OPTICS sensorgeneral op

• Data kinds: signal × signal × signal → table

• Call: import fullseye as fs; fs.ledger.emva_general_sensitivity(mu_p, mu_y, var_y, mu_y_dark, var_y_dark, mu_p_sat, n_intervals=8) (to call the implementation directly, import sensorgeneral; sensorgeneral.emva_general_sensitivity(mu_p, mu_y, var_y, mu_y_dark, var_y_dark, mu_p_sat, n_intervals=8); from the registry, opsoptics.get("emva_general_sensitivity"))

Usage

Characteristic curve, input SNR, absolute sensitivity threshold, DR and dark noise in photons (General sections 2.1-2.4, 6.6-6.8).

> The detailed description below is the original text — the summary and the headings are translated.

*mu_p*: 露光段ごとの画素あたりの平均光子数。*mu_y*, *var_y*: 同じ露光の 2 枚から出した平均と時間分散(式 16・18、sensorchar.emva_pair_statistics)。*mu_y_dark*, *var_y_dark*: 暗画像の同じ量。*mu_p_sat*: 飽和の露光(0.1〜0.2 % の画素が最大値になる露光、6.7 節)。0 ≤ μ_p ≤ μ_p.sat の点だけを使う。

手順:

1. 特性曲線 μ_y − μ_y.dark = R(μ_p) を [0, μ_p.sat] を P 等分した 3 次 B-スプラインで当て、各点の傾き ∂μ_y/∂μ_p と暗い所の傾き R_d = ∂μ_y/∂μ_p|μ_p=0(式 25)を出す(6.6 節)。

2. 出力 SNR_y = (μ_y − μ_y.dark)/σ_y(式 7)、入力 SNR_p = μ_p |∂μ_y/∂μ_p| / σ_y(式 10)、理想 √μ_p(式 15)。

3. 逆の関係 μ_p(SNR_p) を同じ区間数の B-スプラインで当て、SNR_p = 1 の露光を μ_p.min とする(6.8 節)。測った SNR_p が 1 以下の点を含まなければ拒む(外挿になる。付録 D.1 は SNR ≈ 1 の露光を含めよと書く)。

3'. 照合用(規格の手順ではない): SNR_p が 1 をまたぐ隣の 2 点の間を log-log の直線で補間した mu_p_min_local。

規格の逆回帰は [0, SNR_max] 全体を P 等分した区間の 3 次で当てるので、SNR ≈ 1 の近くの点の雑音を拾いやすい

(2 万画素の合成センサで乱数 6 通り: 逆回帰 ±5 %、局所の補間 ±1 %)。

4. SNR_max = 測った SNR_p の最大(6.8 節。線形でないと飽和の露光で最大とは限らない)、DR = μ_p.sat/μ_p.min(式 21)。

5. 暗雑音 [光子] σ_d = √(σ²_y.dark − σ²_q)/R_d(General の式 50)。σ²_y.dark < 0.24 DN² なら推定せず上限 0.40/R_d (式 51)。

返り値 {"slope", "Rd", "snr_y", "snr_p", "snr_p_ideal", "mu_p_min", "mu_p_min_local", "snr_max", "mu_p_at_snr_max", "DR", "DR_dB", "sigma_d_p", "sigma_d_p_upper", "sigma_d_valid", "used", "fit", "n_intervals"}。★η・K・電子の単位の量は返さない(General では測れない、6.7 節)。

Raises ValueError: 長さが違う / μ_p.sat が正でない / 区間に点が足りない(B-スプラインの拒否)/ 傾きが 0 の点 / 分散が正でない点 / SNR_p ≤ 1 の点が無い / var_y_dark が負。

Family-wide input contract (fail-closed)

Every optics op validates its input before computing (nothing slips through silently):

• Units are baked into the argument name — _mm / _um / _deg / _mrad. Confusing mm with µm does not crash; it yields a plausible-looking wrong answer, so the name prevents it. Nothing here guesses the unit from the magnitude.

• Strings raise ValueError — float('50') succeeds, so an unparsed configuration value would slip through as a length (measured: thin_lens('50', '200') returned a plausible 66.667 mm). bool is refused too, as the implicit promotion True == 1.

• complex / masked arrays raise ValueError (real-valued slots only; silently dropping the imaginary part or peeling off the mask is refused). NaN/Inf raises ValueError on every input.

• Division by zero and its relatives are refused by name: focal length 0, radius of curvature 0, refractive index <= 0, a fully opaque aperture (all zeros, so the normalisation is 0/0), a PSF whose sum is <= 0, a Stokes vector with S0 = 0, and an object sitting at the front focal point (the image is at infinity).

• Only two ops return a non-finite value, and both state it as a contract: depth_of_field returns far_mm = inf beyond the hyperfocal distance (that is what the hyperfocal distance means), and gaussian_beam returns wavefront_radius_mm = inf at the waist (the radius of curvature of a plane wavefront). Both also return a finite companion (far_is_infinite / curvature_per_mm). Any other silent NaN/Inf is detected internally and raises ValueError — "float64 overflowed" and "the answer is infinite" are different claims, so the first is never returned wearing the face of the second.

• Size caps: generated grids are capped by optics.MAX_GRID (4096); supplied fields/PSFs/apertures by optics.MAX_FIELD_ELEMENTS (2^24); ABCD element chains by optics.MAX_SYSTEM_ELEMENTS (1024); Zernike by MAX_ZERNIKE_TERMS (512) / MAX_ZERNIKE_ORDER (40) / MAX_ZERNIKE_BASIS (2^25). This closes, fail-closed, the paths where a small argument triggers a huge internal allocation (measured: n_max=40 × 4096² needs 108 GB).

• Physically impossible states are refused too: a Stokes vector with degree of polarisation > 1, negative transmittance, negative intensity, and invalid Zernike indices such as n-|m| odd.

Detailed usage guide

• optics_imaging family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_emva1288_in_camera_processing — py -3.11 examples/poc_emva1288_in_camera_processing.py

Ops the type connects to (they accept table as input)

abcd_matrix · wavefront_stats · sfr_from_edge · paraxial_trace · seidel_coefficients · spot_stats · tolerance_analysis · wavefront_from_opd

Same category (sensorgeneral)

emva_general_nonuniformity · emva_general_relative_qe


*Provenance: sensorgeneral.py — OPTICS operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

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