16.3.1 SMSgen
Author(s): René Andrae
16.3.1.1 Goal
The Sampled Mean Spectrum Generator (SMSgen) is an auxiliary module which converts the BP/RP spectral coefficients provided by upstream processing into sampled spectra for usage within the Apsis pipeline. The BP/RP spectra are sampled on a fixed wavelength grid, which is identical to the wavelength sampling of the model BP/RP spectra (see Section 16.2.3.3). The sampled BP/RP spectra are for internal usage only and are not published.
In order to obtain sampled BP/RP spectra on published data, we refer the reader to GaiaXPy and its converter functionality. There are two key differences between SMSgen and GaiaXPy: First, while GaiaXPy computes flux densities at a given wavelength, SMSgen computes integrated fluxes within a small wavelength interval. Second, GaiaXPy operates on externally calibrated BP/RP spectra (Montegriffo et al. 2026), whereas SMSgen operates on internally calibrated BP/RP spectra that have undergone the internal calibrations from De Angeli et al. (2026) but not the external calibration.
16.3.1.2 Training data and models
16.3.1.3 Inputs
The input data to SMSgen are the BP/RP spectrum coefficients and their covariance matrices.
16.3.1.4 Outputs
SMSgen produces four double-valued arrays, holding the values and errors of the sampled BP/RP spectra. However, SMSgen does not propagate the BP/RP covariances, because those are best handled in BP/RP coefficient space.
16.3.1.5 Method
Sampling the BP/RP spectra is a simple linear-algebra operation. Let denote the or coefficients and let denote the design matrix of format , where is the number of pixels and is the number of coefficients. The design matrix is computed from the chosen wavelength sampling, the dispersion relation and the basis function definition. Then, the flux values of the sampled spectrum are given by:
| (16.12) |
Furthermore, let denote the coefficient covariance matrix. Then, the pixel covariance matrix of the sampled BP/RP spectrum is given by:
| (16.13) |
Since we have more sampled pixels than coefficients, , the pixel covariance matrix cannot have full rank and thus cannot be invertible, e.g. for usage in a . Therefore, SMSgen only provides the square-root of the diagonal elements of as the errors of the sampled mean spectrum.
16.3.1.6 Scope
SMSgen is applied to all sources which have BP/RP coefficients. We note that the outputs from SMSgen are not published.
16.3.1.7 Uses and limitations
SMSgen results are not published.
16.3.1.8 Changes with respect to DR3
The BP/RP basis definitions have been changed from Gauss-Hermite functions in Gaia DR3 to -splines in Gaia DR4 (De Angeli et al. 2026). Furthermore, the new BP/RP spectra also require an updated and improved dispersion relation (Montegriffo et al. 2026), which translates between physical wavelength and pixel position.
The physical wavelength grid defining where the BP/RP spectra and the model spectra are sampled has not changed and is identical to what Apsis processing has been used in Gaia DR3.