eloy.detection#

Source detection utilities for astronomical images.

This module provides functions for cleaning close coordinates and detecting stars in images using thresholding and morphological operations.

Functions#

clean_close_coords(coords[, min_separation])

Remove coordinates that are closer than a minimum separation.

stars_detection(image[, threshold, opening])

Detect stars in an image using thresholding and morphological opening.

Module Contents#

eloy.detection.clean_close_coords(coords, min_separation=30)[source]#

Remove coordinates that are closer than a minimum separation.

Parameters:
  • coords (np.ndarray) – Array of (x, y) coordinates.

  • min_separation (float, optional) – Minimum allowed separation between coordinates.

Returns:

Filtered array of coordinates with minimum separation enforced.

Return type:

np.ndarray

eloy.detection.stars_detection(image, threshold=5, opening=5)[source]#

Detect stars in an image using thresholding and morphological opening.

Parameters:
  • image (np.ndarray or object with .data attribute) – 2D image data or object with .data attribute.

  • threshold (float, optional) – Detection threshold in units of standard deviation above the median.

  • opening (int, optional) – Size of the morphological opening kernel.

Returns:

List of skimage.measure._regionprops.RegionProperties objects for detected regions.

Return type:

list