aperture_photometry — ASTROSTACK photometry op

• Data kinds: image2d × keypoints → table

• Call: import fullseye as fs; fs.ledger.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) (implementation को सीधे call करना हो तो 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), registry से लेना हो तो opsastrostack.get("aperture_photometry"))

उपयोग

वृत्ताकार aperture + annular background से photometry (पारंपरिक CCD photometry)।

Aperture के अंदर के pixels को subpixel स्तर पर weight किया जाता है (supersample^2 points से sampling), इसलिए radius पूर्णांक न होने पर भी area सीढ़ी की तरह नहीं उछलता। Background, r_inner से r_outer तक के annulus का median है (annulus में पड़ोसी star आ जाए तब भी उसके साथ नहीं खिंचता)।

Flux sum(w * (I - background)) है; S/N classical CCD equation का पालन करता है (Merline & Howell, *Exp. Astron.* 6, 163 (1995); Howell, *Handbook of CCD Astronomy*)::

SNR = F / sqrt(F/gain + A*(B/gain + read_sigma^2))

जहाँ A aperture की effective pixel count है और B background level। read_sigma=0 और gain=1 पर यह pure-Poisson F/sqrt(F + A*B) बन जाता है।

हर star के लिए एक dict की list लौटाता है (table vocabulary)। Keys हैं row / col / flux / background (प्रति pixel) / area_px (aperture की effective pixel count) / n_annulus / snr / flux_error / mag_instrumental (-2.5 log10(flux), flux धनात्मक न हो तो nan)।

जिस ground truth को यह दोहराता है (tests/test_astrostack.py): noise-free Gaussian star (flux 10000 e-) के लिए, radius r वाले aperture में आने वाला हिस्सा 1 - exp(-r^2/(2 sigma^2)) है। Aperture चौड़ा करने पर यह बिल्कुल मेल खाता है —— r = 8 sigma पर, हर sigma = 1.0 / 1.5 / 2.0 / 3.0 के लिए measurement 10000.00000 है, error -0.0000 %।

एक ईमानदार टिप्पणी: छोटे apertures में एक systematic ऋणात्मक offset बचा रहता है। r = 3 sigma पर measurement theory से नीचे आता है::

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 %

यह bug नहीं बल्कि खुद pixelisation है। Closed form एक continuous Gaussian को circle पर integrate करता है, जबकि यहाँ "pixel का कुल flux × circle के अंदर area का हिस्सा" जोड़ा जाता है। Aperture के किनारे वाले pixels में circle का अंदरूनी हिस्सा (centre की ओर) असल में ज़्यादा चमकीला होता है, इसलिए उसे pixel mean से दर्शाने पर परिणाम हमेशा बहुत कम आता है। Error sigma के वर्ग के व्युत्क्रम अनुपात में घटता है (1.0→3.0 पर 10 गुना), और यही प्रमाण है: sampling जितनी बेहतर, pixel mean और असली distribution का अंतर उतना कम। Aperture चौड़ा करने से किनारे के pixels का योगदान पूरी तरह हट जाता है, इसलिए error भी गायब हो जाता है।

supersample केवल circle के area के discretisation को ठीक करता है (measured: r=4.5 पर pi r^2 के मुकाबले relative 1.6e-3, r=3 पर 2.5e-4)। यह ऊपर वाले offset से अलग मामला है; इसे बढ़ाने से किनारे के pixel mean का bias नहीं हटता।

Raises ValueError: अगर radii 0 < r_aperture <= r_inner < r_outer क्रम में नहीं हैं / *supersample* 1 से कम है / *gain* धनात्मक नहीं है / *centers* (N, 2) नहीं है।

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• astro_stacking — py -3.11 examples/astro_stacking.py

• poc_astro_photometry — py -3.11 examples/poc_astro_photometry.py

• poc_exoplanet_transit — py -3.11 examples/poc_exoplanet_transit.py

• poc_nuclei_ploidy — py -3.11 examples/poc_nuclei_ploidy.py

• poc_real_sky_photometry — py -3.11 examples/poc_real_sky_photometry.py

वे अगले ops जिनसे type जुड़ता है (table को input के रूप में लेते हैं)

—

इसी category के (photometry)

star_detect · psf_fit


*Provenance: astrostack.py — ASTROSTACK operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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