Step 1
Inspect the scalar image
The example contains two compact peaks, a faint bridge, an asymmetric outer envelope, and a fixed realization of Gaussian background noise. The image is two-dimensional and the PSF FWHM is specified in pixels.

Step 2
Estimate the background and smooth at the PSF scale
The paper preset starts with the outer 20 per cent border, estimates the background with the median and 1.4826 MAD, and iteratively excludes provisional source pixels. It reports the final background mask, background level, scatter, and number of iterations.
background = estimate_background(
image, error=error, psf_fwhm=4.0, preset="paper"
)
support_stage = prepare_support(
image,
background=background.background,
sigma_bg=background.sigma_bg,
psf_fwhm=4.0,
preset="paper",
)

Step 3
Construct the provisional support
Pixels at or above the smoothed 1.5-sigma threshold are closed and dilated with PSF-scaled circular footprints. Internal holes are not filled. Connected-component selection is postponed until supplied centres are known.

Step 4
Review centre candidates
Local maxima above five background sigmas are collapsed by connected plateau and ranked by smoothed intensity. The numbered overlay and table persist the coordinates and ranking used for selection.

| candidate | x | y | smoothed peak | significance |
|---|---|---|---|---|
| 0 | 50 | 57 | 1.00966 | 53.26 |
| 1 | 97 | 63 | 0.87037 | 45.89 |
Step 5
Select the supplied centres
The example selects candidates [0, 1]. An analysis may
select other candidate indices or bypass candidate detection with
centres measured independently. Centre count is therefore an explicit
user decision.
selected = [0, 1]
centres = select_centres(candidates, indices=selected)

Step 6
Retain the connected support containing every centre
The final support is the one 8-connected provisional component that contains all supplied centres. If selected centres lie in different components, the function raises an error; it does not join components or silently discard a centre.
final = finalize_support(
support_stage.provisional_support, centres, connectivity=8
)

Step 7
Build both radial coordinates
build_geometry receives only the final support and
supplied centres. It does not repeat image preparation or infer new
centres. The public result stores its distance and coordinate arrays
in float64 precision.
geometry = build_geometry(final.support, centres)
rho_d = geometry.rho_D
rho_x = geometry.rho_X

Step 8
Measure a registered tracer
Geometry is reusable. A registered intensity, colour, velocity, age, or metallicity image can be summarized without changing the support, centre assignment, or radial coordinates.
brightness = radial_profile(image, geometry, coordinate="rho_D")
progression = radial_profile(image, geometry, coordinate="rho_X")
Focused examples
Continue with the notebooks
Each notebook has one purpose and can be downloaded independently.