14.4.2 Comparison of spectra
To compare the coefficients of the BP/RP spectra obtained from Equation 14.1, we use two different techniques that are the approach and the Wasserstein distance. As lensed images may be composed of a subset of the multiplet’s components (e.g. a multiplet composed of 4 lensed images, plus a lensing galaxy or a contaminating star), we consider all combinations of 2–6 components within these multiplets. Comparison techniques must hence be able to assess whether 2–6 components have similar SED all together. We do not compare the spectra of multiplets composed of 7 components or more as these presumably belong to regions of high stellar density, where we expect many stellar contaminants to be present.
For a set of spectral BP/RP coefficients, and , the chi-square approach aims to find a mean vector, , and scaling coefficients associated with the -th set of coefficients, , that minimize
| (14.7) |
where stands for BP/RP and where is the inverse of the Cholesky decomposition of the covariance matrix associated with , , such that (see Gaia Collaboration et al. 2023b, Appendix C, for a detailed implementation of Equation 14.7). Because any absorption of the quasar light by the lensing galaxy predominantly affects BP, Equation 14.7 is minimized separately for BP and RP and later combined into
| (14.8) |
where is the degree of freedom associated with . Multiplets composed of similar spectra thus have . Finally, to ease the comparison of the , we use the cubic root transformation of Wilson and Hilferty (1931),
| (14.9) |
which asymptotically follows a standard Gaussian distribution once is large (here if all have a full-rank and all BP/RP coefficient are available).
This chi-square approach is complemented by a comparison based on the Wasserstein distance (Kantorovich 1942, 2006). If is the linear interpolation of the spectral coefficients over the uniform grid of abscissa , then the 1-Wasserstein distance between the -th and -th spectral coefficients is given by
| (14.10) |
where . A value of implies that components and have similar spectral coefficients in and hence similar SED. The Wasserstein distance of a set of components from a given combination is then computed as the maximal value of taken over all combination’s components for .