multiscale_footprints

multiscale_footprints#

scarlet2.detect.multiscale_footprints(obs, scales=None, strict=True, K=3, split_peaks=True, image_type='ground', min_separation=0, min_area=9, thresh=0, return_intermediates=False)[source]#

Detect footprints at multiple starlet scales from an observation.

Builds a detection image from the inverse-variance weighted sum of obs.data, computes its starlet decomposition, and detects connected footprints at each requested scale. Optionally splits footprints that contain more than one peak into non-overlapping single-peak sub-footprints via a watershed algorithm.

Parameters:
  • obs (Observation) – The observation providing image data and per-pixel weights.

  • scales (list of int, optional) – Starlet scale indices to detect on. Default is [1, 2, 3].

  • strict (bool, optional) – If True, the coarse residual plane is pushed one scale higher so that the selected scales are cleanly separated from the smooth background. Default True.

  • K (float, optional) – Detection threshold multiplier: wavelet coefficients with |w| > K * sigma_j are considered significant. Default 3.

  • split_peaks (bool, optional) – If True (default), footprints that contain more than one peak are split into non-overlapping single-peak sub-footprints using a priority-queue watershed. If False, multi-peak footprints are returned intact.

  • image_type (str, optional) – PSF width regime used when computing the multi-resolution support. "ground" (default) for wide ground-based PSFs; "space" for narrow space-based PSFs.

  • min_separation (float, optional) – Minimum pixel distance between peaks within a footprint. Dimmer peaks closer than this to a brighter one are suppressed. Default 0.

  • min_area (int, optional) – Minimum number of pixels a footprint (or watershed sub-footprint) must contain to be kept. Default 9.

  • thresh (float, optional) – Additional detection threshold; pixels must strictly exceed this value to be included in a footprint. Default 0.

  • return_intermediates (bool, optional) – If True, return a 4-tuple (detect, sigma, scales, all_footprints) that exposes the intermediate products. Default False.

Returns:

  • all_footprints (dict mapping int list of Footprint) – Footprints at each requested scale, keyed by scale index. When split_peaks is True every footprint carries exactly one peak.

  • detect (ndarray, shape (max_scale+2, height, width)) – Masked starlet coefficients of the detection image. Only returned when return_intermediates is True.

  • sigma (ndarray, shape (max_scale+2,)) – Per-scale noise estimates used for thresholding. Only returned when return_intermediates is True.

  • scales (list of int) – The sorted list of scales that were used. Only returned when return_intermediates is True.

See also

get_detect_wavelets()

builds the detection image.

split_footprint()

watershed splitting of multi-peak footprints.

hierarchical_footprints()

higher-level function that links footprints across scales into a source hierarchy.