star_detect — ASTROSTACK photometry op

• Data kinds: image2d → keypoints

• Call: 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') (to call the implementation directly, import astrostack; astrostack.star_detect(image, threshold_sigma=5.0, min_separation=3, max_stars=200, edge_margin=None, centroid_box=None, method='mad'); from the registry, opsastrostack.get("star_detect"))

Usage

Detect stars and return their (row, col) centroids.

Background and noise are estimated with the same robust estimator as noise_sigma, and local maxima exceeding background + threshold_sigma * sigma are picked (judged by agreement with a maximum filter, so within min_separation pixels no 2 appear). The centre is not the pixel position of the threshold but, in a window of centroid_box (default 2*min_separation+1), the centroid weighted by background-subtracted intensity —— this is the only reason for subpixel position accuracy; the centroid of connected components (detect.segment_objects) depends on brightness by the amount of the hard threshold and is biased.

Sorted by brightness and cut off at max_stars. Only stars further inside than edge_margin (default centroid_box // 2) from the border are returned —— for a star whose window sticks out of the image the centroid is pulled towards the border, so it is dropped rather than silently returning a biased value.

Returns (N, 2) float64 keypoints. If there are none, (0, 2) (empty is a legitimate answer, so it is not an exception —— star-free fields of view exist).

Raises ValueError: if not 2-D / contains non-finite values / *threshold_sigma* is non-positive / *min_separation* is less than 1 / *max_stars* is less than 1.

★The name is astronomical, but the content is domain-neutral (robust background estimate + local maxima above kσ + centroid). For detecting and subpixel-locating point targets / bright spots / spots / small targets / micro-defects / particles it can be used as-is —— picking up drifting objects in search-and-rescue aerial imagery, counting bright spots in fluorescence microscopy: for such uses this is the right entry point. The Japanese queries op_find("輝点 検出") / op_find("点状目標") / op_find("粒子 検出") (bright spot detection / point target / particle detection) return this op first (measured 2026-10-11; op_find("点 検出") does not rank it high, because "point" and "detection" match many ops). Until this paragraph was added on 2026-09-08, multi-word Japanese queries returned 0 hits because of how the search was built; although this is the only 2-D op returning a coordinate list with subpixel centroids, it could not be reached from Japanese wording (poc_search_sweep_width ran into this). If you need region centroids, use the blob_label family; if you only need a mask of the maxima, sk_local_maxima.

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)

• 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

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

psf_fit · aperture_photometry

Same category (photometry)

psf_fit · aperture_photometry


*Provenance: astrostack.py — ASTROSTACK 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.