---
title: 'SourceXtractor++: Astronomical Source Extraction'
url: https://www.emergentmind.com/topics/sourcextractor
type: topic
---

# SourceXtractor++: Astronomical Source Extraction

Searching arXiv for recent SourceXtractor++ papers and related Euclid studies.
I’ll use the arXiv search tool to retrieve relevant papers.
SourceXtractor++ is an open-source astronomical source-detection and measurement package developed by the Euclid Consortium as a modern replacement for and extension of SExtractor. Written mainly in C++, it was designed for the survey regime in which detection, photometry, and morphology must be performed consistently over single-band images, multi-band data, data cubes, multi-extension FITS products, and heterogeneous image sets with different pixel grids. In current practice it functions not only as a catalog-generation tool but also as a parametric model-fitting framework that is already operational in multiple parts of Euclid processing and central to several Euclid morphology analyses [2212.02428].

## 1. Origin, purpose, and survey context

SourceXtractor++ was developed because Euclid requires a data-reduction system adapted to a much more demanding regime than that addressed by the original SExtractor. The Euclid mission is described as surveying about \(15{,}000~\mathrm{deg}^2\) in the Wide Survey and \(40~\mathrm{deg}^2\) in the Deep Survey, with an expected source count of roughly \(10^9\) objects. The combination of huge source counts, multiple bands and image stacks, overlapping objects, different footprints and resolutions, model-based morphology fitting, and pipeline configurability motivated a redesign rather than an incremental update [2212.02428].

The package preserves the basic spirit of source extraction while introducing a more general architecture for model fitting and multi-image analysis. It is already used in Euclid operations for object detection, photometric validation of ground-based data, and flexible model fitting for morphology analysis. Within the Euclid Morphology Challenge it was selected to perform model fitting with Sérsic and Disk+Sérsic models on all Euclid objects [2212.02428].

Euclid challenge papers place SourceXtractor++ among the candidate tools for pipeline-level morphology extraction. The structural-parameter challenge concluded that Euclid official data releases should deliver robust structural parameters for at least 400 million galaxies in the Euclid Wide Survey by mission end, while the Q1 morphology analysis states an eventual expectation of about 450 million galaxies with \(\IE<23\) reliably fitted by the end of the mission [2209.12907] [2503.15309]. This suggests that SourceXtractor++ is not merely a local fitting utility but part of the infrastructure through which Euclid’s large-scale morphological catalogues are being constructed.

## 2. Processing architecture and model formalism

A central feature of SourceXtractor++ is its modular workflow. The typical processing sequence is organized as detection, grouping, and measurement/model fitting. This decomposition is important because Euclid analyses often require explicit handling of multiple overlapping sources across many images with different pixel grids, footprints, resolutions, and WCS solutions [2212.02428].

Configuration is largely controlled through a Python configuration file executed at the start of processing. The configuration layer supports preprocessing of inputs, band selection, keyword adjustments, flexible workflow control, and future pipeline integration. The package’s development trajectory includes making the system more Pythonic and more clearly separating detection from measurement, with later examples showing direct Python-controlled execution of detection, grouping, and measurement from within the workflow itself [2212.02428].

For morphology work, SourceXtractor++ supports standard analytic light-profile models and constrained fitting concepts. The documented model classes include Sérsic, exponential disk, deVaucouleur bulge, point-like, Disk+Bulge, Disk+Sérsic, and Sérsic + Bar + Ring models, together with priors, dependent parameters, and WCS-based parameter negotiation. A notable extensibility feature is support for user-defined functional forms through ONNX models evaluated with the ONNX Runtime; the published example fits a Sérsic + Bar + Ring model to M95 [2212.02428].

The single-component Sérsic law used in Euclid morphology analyses is the standard form
\[
I(r) = I_\mathrm{e}\exp\left\{-b_n\left[\left(\frac{r}{R_\mathrm{e}}\right)^{1/n}-1\right]\right\},
\]
where \(I_\mathrm{e}=I(R_\mathrm{e})\), \(R_\mathrm{e}\) is the effective radius enclosing half the total light, \(n\) is the Sérsic index, and \(b_n\) depends only on \(n\) [2503.15309]. In 2D elliptical form, the models also include axis ratio \(q\), position angle, and centroid [2503.15309]. In practice, this places SourceXtractor++ at the intersection of classical source extraction and explicit forward modeling of PSF-convolved galaxy structure.

## 3. Euclid Morphology Challenge and code-comparison results

The Euclid Morphology Challenge evaluated five packages—DeepLeGATo, Galapagos-2, Morfometryka, ProFit, and SourceXtractor++—on simulated Euclid-like data intended to inform Science Ground Segment pipeline choices. The challenge used five simulated fields of approximately \(0.482~\mathrm{deg}^2\) each, amounting to about 1.5 million galaxies, with analytic single-Sérsic, analytic two-component bulge+disk, and non-analytic neural-network-generated “realistic morphologies” [2209.12906] [2209.12907].

The photometric challenge defined bias, dispersion, outlier fraction, completeness, and a global score \(\mathcal{S}\). In that framework, SourceXtractor++ achieved \(\mathcal{S}=0.81\) with \(\mathcal{C}=0.96\) for single-Sérsic galaxies, \(\mathcal{S}=1.19\) with \(\mathcal{C}=0.97\) for double-Sérsic with fixed bulge index, \(\mathcal{S}=0.95\) with \(\mathcal{C}=0.97\) for double-Sérsic with free bulge index, and \(\mathcal{S}=2.11\) with \(\mathcal{C}=0.87\) for realistic morphologies [2209.12906]. The paper’s summary statement is that SourceXtractor++ typically obtained the best global diagnostics among the packages that provided complete results, particularly for single-Sérsic, double-Sérsic, and multi-band double-Sérsic fitting [2209.12906].

The structural-parameter challenge reported that all methods tend to achieve reliable structural measurements with \(10\%\) scatter on ideal Sérsic simulations down to an apparent magnitude of about 23 in one component and 21 in two components, while performance on non-analytic profiles is typically degraded by a factor of 3 and driven by systematics [2209.12907]. In the single-Sérsic structural tests, SourceXtractor++ achieved the best overall mean score, \(\mu_{\mathcal S}\approx 0.28\), with tabulated values of approximately \(\mathcal S_{r_e}=0.38\), \(\mathcal S_{b/a}=0.18\), and \(\mathcal S_n=0.29\) [2209.12907].

A recurring conclusion of both challenge papers is that priors are a decisive factor at low signal-to-noise. In the two-component structural challenge, SourceXtractor++ used an explicit \(b/t=0.022\) prior calibrated to the simulation, and the authors attribute much of its stable faint-end behavior to priors close to the true distribution. The challenge therefore did not establish a prior-free superiority theorem; rather, it showed that SourceXtractor++ can be highly effective when PSF handling, preprocessing, and priors are well matched to the data model [2209.12907].

## 4. Euclid morphology catalogues and galaxy-structure measurements

SourceXtractor++ is the fitting engine used to build the Euclid Q1 single-component morphology catalogue. In that release it was applied to all galaxies in the Q1 imaging and used in two separate setups: a fit on the VIS image alone and a joint fit on the three NISP images \((Y_{\rm E}, J_{\rm E}, H_{\rm E})\) treated together as one common structural model [2503.15309]. The VIS image provides the best angular resolution and defines the main morphological model; the combined NISP fit is used to probe wavelength dependence and colour gradients [2503.15309].

The Q1 fitting configuration is explicit. Two structural parameter sets \((R_\mathrm{e}, n, q)\) are used, one for VIS and one common to all three NISP images; the position angle is shared between the VIS and NISP models; for external optical images the VIS structural parameters are fixed and only magnitudes are allowed to vary. Initialization and bounds are also specified: \(R_\mathrm{e}\) is initialized at the isophotal semi-major axis \(a\) and allowed over \([0.01\,a,30\,a]\), \(n\) is initialized at 1 and allowed over \([0.3,5.5]\), \(q\) is initialized at the isophotal axis ratio and allowed over \([0.03,1]\), the position angle is projected onto \([-90^\circ,90^\circ]\), and the centroid is fixed using the built-in centroid function [2503.15309].

The validation program in Q1 is unusually extensive. Sérsic and isophotal axis ratios are strongly correlated with Pearson \(r=0.88\), with the fitted relation
\[
q_{\rm Sersic} = (1.0060 \pm 0.0005)\, q_{\rm iso} - 0.0768 \pm 0.0003.
\]
The Sérsic index also correlates with the non-parametric concentration index, with Pearson \(r=0.82\) between \(C\) and \(\log_{10}(n)\), and
\[
C = 2.97 + 1.81\log_{10}(n).
\]
Cross-matching to ACS-GC based on HST/ACS F606W shows median differences near zero for \(n\) and \(q\), with \(n\) below 0.1 and \(q\) below 0.01, while the Euclid VIS \(R_\mathrm{e}\) is only slightly larger than ACS-GC, with an offset under \(\sim 3\%\) for \(\IE<23\) and rising to \(\sim 6\%\) at the faint end [2503.15309].

The same study reports systematic VIS–NISP differences that are interpreted as colour gradients. NISP fits have smaller \(R_\mathrm{e}\) than VIS by about \(10\%\) on average for galaxies with \(\IE\lesssim 21\), and larger Sérsic indices, typically \(10\)–\(30\%\) higher for \(\IE<23\). Disc-dominated galaxies with \(n_{\rm VIS}\lesssim 2\) tend to have \(n_{\rm NISP}>n_{\rm VIS}\), whereas bulge-dominated systems with \(n_{\rm VIS}\gtrsim 2.5\) show ratios closer to unity or slightly below. The paper interprets these differences as evidence that redder, more compact bulge-like light dominates in NISP while VIS is more sensitive to bluer, more extended disc light, while also cautioning that rest-frame wavelength, redshift evolution, and differing PSFs and resolutions are convolved in the observed trend [2503.15309].

A complementary Euclid Early Release Observations study of the Perseus field used SourceXtractor++ for both single-Sérsic and bulge+disc decomposition. For \(\IE\le 21\), the fitted galaxies span the full Hubble sequence, with \(B/T\) from 0 to 1. The study found that the single-Sérsic effective radius is typically intermediate between bulge and disc sizes and that the single-Sérsic axis ratio tends to overestimate the disc \(b/a\), increasingly so with \(B/T\). It also measured a median \(0.4\) mag bulge–disc colour difference in \(I_E-J_E\) and redder-inside disc colour gradients, with disc \(R_\mathrm{e}\) ratios of \(\YE/\IE\sim0.95\), \(\JE/\IE\sim0.93\), and \(\HE/\IE\sim0.91\) [2502.15581]. These results sharpen the Q1 caveat that single-Sérsic fitting is a robust first-order description rather than a substitute for bulge–disc decomposition.

## 5. Cosmology, weak lensing, and simulation calibration

SourceXtractor++ is also used in cosmology-oriented workflows where morphology enters as a calibration variable rather than only as a galaxy-evolution observable. In a Euclid preparation study based on deep COSMOS stacks, the pipeline begins with source detection by SExtractor and then passes the pre-detected catalogue to SourceXtractor++ for parametric fitting. Single-Sérsic and double-Sérsic models are fitted to each source, with PSFs modeled per tile by PSFEx using Gaia DR3 stars, and nearby sources grouped via friends-of-friends using `pyfof` with a 2 arcsec linking length so that each group is jointly fitted [2604.26684].

In that work the fitted morphology is used to augment the Euclid Flagship mock catalogue for shear-calibration simulations. The multiplicative shear-calibration model is
\[
\hat g_i = (1+m_i)g_i^{\rm true} + c_i + \text{noise},
\]
and the central quantitative result is that replacing Flagship morphology with SourceXtractor++-trained morphology changes the total multiplicative bias by \(+1.14\times10^{-2}\) for the single-Sérsic case and by \(-0.74\times10^{-2}\) for the double-Sérsic case over \(20.5<I_E<24.5\). The paper states that this percent-level difference exceeds Euclid’s tight error budget by a factor of five [2604.26684]. A plausible implication is that, within Euclid’s weak-lensing pipeline, morphology modeling is a first-order calibration issue rather than a secondary descriptive one.

SourceXtractor++ also appears directly as a galaxy-shape pipeline in Euclid’s weak-lensing analysis of Abell 2390. There it serves a dual role: it builds the base photometric catalogue from VIS detections and aligned multi-band photometry, and it is reused as a third independent shape-measurement method alongside LensMC and KSB+ [2507.07629]. In the weak-lensing mode it fits a single Sérsic profile and returns PSF-corrected ellipticity estimates, best-fit size, and parameters for star/galaxy separation; the star/galaxy boundary is placed around \(r_{\rm eff}\simeq 0\farcs05\), and the ellipticity uncertainties are combined with an intrinsic shape-noise floor \(\sigma_{\epsilon,0}=0.25\) [2507.07629].

The Abell 2390 analysis reports that SourceXtractor++ yields the highest source density among the three shape catalogues, with totals of \(126~\mathrm{arcmin^{-2}}\) overall, \(102~\mathrm{arcmin^{-2}}\) for \(22<\IE<26.5\), and \(29~\mathrm{arcmin^{-2}}\) for \(\IE<24.5\). Its tangential shear profile agrees well with LensMC and KSB+, the cross component is consistent with zero, and the final mass estimate is
\[
M_{200c} = 14.5 \pm 1.1 \pm 1.6 \times 10^{14} M_\odot,
\]
with corresponding
\[
M_{500c} = 10.0 \pm 0.7 \pm 1.1 \times 10^{14} M_\odot.
\]
The first uncertainty is statistical and the second is attributed to large-scale-structure projections [2507.07629].

## 6. Broader applications, caveats, and evolving directions

Outside Euclid production catalogues, SourceXtractor++ has been used for nearby-galaxy decomposition in the EFIGI sample. One study fitted SDSS \(g,r,i\) images with bulge+disk models for lenticulars and spirals and single-Sérsic models for E, cE, cD, dE, and Im galaxies, then derived scaling relations for sizes, luminosities, surface brightnesses, and \(B/T\) across Hubble type [2305.02069]. Another combined SourceXtractor++ bulge+disk photometry with ZPEG SED fitting to show systematic increases in bulge-to-total ratio and bulge Sérsic index from the Blue Cloud across the “Green Plain” to the Red Sequence, together with reddening interpreted as fading star formation in disks [2206.04707]. In these studies, SourceXtractor++ functions as the bridge between image-domain decomposition and population-level structural inference.

The package is not presented in the literature as universally optimal under all observing conditions. The Euclid Q1 analysis emphasizes that single-Sérsic models can miss low-flux bulges, cannot fully trace the Hubble sequence, and should be treated as a robust first-order structural description rather than a replacement for bulge–disc decomposition [2503.15309]. The Euclid ERO Perseus study similarly concludes that single-Sérsic fits are useful as a fast, approximate morphological indicator but not sufficient to recover the physical structure of composite galaxies [2502.15581].

An external benchmark on simulated CSST imaging places these caveats in a broader software-comparison context. In that study, GALFIT, AstroPhot, and SourceXtractor++ all fit the same PSF-convolved single-Sérsic mock galaxies. SourceXtractor++ is described as generally competitive at the bright end and broadly consistent with the other codes in most bands and depths, but less robust than GALFIT and AstroPhot for faint, low-S/N galaxies, especially in recovering \(R_e\) and \(n\). The clearest degradations occur in the bluer bands, particularly NUV and \(u\), and the performance assessment is explicitly an optimistic upper bound because the simulations omit blending, background nonuniformity, and correlated noise [2604.24431].

The common thread across these studies is that SourceXtractor++ is strongest when its model family, priors, PSF treatment, and multi-image constraints are aligned with the data regime. The Euclid challenge papers make this point explicitly by tying faint-end behavior to adopted priors [2209.12907]. The software’s ongoing directions—more Pythonic control, deeper separation between detection and measurement, and expanded use of externally supplied object properties—suggest a trajectory toward more explicit pipeline composability rather than a narrowing of scope [2212.02428].

Source: https://www.emergentmind.com/topics/sourcextractor