photometry op• 資料種類:image2d × keypoints → table
• 呼叫:import astrostack; astrostack.aperture_photometry(image, centers, r_aperture=5.0, r_inner=8.0, r_outer=12.0, read_sigma=0.0, gain=1.0, supersample=8)(或 opsastrostack.get("aperture_photometry"))
圓形孔徑 + 環形背景的測光(經典 CCD 測光)。
> 以下的詳細說明為原文 —— 摘要與標題已翻譯。
開口内の画素は副画素で重み付けする(`supersample^2` 点の標本化)ので、
半径が整数でなくても面積が階段状に飛ばない。背景は `r_inner〜r_outer`
の環の中央値(隣の星が環に入っても引きずられない)。
フラックスは `sum(w * (I - background))`、S/N は古典的な CCD 方程式
(Merline & Howell, *Exp. Astron.* 6, 163 (1995); Howell, *Handbook of CCD
Astronomy*)::
SNR = F / sqrt(F/gain + A*(B/gain + read_sigma^2))
ここで `A は開口の実効画素数、B は背景レベル。read_sigma=0` かつ
`gain=1 なら純 Poisson の F/sqrt(F + A*B)` に落ちる。
Returns 各星 1 つの dict の `list(table 語彙)。キーは row` /
`col / flux / background(1 画素あたり)/ area_px`(開口の実効
画素数)/ `n_annulus / snr / flux_error / mag_instrumental`
(`-2.5 log10(flux)、フラックスが非正なら nan`)。
Ground truth it reproduces(`tests/test_astrostack.py`): ノイズ無しの
ガウシアン星(フラックス 10000 e-)に対して、半径 `r` の開口が拾う割合は
`1 - exp(-r^2/(2 sigma^2))`。開口を広げれば厳密に一致する ——
`r = 8 sigma` では sigma = 1.0 / 1.5 / 2.0 / 3.0 のどれでも
測定 10000.00000、誤差 -0.0000 %。
小さい開口には系統的な負のずれが残る、という正直な話。 `r = 3 sigma`
では実測が理論を下回る::
sigma = 1.0 -> 9798.57 / 9888.91 = -0.914 %
sigma = 1.5 -> 9850.70 / 9888.91 = -0.386 %
sigma = 2.0 -> 9868.61 / 9888.91 = -0.205 %
sigma = 3.0 -> 9879.86 / 9888.91 = -0.092 %
これはバグではなく画素化そのもの。閉形式は連続なガウシアンを円で積分した
値だが、こちらは「画素の総フラックス × 円に入る面積の割合」を足している。
開口の縁にある画素では、円の内側(中心寄り)の方が実際には明るいので、
画素平均で代表すると必ず少なく出る。誤差が `sigma` の 2 乗に反比例
して減る(1.0→3.0 で 10 倍)のがその証拠で、標本化が良くなるほど画素平均と
真の分布の差が縮む。開口を広げれば縁の画素の寄与自体が消えるので誤差も消える。
`supersample は**円の面積**の離散化だけを直す(実測: r=4.5` で
`pi r^2 に対し相対 1.6e-3、r=3` で 2.5e-4)。上のずれとは別の話で、
上げても縁の画素平均の偏りは消えない。
Raises `ValueError: 半径の順序が `0 < r_aperture <= r_inner <
r_outer`` でない / *supersample* が 1 未満 / *gain* が非正 /
*centers* が `(N, 2)` でない場合。
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• 演算法的正典(作者・年份)與用途見上面的族使用指南。
• astro_stacking — py -3.11 examples/astro_stacking.py
• poc_astro_photometry — py -3.11 examples/poc_astro_photometry.py
• poc_nuclei_ploidy — py -3.11 examples/poc_nuclei_ploidy.py
table 作為輸入)—
photometry)*Provenance: astrostack.py — ASTROSTACK 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.