Skip to content

Feature/sep star detection#2887

Open
jerrylewisbh wants to merge 2 commits into
aaronwmorris:devfrom
jerrylewisbh:feature/sep-star-detection
Open

Feature/sep star detection#2887
jerrylewisbh wants to merge 2 commits into
aaronwmorris:devfrom
jerrylewisbh:feature/sep-star-detection

Conversation

@jerrylewisbh
Copy link
Copy Markdown

The Problem
The existing star detection correlates each frame against a synthetic 15×15 blurred circle. This approach has some limitations on real allsky images: it assumes stars have a fixed shape that rarely matches a wide-angle lens, it lacks a sky background model (making it vulnerable to light pollution, clouds, and noise), and the threshold is a raw correlation value (0–1) with no physical meaning. The reported star count is often unreliable and difficult to tune.

Changes Made

  • This PR adds SEP (Source Extractor Python) as an optional star detection method. SEP models and subtracts the varying sky background, then extracts sources based on a clear, physical sigma threshold (e.g., 5× the local noise).
  • Implements the SEP detection algorithm as a drop-in option in the processing pipeline.
  • Sizes the drawn marker circles proportionally based on the actual measured size of each star, so brighter/larger stars get larger markers.
  • Updates the Settings UI with a new "Method" dropdown and dynamic threshold fields (enabling/disabling the appropriate threshold input based on the chosen method).
  • Adds fallback handling for extraction errors and ensures the system handles mask conventions smoothly.
  • Uses lazy loading for the new library, meaning the sep package is only imported and required if the user actively selects the SEP method.
  • Backward compatibility: Preserves the existing template method as the default, ensuring no changes or disruptions for current users unless they explicitly switch.

Dependency Note: Requires pip install sep>=1.4.1 to use the new method.

Adds IndiAllSkyStarsSEP using the sep library to estimate the sky
background and detect real astronomical sources, selectable via a new
DETECT_STARS_METHOD config key ('template' or 'sep'). Adds
DETECT_STARS_SEP_THOLD (sigma threshold, default 5.0). The Settings
page shows both fields with JS show/hide between the two thresholds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant