6.1.3 Overview of the spectroscopic processing
The RVS spectroscopic processing pipeline is the result of the work of CU6 (Section 1.2.2.3): the scientific teams provided the scientific codes to DPCC (CNES), which integrated them into the SAGA (System of Accommodation of Gaia Algorithms) host framework. SAGA is developed by Thales. The RVS pipeline was run at DPCC (Section 1.3.6.3) on a Hadoop cluster with 2500 cores and 18 TB RAM. The processing took approximately 5 million hours of CPU time and about 180 days real time, and needed 600 TB of disk space.
The technical design of the RVS pipeline was completely revised for Gaia DR3 to enable the processing of a much larger volume of data (2.8 billion CCD spectra in Gaia DR3, about ten times more than the 280 million in Gaia DR2) and to avoid storing large intermediate datasets. For Gaia DR4, in which about 27 billion CCD spectra were processed (about ten times more than in Gaia DR3), the six specialised pipelines introduced for DR3 were retained. The Gaia DR4 pipeline is still composed of the six specialised pipelines shown in Figure 6.1, but each has been significantly optimised. The most significant functional change compared with Gaia DR3 is that the STAMTA pipeline also processes stars fainter than external_apparent_grvs (the magnitude limit in Gaia DR3). To achieve this more efficiently, the pipeline operates in three modes: Bright, NSS, and Faint (see Section 6.4.6).
6.1.3.1 Major new functionalities introduced in the Gaia DR4 RVS pipeline
The main goal of the RVS pipeline is to estimate the radial_velocity of as many stars as possible observed by the RVS. At each data release, progressively fainter stars are processed, so the magnitude limit increases accordingly. external_apparent_grvs was approximately mag in Gaia DR2, about mag in Gaia DR3, and targeted to reach mag in Gaia DR4. This is possible because the number of observations per source increases with each release, which raises the expected SNR in the combined spectra and enables the measurement of radial velocities for fainter stars. However, working with faint stars remains challenging due to the larger data volume (more stars overall, plus more observations per star as longer time spans are covered) and the low SNR of their spectra, with many below 1. New methods have therefore been developed not only to extract the most reliable results possible, but also to detect spurious measurements and optimise processing time.
Listed here are the new scientific functionalities implemented in the pipeline that have enabled the DR4 objectives.
-
•
Radial velocities of very faint stars: For stars fainter than external_apparent_grvs mag, radial velocities are estimated using the Faint mode of the STAMTA pipeline (Section 6.4.9.1). While this processing is still flagged in the data model as rv_single_method_used , the internal procedure is adapted for this fainter regime. Specifically, the radial_velocity is estimated using a cross-correlation function (C-function, Section 6.4.8) derived directly from the epoch spectrum of each transit (the CCD spectra of the transit being combined first); the epoch CCFs are then combined to derive the source radial velocity. This contrasts with the approach used for brighter stars (also logged as method 2), which relies on combining the individual CCFs extracted from each single CCD spectrum. Deriving the CCF from the combined spectra significantly reduces processing time while preserving radial velocity performance; however, because it slightly degrades the accuracy of the vbroad measurement, this adapted approach is strictly restricted to the Faint mode.
-
•
Estimation of the probability that a radial velocity is spurious: This probability is computed using machine learning, specifically a balanced random forest trained on parameters describing the shape of the C-function (see (Snaith et al. 2026) for details). The resulting value is stored in rv_single_outlier_probability, available for both source and epoch radial velocities. In Post-processing (Section 6.5.2), it is combined with other information, such as external_apparent_grvs and, for epoch radial velocities, rv_outlier_condition, to identify and flag invalid measurements.
-
•
Improving radial velocities of bright, assumed astrometric binaries: This is achieved in the STAMTA NSS mode (Section 6.4.6).
-
–
Correction of the epoch radial velocities of bright, assumed astrometric binaries for small shifts caused by orbital motion on the sky. The wavelength calibration of RVS spectra uses field angles computed from single-star astrometric parameters. For astrometric binaries, this neglects orbital motion, leading to small wavelength shifts and systematic errors in epoch radial velocities. The effect is proportional to the along-scan positional error () and can alter the semi-amplitude and other orbital parameters in spectroscopic solutions. However, it is significant only for nearby, bright binaries with large orbits. In DR4, just before STA, the pipeline applies a correction using the orbital motion from the astrometric solution to compute the field angles and shift the spectra accordingly, thereby reducing these systematic RV errors (see Section 3.3.1 Holl et al. 2023a, for details).
-
–
Measurement of the systemic radial velocity, radial_velocity_sys, and radial velocity semi-amplitude, semi_amplitude_primary, using the Line Integral Analysis (LIA) method. For a short description of LIA, see Section 6.4.9.3, and for a more detailed description, see (Bashi et al. 2026).
-
–
-
•
Improving background correction: Implementation of a second-order correction in the Scatter pipeline (see Section • ‣ 6.4.3) to enhance background correction in RVS CCD spectra.
-
•
Improving wavelength calibration: This includes:
-
1.
Pivoting and scaling the field angles (see Section 6.3.3);
-
2.
Solving the calibration coefficients of all three CCDs simultaneously (previously done per-CCD in Gaia DR3) with a common radial velocity for each source, which reduces inter-detector bias, better constrains stellar velocities, and improves outlier rejection;
- 3.
-
1.
-
•
Identification of contaminants: In Gaia DR4, the approaches used in DR3 have been extended. In Gaia DR3, contaminants were treated in two ways: (1) Deblending: when both the target and a contaminant had an RVS window, overlapping spectra were explicitly deblended; (2) Point-background contaminants: when the contaminant had no RVS window but would have overlapped the target window if it had, the affected transits were flagged (see Section 6.4.5). These flagged spectra were excluded from the computation of the per-source magnitude but still used for other per-source parameters.
In Gaia DR4, a third method was introduced: a dedicated empirical model (see Section 6.4.5). This extends the search for bright contaminants beyond the window-overlap region considered in Gaia DR3. Transit spectra identified as contaminated by this model are flagged and invalidated. Unlike deblending, no correction is attempted. These transits are excluded from the computation of all per-source parameters, including radial_velocity, grvs_mag, vbroad, and rvs_mean_spectrum.