aperture_photometry — ASTROSTACK photometry op

데이터 종류: image2d × keypointstable

호출: 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_innerr_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)` でない場合。

참고(샘플 데이터·문헌)

• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.

• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.

• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.

실행 가능한 예제(이 연산자를 실제로 호출하는 검증된 샘플)

astro_stackingpy -3.11 examples/astro_stacking.py

poc_astro_photometrypy -3.11 examples/poc_astro_photometry.py

poc_nuclei_ploidypy -3.11 examples/poc_nuclei_ploidy.py

타입이 이어지는 다음 연산자(table 를 입력으로 받는 것)

같은 카테고리(photometry)

star_detect · psf_fit


*Provenance: astrostack.py — ASTROSTACK 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

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