scarlet2.detect

scarlet2.detect#

Detection methods

Higher-level helpers (get_wavelets, QuadTreeRegion, get_peaks, …) are adapted from scarlet1’s detect.py.

Uses NumPy rather than JAX because detection involves dynamic data structures (variable-length peak lists, irregularly shaped footprints) that are not compatible with JAX’s JIT. Both NumPy and JAX arrays are accepted as inputs.

Classes

Footprint(footprint, peaks, bounds)

A detected footprint (connected region above threshold) in an image.

HierarchicalFootprint(peak, int], bbox, ...)

A source detected in the starlet hierarchy.

Peak(y, x, flux)

A peak (local maximum) in a Footprint.

QuadTreeRegion(bbox[, capacity, ...])

A QuadTree that stores bounding boxes (rather than points).

SingleScaleStructure(scale, footprint)

A connected set of pixels with common peaks at a single wavelet scale.

Functions

box_intersect(box1, box2)

Check whether two Box instances overlap.

footprint_intersect(footprint1, box1, ...)

Check whether two footprint masks overlap.

footprint_iou(source1, source2)

Compute intersection over union (IoU) between two source footprints.

footprints(image[, min_separation, ...])

Detect footprints and their peaks in an image.

get_blend_structures(detect[, scales, ...])

Build SingleScaleStructure objects for the third wavelet scale.

get_blend_trees(detect[, scales, ...])

Build a QuadTreeRegion for each wavelet scale in detect.

get_detect_wavelets(image, variance[, ...])

Get starlet coefficients of a detection image for source finding.

get_wavelets(images, variance[, max_scale])

Compute significant starlet coefficients for a multi-band image cube.

hierarchical_footprints(obs[, scales, ...])

Decompose an observed image into a list of HierarchicalFootprint objects.

multiscale_footprints(obs[, scales, strict, ...])

Detect footprints at multiple starlet scales from an observation.

split_footprint(fp, image[, min_area])

Split a multi-peak Footprint into single-peak sub-footprints.