11.2.3 Use of BP and RP spectra in CU8
Author(s): Rosanna Sordo, Rene Andrae, Ronald Drimmel, Morgan Fouesneau, Andreas J. Korn, Antonella Vallenari
All Apsis modules, except for TGE, FLAME and GSPSpec, use BP/RP spectra as input data, which are timeaveraged mean spectra that have been internally calibrated to all be on the same pseudoflux and pseudowavelength (pixel) scale (without external calibration to physical flux or physical wavelength). The processing of BP/RP spectra by photometric processing is described in Section 5.3. Here we recall that a BP/RP spectrum is stored as a set of 55 coefficients, projecting the mean spectrum onto a set of Hermite basis functions. These bases functions are optimized to contain the most information in the first coefficients. In principle, this allows to truncate the 55 coefficients in order to potentially reduce the impact of noise (Carrasco et al. 2021). However, CU8 in general do not use the truncated form of the BP/RP spectra, since it was not possible to accurately test this solution before operations, except for ESPUCD, see Section 11.3.10.
BP/RP spectra are preprocessed by the CU8 module SMSgen (Sampled Mean Spectrum, see Section 11.3.1). The mean spectrum is sampled on a fixed wavelength array, covering the BP and the RP wavelength range with 120 flux points each (240 total). SMSgen provides an error spectrum for each BP/RP spectra, see Section 11.3.1 for full details.
Simulations
While some Apsis modules are trained on empirical samples (i.e. real observed BP/RP spectra for sources of known type or known parameters), many modules need training data based on simulations of Gaia observations, see Table 11.12. The simulation process aims to generate a synthetic BP/RP spectrum with consistent photometry, starting from a given external input spectrum. The input spectrum can be synthetic or observed, and is flux calibrated, either on an absolute or a relative scale. The list of the libraries used to produce simulations is described in Section 11.2.3, and summarised in Table 11.13. In the simulation process, we apply an extinction law to the synthetic spectra, and this is described in Section 11.2.3. We also need to assign a distance to a given source, so we couple the spectrum with evolutionary models, and this is described in Section 11.2.3.
The spectrum simulator is provided by CU5, see Section 11.2.3.
For each library, the Apsis modules require two types of simulations. To train the algorithms, libraries are simulated at discrete values of ${T}_{\mathrm{eff}}$, $\mathrm{log}g$, $[\mathrm{Fe}/\mathrm{H}]$ as given in the source library, while extinction is applied using a set of 56 A${}_{0}$ values, from 0 to 10 magnitudes where R${}_{0}$=3.1, see Section 11.2.3. Some modules need a continuous distribution in these parameters, involving linear interpolation of the original spectra, if this is scientifically meaningful, e.g. this is not the case for the empirical libraries.
Module  Training  
Empirical  On simulations  
DSC  x  
GSPPhot  x  
MSC  x  
ESPCS  x  
ESPUCD  x  
ESPHS  x  
ESPELS  x  x 
UGC  x  
QSOC  x  
OA  x 
Synthetic libraries
A set of libraries of synthetic and semiempirical spectra are used to train several Apsis modules, and include stellar, galaxy and QSO spectra. The spectra cover the 300–1100 nm wavelength range, with 8001 flux points sampled every 0.1 nm.
The synthetic stellar libraries cover the HR diagram as much as possible, at discrete steps. The different model families are computed using different assumptions, from different physical ingredients (chemical composition) to the treatment of specific processes (see BailerJones et al. (2013)). Their coverage in significant parameters (${T}_{\mathrm{eff}}$, $\mathrm{log}g$, metallicity) is shown in Table 11.13. Furthermore, we emphasise that all synthetic stellar libraries have their spectra normalised such that their total integrated flux (including wavelengths outside 3001100nm) satisfies the StefanBoltzmann law, i.e. the flux levels are such that the total integrated flux scales with ${\sigma}_{B}{T}_{\mathrm{eff}}^{4}$. In the following, we summarize some basic information on the libraries used by Apsis modules in DR3.
Hereafter we summarize the basic model family characteristics:

•
MARCS These models are described in detail by Gustafsson et al. (2008). For $\mathrm{log}g\le $ 3.5, spherical models are computed with 1 ${\mathcal{M}}_{\odot}$ and microturbulence parameter=2 $\mathrm{km}{\mathrm{s}}^{1}$, while for dwarf stars planeparallel models are computed, with microturbulence parameter=1 $\mathrm{km}{\mathrm{s}}^{1}$. Solar abundances are from Grevesse et al. (2007). The library is provided at very fine step in ${T}_{\mathrm{eff}}$, especially at low temperatures where nonlinear effects make interpolation more prone to errors.

•
PHOENIX details are given in Brott and Hauschildt (2005)
 •
 •
Many other spectral libraries (synthetic or semiempirical) have been computed and provided to CU8, but either used only internally for algorithm preparation/validation or not yet implemented in the processing. Among those: Be (B stars with emissions) and WR stars, Physical Binaries, WD stars.
Library name  Apsis  $N$ models  ${T}_{\mathrm{eff}}$  $\mathrm{log}g$  $[\mathrm{Fe}/\mathrm{H}]$ 
consumer  [K]  [dex]  [dex]  
A  GSPPhot  12 332  16 000 $$ 15 000  $$2.5 $$ 4.5  $$1.5 $$ +0.5 
ESPHS  
MARCS  GSPPhot  27 951  12 800 $$ 18 000  $$0.5 $$ 5.0  $$5.0 $$ +1.0 
PHOENIX  GSPPhot  14 651  13 000 $$ 10 000  $$0.5 $$ 5.5  $$2.5 $$ +0.5 
OB  GSPPhot  12 162  15 000 $$ 55 000  $$1.75 $$ 4.75  $$0.0 $$ +0.6 
ESPHS  
HotSpot  ESPCS  31 957  13 000 $$ 17 000  $$3.0 $$ 5.0  $$0.5 $$ +1.0 
Extragalactic sources are simulated using the following libraries: Galaxies EMP, Galaxies SE, Galaxies E,I,Q,S, Outliers, RadioFirst, SDSS QSO. All Galaxy libraries are used by UGC (Section 11.3.13). The SDSS QSO is used by QSOC (Section 11.3.14). The Outliers and RadioFirst librarires are used by the OA (Section 11.3.12).
Bolometric corrections
Bolometric corrections (BC) are calculated for the MARCS and OB libraries. BCs are needed in FLAME processing, see Section 11.3.6. They are computed from the spectra using the Gaia EDR3 passbands, either via integration over all wavelengths (for standard MARCS and OB) or by using the StefanBoltzmann law for the LL models. A bolometric correction tool is available on the Gaia DR3 software and tools webpages.
Theoretical models
Based on the ${T}_{\mathrm{eff}}$, $\mathrm{log}g$ and $[\mathrm{M}/\mathrm{H}]$ of the synthetic spectrum, we assigned the fundamental parameters (luminosity, mass, radius…) using Padova evolutionary models, on a bestmatch approach. This means that we generated a very large population of stars, spanning all available ages and metallicities (in the models), and looking for the closest match in this population. A flag indicates if this match is satisfactory, based on a threshold on the geometrical distance between the point and the bestmatch. This threshold is variable according to the spectral type of the star.
Extinction law and extinction coefficients.
Observed spectra are attenuated (i.e. dimmed and reddened) by the amount of interstellar dust present between the observer and the source, so if $F(\lambda )$ is the source spectral energy distribution, $A(\lambda )$ is the extinction curve, then the attenuated, observed flux $f(\lambda )$ is:
$$f(\lambda )=F(\lambda )\cdot {10}^{0.4A(\lambda )}$$  (11.1) 
In this sense, extinction can be considered an astrophysical parameter of a given source, and can be inferred using the spectra. To properly train the algorithms, simulations must be provided at different levels of extinction.
We adopted the wavelength dependent extinction law of Fitzpatrick (1999), which is parametrized by ${A}_{V}$, the extinction in the $V$ band, and $R\equiv {A}_{V}/E(BV)$. Specifically, they provide a numerical recipe for generating values of ${A}^{\prime}(\lambda )=[A(\lambda )/E(BV)]$, the extinction law normalized to a colour excess of E(BV)=0.5 for a 30.000 K star, letting the user specify the parameters ${A}_{V}$ and $R$ to derive a specific extinction curve $A(\lambda )={A}_{V}{A}^{\prime}(\lambda )/R$. (We note that in this context ${A}_{V}$ and $R$ are to be understood as extinction parameters.) In our application of the Fitzpatrick extinction law we fix R=3.1, and note that $[{A}^{\prime}(\lambda )/3.1]$ is equal to 1 at the specific wavelength 541.4 nm (see Figure 11.3) , so that we can define the extinction parameter ${A}_{0}$ as the monochromatic extinction at 541.4 nm and
$$f(\lambda )=F(\lambda )\cdot {10}^{0.4\cdot {A}_{0}[{A}^{\prime}(\lambda )/3.1]}$$  (11.2) 
The extinction curve at R=3.1 used in CU8 simulations is available together with the parameter files on the Gaia DR3 auxiliary data webpage.
For each spectral energy distribution, the extinction in a given band is computed by integrating the spectra $F$ and $f$ (i.e., with and without applied extinction) over the chosen passband, to obtain the integrated fluxes. Using the Gaia $G$ band as an example, we derive:
$${F}_{G}=\int {T}_{G}(\lambda )F(\lambda )\mathit{d}\lambda $$  (11.3) 
and
$${f}_{G}=\int {T}_{G}(\lambda )f(\lambda )\mathit{d}\lambda $$  (11.4) 
where ${T}_{G}$ denotes the transmission of the $G$ passband. We then take the ratio of ${F}_{G}$ and ${f}_{G}$ and compute the magnitudes. This is equivalent to:
$${A}_{\mathrm{G}}=2.5\cdot \mathrm{log}({F}_{G}/{f}_{G})$$  (11.5) 
The same procedure is used to compute extinction coefficients ${A}_{\mathrm{BP}}$ and ${A}_{\mathrm{RP}}$ for the Gaia ${G}_{\mathrm{BP}}$ and ${G}_{\mathrm{RP}}$ passbands. For internal use and to check consistency, we also compute extinction coefficients in the Johnson B, V, I bands (Bessell 1990). These values are not published in Gaia DR3. We explicitly note the intrinsic difference between the extinction parameter ${A}_{0}$ and the extinction in the Johnson $V$ band ${A}_{\mathrm{V}}$, while these two notations are often confused in the literature. In particular, the actual extinction in a given band is coupled with the spectrum of the emitting source: i.e. a given ${A}_{0}$ corresponds to different values of ${A}_{\mathrm{V}}$ for stars having a different spectral type, as shown in Figure 11.4a. As is evident from Figure 11.4b, the same effect also applies to ${A}_{\mathrm{G}}$, but since the Gaia $G$ band is significantly broader than the Johnson V band, the effect is even more pronounced in ${A}_{\mathrm{G}}$ than in ${A}_{\mathrm{V}}$.
BP/RP spectrum simulator
CU5 (P. Montegriffo) provided a simulator that implements the instrument model and the extinction law as derived through the BP/RP spectra external calibration process in CU5, see Chapter 5 for more details. The tool takes a model spectrum as input and gives an instrument spectrum as output, in the same format as the BP/RP spectra from CU5. The BP/RP spectrum simulator uses the Gaia EDR3 photometric passbands to compute the Gaia photometry from the spectra.
Known issues
In Gaia DR3 we did not implement the covariance matrix in BP/RP simulations, due to processing time limitations. This is foreseen for Gaia DR4.