6.4.5 FullExtraction
FullExtraction is the pipeline where the RVS spectra are cleaned and calibrated, and filtering of bad data takes place. All the SpectroObservation, regardless of their magnitude and window geometry, the SpectroObservationVo and the spurious detection transits are also processed. Only after the star spectra have undergone deblending, the spurious detection transits and the VOs are removed.
Similarly to the Scatter and the Calibration pipelines, also FullExtraction starts with a Preprocessing step, where the astrometric information (AGIS coordinates, OGA3 and the Gaia Ephemeris) is used to associate to each sample of the spectrum the FoV coordinates of the source at the time when the sample crosses the CCD fiducial line, and the barycentric velocity correction (Section 3.4.6) is associated with each spectrum. The contaminant-transits are also identified: these are the transits of the contaminant-sources selected in SourceInit, brighter than external_apparent_grvs mag and not having an RVS window. Some of the processing steps undergone by the RVS spectra are similar to the ones undergone by the calibrators, during the Calibration Preparation. The major differences are that in FullExtraction the Calibration results are applied, all the RVS spectra are treated, the blended spectra are deblended, the spectra rejections are less strict, and the epoch magnitude grvs_mag is estimated.
-
•
Bias and bias non-uniformity are first removed using appropriate calibration coefficients (see Section 6.3.1).
-
•
Saturated samples are flagged. Samples with flux values above 50 000 ADU are flagged as saturated; in practice such pixels carry the numerical maximum of 65 535 ADU. This also flags pixels that reach physical saturation, as the typical full-well capacity of an RVS CCD pixel is around 190 000 electrons, which at the on-ground measured gain, corresponds to approximately 336 000 ADU. Spectra with more than 40 saturated samples are removed from the pipeline. The reason for exclusion is recorded in the RvsTransitDescription table, in the field ccd_invalid_reason.
-
•
The fixed CCD gain measured on ground (see Table 6.11) is applied.
-
•
The dark current measured on ground is subtracted (see Section 6.3.2).
-
•
The straylight background is removed by subtracting the flux from the RVS ScatterMap, interpolated to match the processing window’s position, time, and pixel sampling. Spectra of stars with external_apparent_grvs and with a total negative flux after background subtraction are removed, and so are the spectra with a background above 100 electrons pixel s, or a background above 40 electrons pixel s with uncertainty above 0.4 electrons pixel s. The reason for exclusion is recorded in the RvsTransitDescription table, in the field ccd_invalid_reason.
-
•
The flux loss outside the window is estimated using the LSF-AC calibration model obtained in the Calibration pipeline.
-
•
Spectra containing columns from the cosmetic defect list (see Section 6.3.2) are flagged and removed. The reason for exclusion is recorded in the RvsTransitDescription table, in the field ccd_invalid_reason.
-
•
Spectra with a nearby relatively bright contaminant (source with no RVS window, magnitude brighter than the target magnitude plus 2 mag, within AL AC pixels) are flagged by setting isMissingPointBgContribution in ccd_status of RvsTransitDescription. These are excluded from the computation of the per-source grvs_mag in the STAMTA pipeline.
-
•
Cosmic rays are removed from both 2D and 1D windows. If pixels are saturated by cosmic rays but successfully corrected, the saturation flag is cleared. Spectra with cosmic-ray-affected samples or saturated samples are removed. The reason for exclusion is recorded in the RvsTransitDescription table.
-
•
2D windows are optimally collapsed into 1D spectra if there are no saturated pixels; otherwise, a simple AC sum is applied.
Figure 6.7: Effect of boxcar smoothing during deblending. The first 420 AL samples are not blended, while the remaining 840 AL samples (AL index 420 to 1260) are blended with another window and have been deblended. To illustrate the impact of this smoothing during the deblending process, the blended region was processed twice: once with boxcar smoothing applied (red line) and once without it (green line). As expected, applying boxcar smoothing reduces the noise compared to the not-smoothed extraction (transitId 15423357135284126, strip 1; mag). However, the spectral resolution is degraded; therefore, boxcar smoothing is only applied during the deblending of sources fainter than . -
•
Blended spectra with truncated windows are deblended, with flags isDeblended or isReblended set in ccd_status (RvsTransitDescription). Poorly deblended spectra, based on the Reciprocal Condition Number of the deblending matrix, are removed. A box-car smoothing is applied to deblended spectra for external_apparent_grvs (see Figure 6.7). Deblending is not implemented for WC0 windows, but blending is flagged (WC0BlendedWithWC0 or WC0BlendedWithWC1). Deblended transits are excluded from grvs_mag computation, and WC0BlendedWithWC0 cases are excluded from radial velocity computation in STAMTA. The deblending algorithm is described in Seabroke et al. (2021), their Section 2.5, and in Seabroke et al. (2026).
-
•
Apply trended wavelength coefficients to field angles and cut wavelength range to 846–870 nm.
-
•
Estimate total CCD spectrum flux between 846 and 870 nm after replacing flagged samples with the median of valid samples. Correct for flux loss, divide by the 4.4 s exposure, calibrate to the common zero point. Combine the CCD total fluxes to obtain the transit flux stored in grvs_flux, and derive the transit magnitude stored in grvs_mag (RvsEpochParametersSingle and RvsEpochParametersDouble).
-
•
Spectra considered contaminated by brighter sources, even those lying outside the area mentioned above, are flagged and excluded from the computation of all per-source parameters in the STAMTA pipeline, where the ccd_invalid_reason is set to 78.
A transit of a star (target) is considered bright contaminated if the following three conditions are satisfied:
-
1.
The distance and magnitude difference with the contaminant satisfy:
where and the magnitudes of both sources are given by their external_apparent_grvs
-
2.
The measured magnitude of the epoch, grvs_mag (stored in rvs_epoch_parameters_single) is brighter than 14 (i.e. ) and not null.
-
3.
The difference between the measured epoch magnitude grvs_mag and the source magnitude is lower than the threshold: (the threshold being negative, i.e. the measured epoch magnitude is anomalously bright), where is the source magnitude external_apparent_grvs stored in all_source_rvs (Table 6.2) and gaia_source (Table 6.1). The threshold is:
-
–
For external_apparent_grvs mag, a cubic polynomial fit with coefficients:
-
–
For values mag or mag, use the polynomial values at the boundaries, i.e. and .
-
–
-
1.
-
•
Remove ground-measured RVS filter response.
-
•
Normalise spectra: for bright stars, fit a second-degree polynomial to the pseudo-continuum, rejecting stellar lines via sigma clipping (). For stars fainter than external_apparent_grvs mag or cooler than rv_template_teff K, use a constant equal to the median flux.
-
•
Detect and flag emission-line spectra (no radial velocity estimated). Remove spectra with artificial jumps and flag those with significant gradients. Information stored in RvsTransitDescription.
- •
The uncertainties with all these processes are propagated for each sample in each window/spectrum.
The number of CCD spectra processed by the FullExtraction pipeline is approximately 27 billion. Of these, about 8 billion were removed during processing, most of them (about 5.7 billion, 70%) because the spectra could not be deblended. The remaining cleaned and calibrated spectra successfully produced by FullExtraction are used as input to the STAMTA pipeline and are included in the single-transit analysis (Section 6.4.8).
6.4.5.1 Determine atmospheric parameters
The astrophysical parameters (, , and ) are required in subsequent processing to select the appropriate synthetic spectrum (Section 6.2.3.3) for each observed spectrum. These parameters are taken from the auxiliary file AuxAtmParams (Section 6.2.3.2) and from the atmospheric parameter processing chain (Chapter 16; Creevey et al. 2023), as published in Gaia DR3, following a defined priority criterion outlined in Section 6.2.3.2.
However, there are some stars for which no atmospheric parameter information is available from either the auxiliary file AuxAtmParams or the atmospheric parameter processing chain. For these stars:
-
•
If external_apparent_grvs mag, astrophysical parameters are determined via Pearson correlation with templates generated from the restricted synthetic library (Section 6.2.3.4); the template with the highest correlation peak defines the parameters. In this case, the origin is recorded as rv_atm_param_origin = 333. For a more detailed description see Sartoretti et al. (2018, Section 6.5).
-
•
If external_apparent_grvs mag, no atmospheric parameters can be estimated, and default solar values are assigned instead. The origin is then set to rv_atm_param_origin = 0.