# 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 GSP-Spec, use BP/RP spectra as input data, which are time-averaged mean spectra that have been internally calibrated to all be on the same pseudo-flux and pseudo-wavelength (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 ESP-UCD, see Section 11.3.10.

BP/RP spectra are pre-processed 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_{\rm eff}$, $\log g$, $[\rm Fe/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.

### Synthetic libraries

A set of libraries of synthetic and semi-empirical 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 Bailer-Jones et al. (2013)). Their coverage in significant parameters ($T_{\rm eff}$, $\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 300-1100nm) satisfies the Stefan-Boltzmann law, i.e. the flux levels are such that the total integrated flux scales with $\sigma_{B}T_{\rm 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 $\log g\leq$ 3.5, spherical models are computed with 1 $\,{\cal M}_{\odot}$ and microturbulence parameter=2  $\rm\,km\,s^{-1}$, while for dwarf stars plane-parallel models are computed, with microturbulence parameter=1  $\rm\,km\,s^{-1}$. Solar abundances are from Grevesse et al. (2007). The library is provided at very fine step in $T_{\rm eff}$, especially at low temperatures where non-linear effects make interpolation more prone to errors.

• PHOENIX details are given in Brott and Hauschildt (2005)

• LL models are used to simulate B-F stars, see Shulyak et al. (2004), and implement direct computation of line opacity. Solar abundances are from Asplund et al. (2009)

• OB spectra are computed from the model atmosphere grids available on the TLUSTY website (Lanz and Hubeny 2003, 2007). A microturbulence of 2 $\rm\,km\,s^{-1}$ was considered for models cooler than 30000 K, and of 10 $\rm\,km\,s^{-1}$ for the hotter ones.

Many other spectral libraries (synthetic or semi-empirical) 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.

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 Stefan-Boltzmann 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_{\rm eff}$, $\log g$ and $[\rm M/H]$ of the synthetic spectrum, we assigned the fundamental parameters (luminosity, mass, radius…) using Padova evolutionary models, on a best-match 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 best-match. 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(B-V)$. Specifically, they provide a numerical recipe for generating values of $A^{\prime}(\lambda)=[A(\lambda)/E(B-V)]$, the extinction law normalized to a colour excess of E(B-V)=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_{\rm 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)d\lambda$ (11.3)

and

 $f_{G}=\int T_{G}(\lambda)f(\lambda)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_{\rm G}=2.5\cdot\log(F_{G}/f_{G})$ (11.5)

The same procedure is used to compute extinction coefficients $A_{\rm BP}$ and $A_{\rm RP}$ for the Gaia $G_{\rm BP}$ and $G_{\rm 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_{\rm 0}$ and the extinction in the Johnson $V$ band $A_{\rm 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_{\rm 0}$ corresponds to different values of $A_{\rm 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_{\rm G}$, but since the Gaia $G$ band is significantly broader than the Johnson V band, the effect is even more pronounced in $A_{\rm G}$ than in $A_{\rm 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.