get_blend_trees

get_blend_trees#

scarlet2.detect.get_blend_trees(detect, scales=None, min_separation=0, min_area=9, thresh=0)[source]#

Build a QuadTreeRegion for each wavelet scale in detect.

Parameters:
  • detect (ndarray, shape (scales+1, height, width)) – Masked starlet coefficients (e.g. from get_detect_wavelets()).

  • scales (list of int, optional) – Indices into detect specifying which scales to use. If None (default) all scales are used.

  • min_separation (float, optional) – Minimum pixel separation between peaks within a footprint.

  • min_area (int, optional) – Minimum number of pixels a footprint must contain to be kept.

  • thresh (float, optional) – Detection threshold; pixels must strictly exceed this value.

Returns:

  • trees (list of QuadTreeRegion) – One tree per selected scale.

  • all_footprints (list of list of Footprint) – Raw footprints at each selected scale (same ordering as trees).