Known-truth checks of an open deblending stack

Russell Parrish, Parallax Metrology. Draft note, 23 November 2026. Not peer reviewed. · Code: two reproducers below.

See also: Exact-answer checks of open measurement code, which places these checks beside eight seismic and infrasound array tools.

Abstract. We tested scarlet-lite, BlendingToolKit (BTK) and SEP with inputs whose correct answer is known exactly. Four checks gave four different results. (1) The default initializer in scarlet-lite behaves differently when the same image is expressed in different flux units. (2) A BTK helper named mse returns root mean squared error. (3) BTK's matcher can return fewer feasible pairs than the maximum, a difference in objective that is already the subject of a BTK issue. (4) SEP agrees with known truth on flux, centroid and segmentation sums. Separately, on a fixed 72-scene development cohort, supplying complete source catalogs to scarlet-lite raised blended-source recovery from 16/108 to 55/108 and still fell short of the task's quality floor. Several diagnostic ideas we tested before these checks did not meet their gates; they are listed near the end.

1. Four checks

Tool and versionKnown-truth inputResult
scarlet-lite, revision ccef28ce (main at the time of writing)Two synthetic sources, each a sum of sigma 2 and sigma 5 Gaussians, variance 100, image scaled by 1 and by 0.001Scale 1: each source starts as one PSF component (225 nonzero pixels). Scale 0.001: each starts as two extended components (57 and 1,581 pixels). Detection maximum 2.6 against threshold 5, versus 2,600 against 0.005.
BTK 1.0.9 (the two relevant source files are identical at main 6901e8c)Constant image differences 0, 2 and -3mse returns [0, 2, 3]. Mean squared error would be [0, 4, 9]. The docstring and tutorials say mean squared error.
BTK 1.0.9, matcherTwo to four sources; strict distance < 5 pixels; exact maximum by exhaustive enumerationStock matching returns 1 pair where 2 are feasible (also 2 of 3, 2 of 4). Minimum total distance followed by radius rejection does not promise maximum cardinality. This is a policy difference, and BTK issue 345 describes it.
SEP 1.4.1Sampled Gaussians with known totals; one masked neighborAperture flux, centroid, segmentation sums and the masked case agree within tolerances set before the run.

Check 1 is a dimensional mismatch: the default detection image scales as 1/a with the image units while its threshold scales as a. Passing the observed image as the detection image through the documented single-band option removes the dependence on the historical input (relative L1 change 1.37 before, 2.0e-16 after). We did not test whether final fitted fluxes change. We asked upstream whether the behavior is intended (lsst/scarlet_lite issue 30), and asked the same question of the mse naming (LSSTDESC/BlendingToolKit issue 542). The LSST production caller supplies its own detection image and does not use this default. One upstream revision was tested. Checks 2 to 4 used constructed fixtures, not survey data.

2. Operating windows on a fixed development cohort

The cohort is 72 rendered scenes: 36 isolated controls and 36 three-source blends built from 36 COSMOS parents in 12 disjoint groups, with simulated noise and the pinned BTK rendering. It was exposed during development, so these are measured operating points, not population estimates. The task was preliminary full-stamp r-band flux, success defined as a one-to-one match within 5 pixels and flux error at most 20%.

Source catalog given to scarlet-liteBlended sources recoveredAll sources
Blind SEP detections (control)16/10851/144
Complete catalog, true placements55/10890/144
Complete catalog, isolated peaks (privileged sensitivity)54/10889/144

The task required 116/144. Parent-group bootstrap (10,000 draws over 12 groups, 95% percentile intervals): placement blended successes 46 to 64 of 108; paired net gain 25 to 52 sources. By separation of the three sources (PSF FWHM units), blind versus placement: 0.5, 2/36 to 10/36; 1.0, 2/36 to 17/36; 2.0, 12/36 to 28/36. A complete catalog combines knowing the number of sources with knowing their positions; the two are not separated here. That undetected sources hurt scarlet-style fitting is established in the original paper (ref. 1).

Left: sources recovered within 20 percent flux error out of 144, blind 51, complete placement 90, isolated peaks 89, against a task floor of 116. Right: blended sources recovered out of 36 at each separation, blind 2, 2 and 12; placement 10, 17 and 28; isolated peaks 8, 18 and 28.
Same 72 scenes and fixed scarlet-lite estimator; 36 parents in 12 groups. Placement is primary; peaks are a sensitivity. Both complete catalogs use privileged information. Neither is deployable detection performance or a strict recovery bound.
Isolated sources (36)RecoveredCatalog stage time summed over the 36 isolated scenes, excluding startup
SEP Kron aperture photometry35/360.050 s
scarlet-lite direct model35/361.320 s

The two estimators recover the same isolated sources. Each scene's stage time is the median of three repeats; these are the sums over the 36 isolated scenes (about 1.4 ms and 37 ms per scene), on one machine with warm caches, not a deployment benchmark. In blends both estimators recover few sources (SEP 20/108, scarlet-lite 16/108); 62 of the 144 true sources have no matching report at all, and no later report-triage step can recover them.

3. What did not work

Before the checks above we ran tests of whether structure or fit-internal diagnostics identify unreliable deblended photometry. Apart from the first, which was an exploratory pilot, each had its gate written down by us before scoring (not externally preregistered), and each failed it on this cohort: a graph reading of image structure as a guarantee of size accuracy (exploratory pilot: 15 of 35 zero-variation cases had size error above 20%); an aperture and neighbor-mask sensitivity screen; fixed-model flux-profile excursions plus residuals (all 82 blind reports had excursion under 8.5%, yet 31 to 35 were wrong); alternative matching policies for choosing a configuration (all three policies agreed on all 72 detector catalogs); a cheap-versus-heavy selector (even a truth-informed selector reaches at most 55 of the 72 required successes); and a conditional-spectrum sampler for error review ordering (it captured 6 to 8 errors in 21 reviews; the native global-fit ordering captured 11 to 13). The sampler was numerically sound. A three-diagnostic fixed-warning count was also computed: all three warning rules were silent on all 46 blended reports, correct ones included, so it cannot separate blind diagnostics from thresholds that never fire. These negative results map where fit-internal checks stay quiet while photometry is wrong; they do not show that no useful screen exists.

4. Not established

5. Reproducers

Two short scripts: code/c5u_unit_dependence_reproducer.py (62 lines, NumPy and scarlet-lite) prints the initialization branch and support at both scales; code/btk_mse_reproducer.py (14 lines, NumPy and BTK) prints the expected MSE, expected RMS and the returned value.

Expected MSE: [0.0, 4.0, 9.0]
Expected RMS: [0.0, 2.0, 3.0]
Returned: [0.0, 2.0, 3.0]

References

  1. Melchior P, Moolekamp F, Jerdee M, Armstrong R, Sun A-L, Bosch J, Lupton R. SCARLET: source separation in multi-band images by constrained matrix factorization. Astron Comput 24:129 (2018). arXiv:1802.10157.
  2. BlendingToolKit, LSSTDESC. github.com/LSSTDESC/BlendingToolKit, issue 345 (matching), issue 542 (mse), commit 6901e8c.
  3. scarlet-lite, LSST. github.com/lsst/scarlet_lite, issue 30, revision ccef28ce.
  4. SEP, Python and C library for Source Extractor. sep.readthedocs.io.