basis_material_decompose — TOMOGRAPHY spectral_xray op

• Data kinds: images → images

• Call: import fullseye as fs; fs.ledger.basis_material_decompose(signal, channels=None, basis=('WATER', 'AL'), photons_per_pixel: 'float' = 100000.0, flat=None) -> 'dict' (to call the implementation directly, import dualxray; dualxray.basis_material_decompose(signal, channels=None, basis=('WATER', 'AL'), photons_per_pixel: 'float' = 100000.0, flat=None) -> 'dict'; from the registry, opstomography.get("basis_material_decompose"))

• Return value through the ledger: fullseye.ledger.basis_material_decompose(...) returns only the declared out type images (the underlying function also returns auxiliary values). When you need what was dropped, use fullseye.ledger.basis_material_decompose.raw(...) or call dualxray.basis_material_decompose directly.

Usage

Channel signals → thickness maps of the basis materials (Alvarez–Macovski / Lehmann basis decomposition).

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

各画素で、多色の順方向模型 L_c(b) = −ln(Σ_k W_ck g_k e^{−Σ_j μ_j(E_k) b_j} / Σ_k W_ck g_k) を測った L_c に合わせる b(基底ごとの厚み [cm])を、分散 var(L_c) ≈ var_c/mean_c² で重みをつけた Gauss–Newton で解く(チャネル数 = 基底の数なら連立方程式の厳密解、多ければ重みつき最小二乗 = 高計数での最尤)。初期値は空きのスペクトルの実効 μ の線形解。基底の厚みは負になりうる(水と Al の基底でポリエチレンは Al が負)—— 物理の厚みではなく「同じ減衰を作る基底の組合せ」。

拒否(fail-closed): 信号が 0 以下・非有限の画素、DECOMP_MAX_ITER 回で DECOMP_TOL_CM に収束しない画素、|b| > DECOMP_MAX_THICKNESS_CM に飛ぶ画素は NaN にして rejected に数える(黙って値を返さない)。反復の上限・収束の幅・厚さの上限は引数にしない —— Gauss–Newton は 3〜6 回で 1e-6 cm に収束し、どの値にしても解ける画素の答えは変わらない(効かないノブは置かない、2026-10-18)。チャネル数 < 基底の数は ValueError(解が決まらない)。

返り値: dict(thickness (B, H, W) [cm], basis, rejected (H, W) bool, n_rejected, iterations, residual (H, W) = 重みつき残差の二乗和)。opstomography.call は thickness だけを返す。

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_dual_energy_xray — py -3.11 examples/poc_dual_energy_xray.py

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

xray_channel_projection · r_value_map · effective_z_map

Same category (spectral_xray)

material_xray_table · material_xray_attenuation · material_xray_constants · material_effective_z · xray_tube_spectrum · xray_beam_quality · photon_counting_channels · dual_kvp_channels


*Provenance: dualxray.py — TOMOGRAPHY 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.