star_detect — ASTROSTACK photometry op

• 資料種類:image2d → keypoints

• 呼叫: import fullseye as fs; fs.ledger.star_detect(image, threshold_sigma=5.0, min_separation=3, max_stars=200, edge_margin=None, centroid_box=None, method='mad')(要直接呼叫實作,import astrostack; astrostack.star_detect(image, threshold_sigma=5.0, min_separation=3, max_stars=200, edge_margin=None, centroid_box=None, method='mad');從台帳取用則 opsastrostack.get("star_detect"))

用法

偵測恆星並回傳 (row, col) 重心列表。

以與 noise_sigma 相同的穩健估計求出背景與雜訊,挑出超過 background + threshold_sigma * sigma 的局部最大值 (以與最大值濾波的一致來判定,因此 min_separation 像素以內不會出現 2 個)。中心不是閾值的像素位置,而是 centroid_box (預設 2*min_separation+1)窗口內以扣除背景後的強度加權的質心 —— 這是得到次像素位置精度的唯一理由,連通成分的質心(detect.segment_objects)會因硬閾值而隨亮度產生偏差。

依亮度排序,取前 max_stars 個截斷。只回傳距邊緣 edge_margin (預設 centroid_box // 2)以內側的星 —— 窗口超出影像的星,其質心會被拉向邊緣,與其默默回傳有偏的值,不如捨棄。

Returns (N, 2) float64 keypoints。1 個也沒有時回傳 (0, 2) (空是正當的答案,因此不作為例外 —— 沒有星的視野是存在的)。

Raises ValueError:非 2-D / 含非有限值 / *threshold_sigma* 非正 / *min_separation* 小於 1 / *max_stars* 小於 1 時。

★名字是天文的,但內容與領域無關(穩健的背景估計 + 超過 kσ 的局部最大值 + 質心)。可直接用於點狀目標 / 亮點 / 光斑 / 小目標 / 微小缺陷 / 粒子的偵測與次像素定位 —— 在搜救空拍中撿拾漂流物、數螢光顯微鏡的亮點,這類用途正確的入口就是它。op_find("輝点 検出") / op_find("点状目標") / op_find("粒子 検出")(日文查詢) 會把本 op 排在第一位(2026-10-11 實測。op_find("点 検出") 中的「點」「偵測」會命中許多 op,所以排不到前面)。在 2026-09-08 加入這一段之前,日文的多詞查詢由於檢索的實作方式總是 0 筆,明明回傳帶次像素質心座標列的 2-D op 只有這一個,卻無法從日文找到它(poc_search_sweep_width 踩到了這個坑)。若需要區域的質心,用 blob_label 系列;若只要極大值的遮罩,用 sk_local_maxima。

參考(範例資料、文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

• 演算法的正典(作者、年份)與用途見上面的族使用指南。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• astro_stacking — py -3.11 examples/astro_stacking.py

• poc_exoplanet_transit — py -3.11 examples/poc_exoplanet_transit.py

• poc_search_sweep_width — py -3.11 examples/poc_search_sweep_width.py

• poc_star_astrometry — py -3.11 examples/poc_star_astrometry.py

型別可銜接的下一個運算子(可接受 keypoints 作為輸入)

psf_fit · aperture_photometry

同類別(photometry)

psf_fit · aperture_photometry


*Provenance: astrostack.py — ASTROSTACK 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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