skip to main content

gaia data release 4 documentation

16.3 Apsis modules

16.3.11 QSOC

Author(s): Ludovic Delchambre

16.3.11.1 Goal

The Quasar Classifier (QSOC) module aims to determine the redshift, z, and absolute Gaia G-band magnitude of the sources

  • •

    identified as quasar candidates in the qso_candidates table

  • •

    found around one of the CU4-EO input quasar, to search for gravitational lenses in the grav_lens_redshift table (see Section 13.2).

QSOC predictions are filtered according to the selection rules described in Section 16.3.11.6.

16.3.11.2 Training data and models

To predict the source redshifts, QSOC relies on a rest-frame quasar template built on 750 414 observed quasar spectra from the sixteenth release of the Sloan Digital Sky Survey (SDSS) Quasar Catalogue of Lyke et al. (2020). For each redshift probed by QSOC, this rest-frame quasar template is first converted into internally-calibrated BP/RP spectra, using procedures described in Montegriffo et al. (2023), and then compared to the observed internally-calibrated BP and RP spectra to infer the redshift of the source (see Section 16.3.11.4 for more details).

For each input SDSS spectrum, we reject fluxes outside the 380–925 nm range and those found within 0.5 nm of one of the 557.7, 589.0, 589.6, 630.0, 636.3, 761.0, 834.4 nm night sky emission lines. The spectra are then corrected for galactic extinction using the Fitzpatrick (1999) extinction curve and the Schlegel et al. (1998) extinction map, taking into account the 0.86⁢E⁢(B−V) correction of the reddening suggested by Schlafly et al. (2010). The final quasar template is computed over the rest-frame wavelength range from 72 nm to 900 nm with a logarithmic sampling of Δ⁢log⁡λ=10−4 using the method described in (Gaia Collaboration et al. 2023b, Appendix C). To allow the widest possible range of redshifts to be predicted, the borders of the composite quasar spectrum are extrapolated using a linear fit of the Lyman α break for wavelength shorter than 89.45 nm and using a constant fit to the region 700–800 nm for wavelength longer than 896 nm. Finally, a continuum slope is fitted over the rest-frame wavelength range 121–600 nm using the method described in Gaia Collaboration et al. (2023b) and is used to compute the Zscore⁢(z) described in Section 16.3.11.4. Figure 16.19 presents the resulting composite quasar spectrum along with the extrapolation used by QSOC and the associated continuum slope.

Refer to caption
Figure 16.19: Rest-frame quasar template made from 750 414  observed quasar spectra from the sixteenth release of the Sloan Digital Sky Survey (SDSS) Quasar Catalog of Lyke et al. (2020) and used by QSOC in order to infer the redshift of the sources. The continuum slope is parametrized as a function of the rest-frame wavelength, λrest, as fcont=4910.2552⁢λrest−1.46121.

16.3.11.3 Inputs

The determination of the redshift by QSOC is based on

  • •

    partially-calibrated epoch spectra that are pre-processed, background mitigated, and geometrically calibrated but have no differential flux and line spread function (LSF) calibration.

  • •

    G band magnitude, phot_g_mean_mag

  • •

    TGE median A0, a0_median

Note that all partially-calibrated epoch spectra of a same source differ from one another because of the source variability, but also because of the different response function and LSF associated to their observing conditions. These observing conditions are summarized in the so-called calibration units and are composed of: the field of view; the on-board mission time (OBMT); the CCD row; the across-scan (AC) coordinate; the gates activation; the windows class (1D or 2D); the AC rate and on the along-scan and AC centring errors. Before being used, partially-calibrated epoch spectra must hence be normalized to a default calibration unit and combined to produce internally-calibrated spectra. Internally-calibrated BP/RP spectra are computed based on the partially-calibrated BP/RP spectra associated with each source using the following procedure: for a given set of N partially-calibrated epoch spectra (BP or RP), 𝒇i, for which the inverse uncertainties are given by the diagonal weight matrix 𝗪i=diag⁡(1/𝝈i), we compute the coefficients of the internally-calibrated spectra, 𝒄, through the minimization of

min𝒄,𝑭⁡χ2=∑i=1N‖𝗪i⁢(𝒇i−𝗔i⁢𝗕i⁢𝒄⁢Fi)‖2s.t.∑i=1NFi=N (16.61)

where 𝗔i and Fi are the calibration matrix and relative flux associated with the i-th epoch spectrum, respectively, and 𝗕i is the matrix of basis functions sampled at pseudo-wavelengths imposed by 𝗔i. The calibration matrix, 𝗔i, is associated to the calibration unit of the i-th partially-calibrated epoch spectrum. It is a discrete convolution matrix that models the flux and LSF calibration to apply to the set of the basis functions, 𝗕i, in order to reproduce the observed i-th partially-calibrated spectrum (Montegriffo et al. 2023). If 𝒇i is sampled at pseudo-wavelength 𝒙i, the calibration matrix converts an oversampled version of the basis functions, 𝗕i, to its partially-calibrated representation, sampled at 𝒙i. The linear constraint ∑i=1NFi=N, both ensures that the mean of the relative fluxes is equal to one and that the solution is bounded (any solution of the form α⁢𝒄⁢Fiα is otherwise also a solution to Equation 16.61 for arbitrary values of α). The set of basis functions are cardinal B-spline functions of degree three with uniformly spaced knots at 𝒕=(−3,−2,…,63) such that the 𝗕i matrices are composed of 63 basis functions. The minimization algorithm simultaneously produces the covariance matrix on 𝒄, 𝝨𝒄, and the uncertainties associated with each relative flux, σFi.

16.3.11.4 Method

In order to find the most probable redshifts of a source, redshift_qsoc, from its observed G magnitude and BP/RP internally-calibrated spectral coefficients, 𝒄bp and 𝒄rp (see Equation 16.61), QSOC evaluates the log-posterior probability

log⁡P⁢(z∣𝒄bp,𝒄rp,G)=log⁡P⁢(𝒄bp,𝒄rp∣z)+αcolour⁢log⁡P⁢(Fbp,Frp∣z)+αG⁢log⁡P⁢(G∣z)+C (16.62)

where Fbp and Frp are the integrated BP and RP flux derived from the internally-calibrated spectral coefficients, 𝒄bp and 𝒄rp; αcolour and αG are ad-hoc weights associated to the BP/RP colour and G-band magnitude log-likelihoods, log⁡P⁢(Fbp,Frp∣z) and log⁡P⁢(G∣z), respectively; and C is a normalization constant such that ∫0∞P⁢(z∣𝒄bp,𝒄rp,G)⁢𝑑z=1.

The first term in Equation 16.62 is the log-likelihood associated to the probability of observing the coefficients 𝒄bp and 𝒄rp if we assume that the observed source is at redshift z. It is given as a linear combination of two independent chi-squares, each associated with the BP and RP coefficients as

log⁡P⁢(𝒄bp,𝒄rp∣z)=−χbp2⁢(z)2−χrp2⁢(z)2+Cc (16.63)

where Cc is a normalization constant such that ∫0∞P⁢(𝒄bp,𝒄rp∣z)=1 and

χxp2⁢(z)=(𝒄xp−𝗧xp⁢(z)⁢𝒙xp)T⁢𝝨𝒄xp−1⁢(𝒄xp−𝗧xp⁢(z)⁢𝒙xp);xp={bp,rp} (16.64)

are minimal with respect to 𝒙xp. In this last equation, 𝗧xp⁢(z) is a two-column matrix containing the SDSS quasar template as observed at redshift z (see Section 16.3.11.2) and a constant that are both converted into internally-calibrated spectral coefficients.

The colour log-likelihood from Equation 16.62 is given by

log⁡P⁢(Fbp,Frp∣z)=−χcolour2⁢(z)2+Ccolour (16.65)

where Ccolour is a normalization constant such that ∫0∞P⁢(Fbp,Frp∣z)=1 and

χcolour2⁢(z)=(Fbp−α⁢Fbp(z)σFbp)2+(Frp−α⁢Frp(z)σFrp)2 (16.66)

is minimal with respect to α and where Fbp(z) and Frp(z) respectively taken as the theoretical BP and RP fluxes of a quasar at redshift z, computed from the SDSS quasar template (Section 16.3.11.2) considering a reddening of a0_median and the extinction curve given by Fitzpatrick (1999). Empirical tests done using a random subset of 2871 sources with a uniform redshift coverage also show that αcolour=0.1 is an optimal value of the colour weight in Equation 16.62.

Finally, the G magnitude log-likelihood from Equation 16.62 is computed from the pure luminosity-function evolution and luminosity evolution and density evolution (PLE+LEDE) quasar luminosity function of Palanque-Delabrouille et al. (2016) as

log⁡P⁢(G∣z)=log⁡Φ⁢(Mg,z)+log⁡d⁢V+CG (16.67)

where CG is a normalization constant such that ∫0∞P⁢(G∣z)⁢𝑑z=1; Φ⁢(Mg,z) is the PLE+LEDE quasar luminosity function from Palanque-Delabrouille et al. (2016); M⁢g is the quasar absolute magnitude in the SDSS g-band, normalized to z=2, and d⁢V is the co-moving volume element at redshift z. The absolute SDSS g-band magnitude can be inferred from the Gaia G-band magnitude, using

Mg=G−d⁢M−kg⁢(z=2) (16.68)

where d⁢M is the distance modulus at redshift z, normalized at 10  pc, and calculated from a flat Λ-CDM cosmology with H0=67.74 km s−1 Mpc−1 and ΩΛ=0.6935 (Planck Collaboration et al. 2016b). The k-correction term, kg⁢(z=2), encompasses the galactic extinction (TGE a0_median extinction); the conversion from the observed Gaia G magnitude to SDSS g magnitude, including the synthetic zero point difference, and the effect of the redshift on the observed spectral range, which is normalized to z=2 in the SDSS g-band. Empirical tests done using a random subset of 2871 sources with a uniform redshift coverage also shows that αG=4 is an optimal value of the magnitude weight in Equation 16.62. We concurrently produce an absolute Gaia G-band magnitude, gmag_qsoc, by replacing the SDSS g-band k-correction from Equation 16.68 with an appropriate k-correction taking into account the galactic extinction and normalization of the observed spectral range to z=2 in the Gaia G-band while using a flat Λ-CDM cosmology with H0=67.66 km s−1 Mpc−1 and ΩΛ=0.69034 (Planck Collaboration et al. 2020).

The determination of the redshift of quasars by QSOC is based on the fact that the redshift,

z=λobs−λrestλrest=λobsλrest−1, (16.69)

turns into a simple offset once considered on a logarithmic wavelength scale

Z=ln⁡(z+1)=ln⁡λobs−ln⁡λrest, (16.70)

where we assume that a given spectral feature standing at rest-frame wavelength λrest is observed at wavelength λobs. QSOC then searches for the logarithmic redshift, 0<Z≤2, having the highest log-posterior probability and compute its associated uncertainty from the asymptotic normality property of the maximum likelihood estimator as

σZ2=−(∂2log⁡P⁢(z∣𝒄bp,𝒄rp,G)∂Z2)−1. (16.71)

The redshift that is reported by QSOC, z=exp⁡Z−1, is thus distributed as a log-normal distribution of mean Z and variance σZ2 such that its lower and upper confidence intervals, redshift_qsoc_lower and redshift_qsoc_upper respectively, taken as its 0.15866 and 0.84134 quantiles, are given by

zlow=exp⁡(Z−σZ)−1andzup=exp⁡(Z+σZ)−1. (16.72)

Assuming that our formulation of the log-posterior probability correctly describes the probability of having a quasar at redshift z given the observed 𝒄bp, 𝒄rp and G quantities, we concurrently compute the probability that the selected redshift effectively stands within its confidence interval through

Pz=∫zlowzupP⁢(z∣𝒄bp,𝒄rp,G)⁢𝑑z. (16.73)

We should however stress here that our formulation of the log-posterior probability from Equation 16.62 is known to be overly simplistic as, for example, we assume that the observed spectra can be represented using a single composite spectrum plus a constant and that the quasar BP/RP colours and absolute magnitudes only depend on redshift. Nevertheless, Pz remains an efficient indicator of the quality of the redshift that can easily be interpreted. It is further shown to be proportional to the true probability that the redshift stands within its confidence interval (see Section 16.4.12.2).

Amongst other quality indicators, QSOC provides the Zscore⁢(z), zscore_qsoc, that is an indicator of the presence of quasar emission lines. A Zscore close to one indicates that all the emission lines that we expect at redshift z are found in the spectra while the miss of a single emission line often leads to a very low Zscore. The Zscore is computed from the internally-calibrated spectral coefficients of the quasar emission lines,

𝒄xpel=𝒄xp−𝗧xpcont⁢(z)⁢𝒙xp, (16.74)

where 𝗧xpcont⁢(z) is similar to 𝗧xp⁢(z) (Equation 16.64) except that the SDSS quasar template is replaced by the power law continuum slope from Section 16.3.11.2, leaving pure emission line coefficients in 𝒄xpel. The flux associated to an emission line at rest-frame wavelength λ, eλ and associated uncertainty, σeλ, can then be derived from Equation 16.74 in order to provide

Zscore⁢(z)=∏λ[12⁢(1+erf⁡eλσeλ⁢2)]. (16.75)

Equation 16.75 can be viewed as a geometric mean of a set of normal cumulative distribution functions of mean zero and standard deviations σ⁢(eλ) evaluated at eλ. Practically, the Zscore is computed over the observed wavelength range 380–660 nm in BP and 645–985 nm in RP using the Ly α λ121.567 nm, Si iv λ139.676 nm, C iv λ154.906 nm, C iii] λ190.873 nm, Mg ii λ279.875 nm, H γ λ434.168 nm, H β λ486.268 nm and H α λ656.461 nm rest-frame emission lines.

A complementary quality estimator is the ccfratio_qsoc which is taken as the value of the coefficients log-likelihood (Equation 16.63) normalized to stand in the range [0,1]. Low values of this parameter indicate that the redshift selection was mostly driven by the colour and absolute magnitude likelihoods (Equation 16.65 and Equation 16.67) instead of the likelihood based on the comparison of the observed BP/RP spectra against the QSO template. It is defined as

ccf_ratio⁢(z)=log⁡P⁢(𝒄bp,𝒄rp∣z)−minz′⁡log⁡P⁢(𝒄bp,𝒄rp∣z′)maxz′⁡log⁡P⁢(𝒄bp,𝒄rp∣z′)−minz′⁡log⁡P⁢(𝒄bp,𝒄rp∣z′). (16.76)

QSOC also reports the redshift with the second highest posterior probability, zalt which is stored in redshiftalt_qsoc field, along with its associated lower and upper confidence intervals, zlowalt and zupalt, and probability to stands within its confidence intervals, Pzalt. It is however required that the absolute difference between the most probable and second most probable redshifts is |z−zalt|>0.1 in order to avoid reporting small oscillations that are commonly found around the global maximum of the log-posterior probability. Finally, the Zscore⁢(z) and ccf_ratio quality indicators, when combined with information from the internal-calibration procedure ( Section 16.3.11.3), allow us to define useful binary flags for filtering potentially erroneous redshifts that are reported in the flags_qsoc field.

16.3.11.5 Outputs

The QSOC contribution to the qso_candidates and grav_lens_redshift tables are

16.3.11.6 Scope

QSOC internally produces astrophysical parameters for all sources

  1. 1.

    classified as quasars by the DSC module, namely those having classprob_dsc_combmod_quasar >0.01 (see Section 16.3.2 for more details).

  2. 2.

    found within 7′′ of one of the CU4-EO input quasar to search for gravitational lenses (Section 13.2 and grav_lens_input_list table).

  3. 3.

    contained in its validation dataset and used to assess the software performance during the development phase. The latter is composed of sources found within 1′′ of one of the Milliquas 7.8c quasar (Flesch 2021) and sources contained in a preliminary version of the GraL catalogue of gravitationally lensed quasars of Ducourant et al. (2026b).

All sources from points 1–3 that are also contained in the qso_candidates table have their QSOC astrophysical parameters published in Gaia DR4. Additionally, sources having zscore_qsoc>0.5 and redshift_qsoc_logprob>3 are elected as quasar candidates and concurrently have their astrophysical parameters published in the qso_candidates table. All sources from point 2 have their astrophysical parameters published in the grav_lens_redshift, without filtering.

16.3.11.7 Uses and limitations

Based on a 1′′ cross-match of the QSOC predictions from the qso_candidates and grav_lens_redshift tables against the Milliquas 8 quasar catalogue of Flesch (2023) (558 400  sources), we have that

  • •

    76.7% of the sources have an absolute error on the redshift that is |Δ⁢z|<0.1.

  • •

    91.3% of the sources with G<20 mag have |Δ⁢z|<0.1, which represents 42% of the total number of sources. At G<20.5 mag, 89% of the sources have |Δ⁢z|<0.1 (66.7% of the total number of sources).

  • •

    96.5% of the sources with flags_qsoc =0 have |Δ⁢z|<0.1 (21.7% of the total number of sources).

  • •

    91.4% of the sources with redshift_qsoc_logprob >3 have |Δ⁢z|<0.1 (67.9% of the total number of sources).

  • •

    92.5% of the sources that are elected as eligible by QSOC in the qso_candidates table (with bit 7 set in the source_selection_flags) have |Δ⁢z|<0.1 (66.4% of the total number of sources).

The main sources of contaminant predictions are: emission line mismatches; constant QSOC predictions occurring at z≈0.5 and z≈1, where only one emission line is covered by BP and RP spectral range and a background of false predictions at 1≲z≲2 that are associated to faint sources (at G≳20.5 mag).

Additional details on the QSOC uses and limitations can be found in Section 16.4.12.2.

16.3.11.8 Changes with respect to DR3

The core of the QSOC module was entirely rewritten since Gaia DR3 such that the zscore_qsoc, flags_qsoc and ccfratio_qsoc fields that were already present in the previous release change their signification. The meaning of the redshift_qsoc, redshift_qsoc_lower and redshift_qsoc_upper fields however remains unchanged.

Gaia DR4 also saw the introduction of ten new fields that are the log-posterior probability, redshift_qsoc_logprob, from Equation 16.62; the probability that the effective redshift stands within the predicted confidence interval, redshift_qsoc_prob, from Equation 16.73; the absolute quasar Gaia G-band magnitude, gmag_qsoc, from Equation 16.68, along with its lower and upper confidence intervals, gmag_qsoc_lower and gmag_qsoc_upper; the second most-probable redshift, redshiftalt_qsoc, along with its associated confidence intervals, redshiftalt_qsoc_lower and redshiftalt_qsoc_upper; probability to stand within its confidence interval, redshiftalt_qsoc_prob, and value of the log-posterior probability, redshiftalt_qsoc_logprob.